summaryrefslogtreecommitdiff
path: root/cesar/maximus
diff options
context:
space:
mode:
authorThierry Carré2012-10-16 12:45:48 +0200
committerThierry Carré2013-01-31 15:04:48 +0100
commit4452a8abe0d135b1f690b530a3bb4b1e495d7b65 (patch)
treeffa06423693d00cdaccd3d8a51d3c6c61ec2b2f3 /cesar/maximus
parent83441de4ab01355295cfe6a6e389ad5bc66fd361 (diff)
cesar/maximus: C++ maximus refactoring, closes #3336, closes #3098
Feedback on new performance on tests inside: test_general/station Ratio = Test duration before this commit divided by new duration. |--------------------------------------------|-------| | Unit test | Ratio | |--------------------------------------------|-------| | maximus/py/sc01_long_simu.py | 6.5 | | maximus/py/sc02_long_simu.py | 4.5 | | scenario/av/py/sc01_assoc_auth.py | 3.3 | | scenario/av/py/sc02_stas_communication.py | 4.5 | | scenario/av/py/sc03_two_avln_coexisting.py | 2.1 | | scenario/av/py/sc04_cc_whoru.py | 2.1 | | scenario/av/py/sc05_cc_leave.py | 2.3 | | scenario/av/py/sc06_discover_procedure.py | 2.3 | | scenario/av/py/sc07_bridge.py | 2.2 | | scenario/av/py/sc08_bentry_change.py | 2.1 | | scenario/av/py/sc09_simple_connect.py | 2.2 | | scenario/av/py/sc10_short_messages.py | 5.7 | | scenario/av/py/sc11_cm_nw_info.py | 4.7 | | scenario/av/py/sc12_change_nmk.py | 5.5 | | scenario/av/py/sc14_igmp.py | 4.0 | | scenario/av/py/sc15_hide.py | 6.0 | | compliance/py/sc01_dut_as_a_cco.py | 5.8 | | tonemap/py/sc01_bl_initial.py | 2.3 | | tonemap/py/sc02_vs_get_tonemap.py | 2.3 | |--------------------------------------------|-------| | Average speed improvement of Maximus is | 4.9 | |--------------------------------------------|-------| Many tickets have been opened to continue the refactoring. Titles begin by "[Maximus][Refactoring]" in pessac's trac. For this reason #3336 is close. #3098 is really fixed.
Diffstat (limited to 'cesar/maximus')
-rw-r--r--cesar/maximus/Config1
-rw-r--r--cesar/maximus/Module9
-rw-r--r--cesar/maximus/channel/Module4
-rw-r--r--cesar/maximus/channel/inc/ChannelComputer.h513
-rw-r--r--cesar/maximus/channel/inc/ChannelComputerTest.h40
-rw-r--r--cesar/maximus/channel/inc/ChannelMapping.h321
-rw-r--r--cesar/maximus/channel/inc/ChannelMappingTest.h40
-rw-r--r--cesar/maximus/channel/inc/ChannelPoint.h170
-rw-r--r--cesar/maximus/channel/inc/ChannelPointTest.h34
-rw-r--r--cesar/maximus/channel/inc/ChannelSettings.h312
-rw-r--r--cesar/maximus/channel/inc/ChannelSettingsTest.h42
-rw-r--r--cesar/maximus/channel/inc/IChannel.h164
-rw-r--r--cesar/maximus/channel/src/ChannelComputer.cpp1482
-rw-r--r--cesar/maximus/channel/src/ChannelComputerTest.cpp335
-rw-r--r--cesar/maximus/channel/src/ChannelMapping.cpp654
-rw-r--r--cesar/maximus/channel/src/ChannelMappingTest.cpp432
-rw-r--r--cesar/maximus/channel/src/ChannelPoint.cpp181
-rw-r--r--cesar/maximus/channel/src/ChannelPointTest.cpp41
-rw-r--r--cesar/maximus/channel/src/ChannelSettings.cpp195
-rw-r--r--cesar/maximus/channel/src/ChannelSettingsTest.cpp175
-rw-r--r--cesar/maximus/common/interfaces/Maximus.h360
-rw-r--r--cesar/maximus/common/interfaces/Msg.h312
-rw-r--r--cesar/maximus/common/interfaces/Sta.h169
-rw-r--r--cesar/maximus/common/types.h24
-rw-r--r--cesar/maximus/common/types/channel_types.h70
-rw-r--r--cesar/maximus/common/types/ethernet_types.h88
-rw-r--r--cesar/maximus/common/types/functioncall_types.h70
-rw-r--r--cesar/maximus/common/types/hal_phy_types.h55
-rw-r--r--cesar/maximus/common/types/networkclock_types.h79
-rw-r--r--cesar/maximus/common/types/phy_types.h140
-rw-r--r--cesar/maximus/common/types/sci_types.h168
-rw-r--r--cesar/maximus/common/types/system_types.h72
-rw-r--r--cesar/maximus/coreengine/Module5
-rw-r--r--cesar/maximus/coreengine/inc/CoreEngine.h187
-rw-r--r--cesar/maximus/coreengine/inc/CoreEngineTest.h36
-rw-r--r--cesar/maximus/coreengine/inc/MaximusTest.h72
-rw-r--r--cesar/maximus/coreengine/inc/Msg.tpp147
-rw-r--r--cesar/maximus/coreengine/inc/MsgTest.h58
-rw-r--r--cesar/maximus/coreengine/inc/StaTest.h54
-rw-r--r--cesar/maximus/coreengine/src/CoreEngine.cpp293
-rw-r--r--cesar/maximus/coreengine/src/CoreEngineTest.cpp71
-rw-r--r--cesar/maximus/coreengine/src/Maximus.cpp1348
-rw-r--r--cesar/maximus/coreengine/src/MaximusTest.cpp505
-rw-r--r--cesar/maximus/coreengine/src/Msg.cpp544
-rw-r--r--cesar/maximus/coreengine/src/MsgTest.cpp302
-rw-r--r--cesar/maximus/coreengine/src/Sta.cpp264
-rw-r--r--cesar/maximus/coreengine/src/StaTest.cpp184
-rw-r--r--cesar/maximus/doc/fulminata_maximus_architecture.xmi6863
-rw-r--r--cesar/maximus/doc/fulminata_maximus_user_guide.xmi950
-rw-r--r--cesar/maximus/ethernet/Module5
-rw-r--r--cesar/maximus/ethernet/inc/EtherSciMsg.h213
-rw-r--r--cesar/maximus/ethernet/inc/EtherSciMsgTest.h58
-rw-r--r--cesar/maximus/ethernet/inc/EthernetProcessor.h169
-rw-r--r--cesar/maximus/ethernet/inc/EthernetProcessorTest.h44
-rw-r--r--cesar/maximus/ethernet/inc/IEthernet.h105
-rw-r--r--cesar/maximus/ethernet/src/EtherSciMsg.cpp335
-rw-r--r--cesar/maximus/ethernet/src/EtherSciMsgTest.cpp215
-rw-r--r--cesar/maximus/ethernet/src/EthernetProcessor.cpp305
-rw-r--r--cesar/maximus/ethernet/src/EthernetProcessorTest.cpp139
-rw-r--r--cesar/maximus/functioncall/Module5
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallManager.h147
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallManagerTest.h43
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallParameter.h167
-rw-r--r--cesar/maximus/functioncall/inc/FunctionCallParameterTest.h40
-rw-r--r--cesar/maximus/functioncall/inc/FunctionSciMsg.h332
-rw-r--r--cesar/maximus/functioncall/inc/FunctionSciMsgTest.h44
-rw-r--r--cesar/maximus/functioncall/inc/IFunctionCall.h116
-rw-r--r--cesar/maximus/functioncall/inc/IFunctionCallTest.h34
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallManager.cpp329
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp128
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallParameter.cpp280
-rw-r--r--cesar/maximus/functioncall/src/FunctionCallParameterTest.cpp163
-rw-r--r--cesar/maximus/functioncall/src/FunctionSciMsg.cpp904
-rw-r--r--cesar/maximus/functioncall/src/FunctionSciMsgTest.cpp225
-rw-r--r--cesar/maximus/functioncall/src/IFunctionCallTest.cpp89
-rw-r--r--cesar/maximus/interface/Config1
-rw-r--r--cesar/maximus/interface/Module3
-rw-r--r--cesar/maximus/interface/inc/Maximus.h219
-rw-r--r--cesar/maximus/interface/inc/MaximusCallBack.h41
-rw-r--r--cesar/maximus/interface/maximus.h18
-rw-r--r--cesar/maximus/interface/msg/Module1
-rw-r--r--cesar/maximus/interface/msg/inc/FunctionCallParameter.h87
-rw-r--r--cesar/maximus/interface/msg/inc/MsgFunctionCall.h166
-rw-r--r--cesar/maximus/interface/msg/inc/MsgMpdu.h129
-rw-r--r--cesar/maximus/interface/msg/inc/templates.h57
-rw-r--r--cesar/maximus/interface/msg/msg.h19
-rw-r--r--cesar/maximus/interface/msg/src/FunctionCallParameter.cpp140
-rw-r--r--cesar/maximus/interface/msg/src/MsgFunctionCall.cpp663
-rw-r--r--cesar/maximus/interface/msg/src/MsgMpdu.cpp171
-rw-r--r--cesar/maximus/interface/src/Maximus.cpp1577
-rw-r--r--cesar/maximus/interface/station/Config1
-rw-r--r--cesar/maximus/interface/station/Module1
-rw-r--r--cesar/maximus/interface/station/inc/Station.h151
-rw-r--r--cesar/maximus/interface/station/src/Station.cpp395
-rw-r--r--cesar/maximus/interface/station/station.h21
-rw-r--r--cesar/maximus/lib/test/Module1
-rw-r--r--cesar/maximus/lib/test/src/main.cpp49
-rw-r--r--cesar/maximus/networkclock/Module5
-rw-r--r--cesar/maximus/networkclock/inc/ClockSciMsg.h212
-rw-r--r--cesar/maximus/networkclock/inc/INetworkClock.h104
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvt.h184
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtList.h171
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h40
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtTest.h34
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockProcessor.h238
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h64
-rw-r--r--cesar/maximus/networkclock/src/ClockSciMsg.cpp407
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvt.cpp273
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvtList.cpp331
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvtListTest.cpp261
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockEvtTest.cpp45
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockProcessor.cpp537
-rw-r--r--cesar/maximus/networkclock/src/NetworkClockProcessorTest.cpp401
-rw-r--r--cesar/maximus/phy/Module5
-rw-r--r--cesar/maximus/phy/inc/IPhy.h234
-rw-r--r--cesar/maximus/phy/inc/PhyProcessor.h512
-rw-r--r--cesar/maximus/phy/inc/PhyProcessorTest.h74
-rw-r--r--cesar/maximus/phy/inc/PhySciMsg.h524
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgFc.h148
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgFcTest.h42
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgMpdu.h303
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgMpduTest.h48
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgNoise.h87
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgNoiseTest.h38
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgPre.h116
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgPreTest.h38
-rw-r--r--cesar/maximus/phy/inc/PhySciMsgTest.h38
-rw-r--r--cesar/maximus/phy/src/PhyProcessor.cpp1533
-rw-r--r--cesar/maximus/phy/src/PhyProcessorTest.cpp583
-rw-r--r--cesar/maximus/phy/src/PhySciMsg.cpp956
-rw-r--r--cesar/maximus/phy/src/PhySciMsgFc.cpp189
-rw-r--r--cesar/maximus/phy/src/PhySciMsgFcTest.cpp131
-rw-r--r--cesar/maximus/phy/src/PhySciMsgMpdu.cpp529
-rw-r--r--cesar/maximus/phy/src/PhySciMsgMpduTest.cpp321
-rw-r--r--cesar/maximus/phy/src/PhySciMsgNoise.cpp86
-rw-r--r--cesar/maximus/phy/src/PhySciMsgNoiseTest.cpp64
-rw-r--r--cesar/maximus/phy/src/PhySciMsgPre.cpp124
-rw-r--r--cesar/maximus/phy/src/PhySciMsgPreTest.cpp72
-rw-r--r--cesar/maximus/phy/src/PhySciMsgTest.cpp77
-rw-r--r--cesar/maximus/processors/Module3
-rw-r--r--cesar/maximus/processors/inc/ClockProcessor.h47
-rw-r--r--cesar/maximus/processors/inc/EthernetProcessor.h43
-rw-r--r--cesar/maximus/processors/inc/FunctionCallProcessor.h54
-rw-r--r--cesar/maximus/processors/inc/PhyProcessor.h221
-rw-r--r--cesar/maximus/processors/inc/Processor.h52
-rw-r--r--cesar/maximus/processors/inc/SystemProcessor.h46
-rw-r--r--cesar/maximus/processors/processors.h23
-rw-r--r--cesar/maximus/processors/src/ClockProcessor.cpp95
-rw-r--r--cesar/maximus/processors/src/EthernetProcessor.cpp80
-rw-r--r--cesar/maximus/processors/src/FunctionCallProcessor.cpp175
-rw-r--r--cesar/maximus/processors/src/PhyProcessor.cpp762
-rw-r--r--cesar/maximus/processors/src/Processor.cpp31
-rw-r--r--cesar/maximus/processors/src/SystemProcessor.cpp123
-rw-r--r--cesar/maximus/python/Config1
-rw-r--r--cesar/maximus/python/Makefile3
-rw-r--r--cesar/maximus/python/boost/Module1
-rw-r--r--cesar/maximus/python/boost/inc/interface.h27
-rw-r--r--cesar/maximus/python/boost/inc/maximus.h18
-rw-r--r--cesar/maximus/python/boost/inc/msg.h18
-rw-r--r--cesar/maximus/python/boost/inc/sta.h18
-rw-r--r--cesar/maximus/python/boost/src/interface.cpp31
-rw-r--r--cesar/maximus/python/boost/src/maximus.cpp87
-rw-r--r--cesar/maximus/python/boost/src/msg.cpp62
-rw-r--r--cesar/maximus/python/boost/src/sta.cpp30
-rwxr-xr-xcesar/maximus/python/doc/fulminata_maximus_scenario_engine.xmi1386
-rw-r--r--cesar/maximus/python/lib/cesar/maximus_dur.py40
-rw-r--r--cesar/maximus/python/maximus/station/sta.py148
-rw-r--r--cesar/maximus/python/src/interface_module.cpp881
-rw-r--r--cesar/maximus/python/utest/Makefile9
-rw-r--r--cesar/maximus/python/utest/prototest/fcall/Config (renamed from cesar/maximus/prototest/fcall/Config)0
-rw-r--r--cesar/maximus/python/utest/prototest/fcall/Makefile (renamed from cesar/maximus/prototest/fcall/Makefile)2
-rw-r--r--cesar/maximus/python/utest/prototest/fcall/ecos.ecc.sh (renamed from cesar/maximus/prototest/fcall/ecos.ecc.sh)0
-rw-r--r--cesar/maximus/python/utest/prototest/fcall/inc/syscall.h (renamed from cesar/maximus/prototest/fcall/inc/syscall.h)2
-rw-r--r--cesar/maximus/python/utest/prototest/fcall/src/test_fcall.c (renamed from cesar/maximus/prototest/fcall/src/test_fcall.c)42
-rw-r--r--cesar/maximus/python/utest/py/memory.py79
-rw-r--r--cesar/maximus/python/utest/script_1/script_example.py (renamed from cesar/maximus/python/py/script_example.py)22
-rw-r--r--cesar/maximus/python/utest/script_1/test_cb.py (renamed from cesar/maximus/python/py/test_cb.py)5
-rw-r--r--cesar/maximus/python/utest/script_1/test_ether.py (renamed from cesar/maximus/python/py/test_ether.py)5
-rw-r--r--cesar/maximus/python/utest/script_1/test_false_alarm.py (renamed from cesar/maximus/python/py/test_false_alarm.py)43
-rw-r--r--cesar/maximus/python/utest/script_1/test_log.py (renamed from cesar/maximus/python/py/test_log.py)5
-rw-r--r--cesar/maximus/python/utest/script_1/test_proto.py (renamed from cesar/maximus/python/py/test_proto.py)8
-rw-r--r--cesar/maximus/python/utest/script_1/test_proto_register.py (renamed from cesar/maximus/python/py/test_proto_register.py)3
-rw-r--r--cesar/maximus/python/utest/script_1/test_send_mpdu.py (renamed from cesar/maximus/python/py/test_send_mpdu.py)5
-rw-r--r--cesar/maximus/python/utest/script_1/test_send_noise.py (renamed from cesar/maximus/python/py/test_send_noise.py)8
-rw-r--r--cesar/maximus/python/utest/script_1/test_tx_rx.py (renamed from cesar/maximus/python/py/test_tx_rx.py)6
-rw-r--r--cesar/maximus/python/utest/script_2/internal.conf (renamed from cesar/maximus/python/test/internal.conf)0
-rw-r--r--cesar/maximus/python/utest/script_2/internal_1.conf (renamed from cesar/maximus/python/test/internal_1.conf)0
-rw-r--r--cesar/maximus/python/utest/script_2/internal_2.conf (renamed from cesar/maximus/python/test/internal_2.conf)0
-rw-r--r--cesar/maximus/python/utest/script_2/internal_3.conf (renamed from cesar/maximus/python/test/internal_3.conf)0
-rwxr-xr-xcesar/maximus/python/utest/script_2/startup.py (renamed from cesar/maximus/python/test/startup.py)4
-rw-r--r--cesar/maximus/python/utest/script_2/test.txt (renamed from cesar/maximus/python/test/test.txt)0
-rw-r--r--cesar/maximus/python/utest/script_2/test_channel.py (renamed from cesar/maximus/python/test/test_channel.py)25
-rw-r--r--cesar/maximus/python/utest/script_2/test_cli.py (renamed from cesar/maximus/python/test/test_cli.py)0
-rw-r--r--cesar/maximus/python/utest/script_2/test_ethernet.py (renamed from cesar/maximus/python/test/test_ethernet.py)34
-rw-r--r--cesar/maximus/python/utest/script_2/test_fsm.py (renamed from cesar/maximus/python/test/test_fsm.py)0
-rwxr-xr-x[-rw-r--r--]cesar/maximus/python/utest/script_2/test_interface.py (renamed from cesar/maximus/python/test/test_interface.py)226
-rw-r--r--cesar/maximus/python/utest/script_2/test_lib_cesar.py (renamed from cesar/maximus/python/test/test_lib_cesar.py)5
-rw-r--r--cesar/maximus/python/utest/script_2/test_lib_proto.py (renamed from cesar/maximus/python/test/test_lib_proto.py)107
-rw-r--r--cesar/maximus/python/utest/script_2/test_macframe.py (renamed from cesar/maximus/python/test/test_macframe.py)23
-rw-r--r--cesar/maximus/python/utest/script_2/test_maximus.py (renamed from cesar/maximus/python/test/test_maximus.py)0
-rw-r--r--cesar/maximus/python/utest/script_2/test_mme.py (renamed from cesar/maximus/python/test/test_mme.py)6
-rw-r--r--cesar/maximus/python/utest/script_2/test_result.py (renamed from cesar/maximus/python/test/test_result.py)0
-rw-r--r--cesar/maximus/python/utest/script_2/test_simu.py (renamed from cesar/maximus/python/test/test_simu.py)1
-rw-r--r--cesar/maximus/python/utest/script_2/test_station.py (renamed from cesar/maximus/python/test/test_station.py)44
-rw-r--r--cesar/maximus/python/utest/script_2/test_utils.py (renamed from cesar/maximus/python/test/test_utils.py)0
-rw-r--r--cesar/maximus/python/utest/stationtest/Config6
-rw-r--r--cesar/maximus/python/utest/stationtest/Makefile (renamed from cesar/maximus/stationtest/Makefile)2
-rw-r--r--cesar/maximus/python/utest/stationtest/ecos.ecc.sh (renamed from cesar/maximus/stationtest/ecos.ecc.sh)0
-rw-r--r--cesar/maximus/python/utest/stationtest/src/exception.c (renamed from cesar/maximus/stationtest/src/exception.c)6
-rw-r--r--cesar/maximus/python/utest/stationtest/src/hello_world.c (renamed from cesar/maximus/stationtest/src/hello_world.c)4
-rw-r--r--cesar/maximus/python/utest/stationtest/src/main_example.c (renamed from cesar/maximus/stationtest/src/main_example.c)73
-rw-r--r--cesar/maximus/python/utest/stationtest/src/one_thread.c (renamed from cesar/maximus/stationtest/src/one_thread.c)4
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_cb.c (renamed from cesar/maximus/stationtest/src/test_cb.c)6
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_ether.c (renamed from cesar/maximus/stationtest/src/test_ether.c)10
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_false_alarm.c (renamed from cesar/maximus/stationtest/src/test_false_alarm.c)12
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_lib_cesar.c (renamed from cesar/maximus/stationtest/src/test_lib_cesar.c)6
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_log.c (renamed from cesar/maximus/stationtest/src/test_log.c)4
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_send.c (renamed from cesar/maximus/stationtest/src/test_send.c)16
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_station.c (renamed from cesar/maximus/stationtest/src/test_station.c)6
-rw-r--r--cesar/maximus/python/utest/stationtest/src/test_tx_rx.c (renamed from cesar/maximus/stationtest/src/test_tx_rx.c)10
-rw-r--r--cesar/maximus/python/utest/stationtest/src/threaddelay.c (renamed from cesar/maximus/stationtest/src/threaddelay.c)2
-rwxr-xr-xcesar/maximus/run_tests16
-rw-r--r--cesar/maximus/scheduler/Config1
-rw-r--r--cesar/maximus/scheduler/Module1
-rw-r--r--cesar/maximus/scheduler/inc/Scheduler.h96
-rw-r--r--cesar/maximus/scheduler/inc/SchedulerEvent.h80
-rw-r--r--cesar/maximus/scheduler/scheduler.h19
-rw-r--r--cesar/maximus/scheduler/src/Scheduler.cpp299
-rw-r--r--cesar/maximus/scheduler/src/SchedulerEvent.cpp30
-rw-r--r--cesar/maximus/scheduler/utest/Makefile19
-rw-r--r--cesar/maximus/scheduler/utest/inc/EventExpected.h79
-rw-r--r--cesar/maximus/scheduler/utest/inc/TestScheduler.h60
-rw-r--r--cesar/maximus/scheduler/utest/inc/fake_Maximus.h36
-rw-r--r--cesar/maximus/scheduler/utest/src/EventExpected.cpp32
-rw-r--r--cesar/maximus/scheduler/utest/src/TestScheduler.cpp298
-rw-r--r--cesar/maximus/scheduler/utest/src/fake_ClockProcessor.cpp56
-rw-r--r--cesar/maximus/scheduler/utest/src/fake_PhyProcessor.cpp202
-rw-r--r--cesar/maximus/scheduler/utest/src/fake_SciServer.cpp70
-rw-r--r--cesar/maximus/sci/Module10
-rw-r--r--cesar/maximus/sci/inc/ClockSciMsg.h87
-rw-r--r--cesar/maximus/sci/inc/EtherSciMsg.h79
-rw-r--r--cesar/maximus/sci/inc/FunctionSciMsg.h94
-rw-r--r--cesar/maximus/sci/inc/ISci.h143
-rw-r--r--cesar/maximus/sci/inc/PhySciMsg.h232
-rw-r--r--cesar/maximus/sci/inc/SciMsg.h392
-rw-r--r--cesar/maximus/sci/inc/SciMsgTest.h50
-rw-r--r--cesar/maximus/sci/inc/SciServer.h293
-rw-r--r--cesar/maximus/sci/inc/SciServerTest.h62
-rw-r--r--cesar/maximus/sci/inc/SystemSciMsg.h75
-rw-r--r--cesar/maximus/sci/sci_msg.h26
-rw-r--r--cesar/maximus/sci/src/ClockSciMsg.cpp121
-rw-r--r--cesar/maximus/sci/src/EtherSciMsg.cpp100
-rw-r--r--cesar/maximus/sci/src/FunctionSciMsg.cpp121
-rw-r--r--cesar/maximus/sci/src/PhySciMsg.cpp311
-rw-r--r--cesar/maximus/sci/src/SciMsg.cpp863
-rw-r--r--cesar/maximus/sci/src/SciMsgTest.cpp129
-rw-r--r--cesar/maximus/sci/src/SciServer.cpp1196
-rw-r--r--cesar/maximus/sci/src/SciServerTest.cpp509
-rw-r--r--cesar/maximus/sci/src/SystemSciMsg.cpp89
-rw-r--r--cesar/maximus/sci/utest/scimsg/Makefile23
-rw-r--r--cesar/maximus/sci/utest/scimsg/inc/TestClock.h52
-rw-r--r--cesar/maximus/sci/utest/scimsg/inc/TestEther.h50
-rw-r--r--cesar/maximus/sci/utest/scimsg/inc/TestFunctionCall.h51
-rw-r--r--cesar/maximus/sci/utest/scimsg/inc/TestPhy.h60
-rw-r--r--cesar/maximus/sci/utest/scimsg/inc/TestSystem.h50
-rw-r--r--cesar/maximus/sci/utest/scimsg/src/TestClock.cpp162
-rw-r--r--cesar/maximus/sci/utest/scimsg/src/TestEther.cpp161
-rw-r--r--cesar/maximus/sci/utest/scimsg/src/TestFunctionCall.cpp169
-rw-r--r--cesar/maximus/sci/utest/scimsg/src/TestPhy.cpp270
-rw-r--r--cesar/maximus/sci/utest/scimsg/src/TestSystem.cpp161
-rw-r--r--cesar/maximus/sci/utest/scimsg/src/fake_SciServer.cpp72
-rw-r--r--cesar/maximus/sci/utest/server/Makefile20
-rw-r--r--cesar/maximus/sci/utest/server/inc/PipoProcessor.h40
-rw-r--r--cesar/maximus/sci/utest/server/inc/PipoSciMsg.h40
-rw-r--r--cesar/maximus/sci/utest/server/inc/TestSciServer.h40
-rw-r--r--cesar/maximus/sci/utest/server/inc/fake_Maximus.h36
-rw-r--r--cesar/maximus/sci/utest/server/src/PipoProcessor.cpp69
-rw-r--r--cesar/maximus/sci/utest/server/src/PipoSciMsg.cpp44
-rw-r--r--cesar/maximus/sci/utest/server/src/TestSciServer.cpp103
-rw-r--r--cesar/maximus/sci/utest/server/src/fake_Station.cpp173
-rw-r--r--cesar/maximus/stationtest/Config2
-rw-r--r--cesar/maximus/system/Module5
-rw-r--r--cesar/maximus/system/inc/ISystem.h169
-rw-r--r--cesar/maximus/system/inc/Station.h254
-rw-r--r--cesar/maximus/system/inc/StationConfiguration.h130
-rw-r--r--cesar/maximus/system/inc/StationConfigurationTest.h34
-rw-r--r--cesar/maximus/system/inc/StationTest.h38
-rw-r--r--cesar/maximus/system/inc/SystemManager.h239
-rw-r--r--cesar/maximus/system/inc/SystemManagerTest.h54
-rw-r--r--cesar/maximus/system/inc/SystemSciMsg.h170
-rw-r--r--cesar/maximus/system/inc/SystemSciMsgTest.h38
-rw-r--r--cesar/maximus/system/src/Station.cpp628
-rw-r--r--cesar/maximus/system/src/StationConfiguration.cpp141
-rw-r--r--cesar/maximus/system/src/StationConfigurationTest.cpp51
-rw-r--r--cesar/maximus/system/src/StationTest.cpp95
-rw-r--r--cesar/maximus/system/src/SystemManager.cpp575
-rw-r--r--cesar/maximus/system/src/SystemManagerTest.cpp273
-rw-r--r--cesar/maximus/system/src/SystemSciMsg.cpp291
-rw-r--r--cesar/maximus/system/src/SystemSciMsgTest.cpp108
-rwxr-xr-xcesar/maximus/test/test.sh51
-rwxr-xr-xcesar/maximus/test/test_python.sh37
-rw-r--r--cesar/maximus/unittest/Makefile12
-rw-r--r--cesar/maximus/unittest/src/main.cpp99
-rw-r--r--cesar/maximus/usertest/Makefile7
-rw-r--r--cesar/maximus/usertest/src/main_example.cpp166
-rw-r--r--cesar/maximus/utils/Config1
-rw-r--r--cesar/maximus/utils/Module4
-rw-r--r--cesar/maximus/utils/inc/Error.h67
-rw-r--r--cesar/maximus/utils/inc/ErrorTest.h34
-rw-r--r--cesar/maximus/utils/inc/Logger.h220
-rw-r--r--cesar/maximus/utils/inc/LoggerStream.h10
-rw-r--r--cesar/maximus/utils/inc/LoggerTest.h34
-rw-r--r--cesar/maximus/utils/src/Error.cpp59
-rw-r--r--cesar/maximus/utils/src/ErrorTest.cpp45
-rw-r--r--cesar/maximus/utils/src/Logger.cpp111
-rw-r--r--cesar/maximus/utils/src/LoggerTest.cpp38
316 files changed, 13939 insertions, 41324 deletions
diff --git a/cesar/maximus/Config b/cesar/maximus/Config
deleted file mode 100644
index 6709712807..0000000000
--- a/cesar/maximus/Config
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_LOG = n \ No newline at end of file
diff --git a/cesar/maximus/Module b/cesar/maximus/Module
index a4584e7ce9..527bb8e454 100644
--- a/cesar/maximus/Module
+++ b/cesar/maximus/Module
@@ -1,6 +1,7 @@
-MODULES := maximus/utils maximus/functioncall maximus/channel \
- maximus/networkclock maximus/phy maximus/sci maximus/system \
- maximus/coreengine maximus/ethernet \
+MODULES := maximus/utils maximus/sci maximus/processors \
+ maximus/interface \
+ maximus/channel \
+ maximus/scheduler \
hal/phy/maximus/dur
-HOST_INCLUDES += maximus/common/interfaces maximus/common/types
+
EXTRA_HOST_LDLIBS += -lpthread
diff --git a/cesar/maximus/channel/Module b/cesar/maximus/channel/Module
index 132955f88e..2e56eaee12 100644
--- a/cesar/maximus/channel/Module
+++ b/cesar/maximus/channel/Module
@@ -1,5 +1 @@
SOURCES := ChannelComputer.cpp ChannelSettings.cpp ChannelMapping.cpp ChannelPoint.cpp
-ifdef UNITTEST
-SOURCES += ChannelComputerTest.cpp ChannelSettingsTest.cpp ChannelMappingTest.cpp ChannelPointTest.cpp
-endif
-HOST_INCLUDES += maximus/channel/inc
diff --git a/cesar/maximus/channel/inc/ChannelComputer.h b/cesar/maximus/channel/inc/ChannelComputer.h
index 5fde2b5a0b..25b50d2998 100644
--- a/cesar/maximus/channel/inc/ChannelComputer.h
+++ b/cesar/maximus/channel/inc/ChannelComputer.h
@@ -1,324 +1,251 @@
-/************************************************************************
- ChannelComputer.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelComputer.h
-**************************************************************************/
-
-#ifndef CHANNELCOMPUTER_H
-#define CHANNELCOMPUTER_H
-
-#include "IChannel.h"
-#include "SystemManager.h" // for 'StationsList'
-
-#include "hal/phy/defs.h" // for 'PHY_CARRIER_NB'
-#include "channel_types.h" // for 'MAXIMUS_CHANNEL_MOD_NB'
+#ifndef maximus_channel_inc_channelcomputer_h
+#define maximus_channel_inc_channelcomputer_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/channel/inc/ChannelComputer.h
+ * \ingroup maximus_channel
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/processors/processors.h"
+#include "maximus/interface/station/station.h"
+#include "hal/phy/defs.h"
#include <map>
-#include <boost/random/mersenne_twister.hpp> // for random
+#include <boost/random/mersenne_twister.hpp>
+#include <stdint.h>
+#include <vector>
-class IPhy;
-class PhySciMsgNoise;
+class PhySciMsg;
class ChannelSettings;
-class PhySciMsgMpdu;
class ChannelPoint;
-struct Channel_Settings_Key
+struct Channel_Settings_Key
{
- Sci_Msg_Station_Id tx_station_id;
- Sci_Msg_Station_Id rx_station_id;
+ Sci_Msg_Station_Id tx_station_id;
+ Sci_Msg_Station_Id rx_station_id;
};
struct ltkey
{
- bool operator()(const Channel_Settings_Key & key1, const Channel_Settings_Key & key2) const
- {
- if (key1.tx_station_id != key2.tx_station_id)
+ bool operator()(const Channel_Settings_Key & key1, const Channel_Settings_Key & key2) const
{
- return key1.tx_station_id < key2.tx_station_id;
+ if (key1.tx_station_id != key2.tx_station_id)
+ {
+ return key1.tx_station_id < key2.tx_station_id;
+ }
+ else
+ {
+ return key1.rx_station_id < key2.rx_station_id;
+ }
}
- else
- {
- return key1.rx_station_id < key2.rx_station_id;
- }
- }
};
typedef std::map<const Channel_Settings_Key, ChannelSettings *, ltkey> ChannelSettingsList;
-/**
- * class ChannelComputer
- */
-
-class ChannelComputer : public IChannel
+class ChannelComputer
{
-
-public:
-
- // public attributes
- //
-
private:
- // private attributes
- //
-
- boost::mt19937 mEngine; // for random
+ boost::mt19937 mEngine; // for random
- static unsigned short int mNumberOfCopiesArray[PHY_MOD_ROBO_NB];
- static float mPowerScaleArray[MAXIMUS_CHANNEL_MOD_NB];
- uint8_t * mpTonemask;
- StationsList * mpListOfStations;
- ChannelSettingsList mListOfChannelSettings;
- unsigned int mBeaconPeriod;
+ static unsigned short int mNumberOfCopiesArray[PHY_MOD_ROBO_NB];
+ static float mPowerScaleArray[MAXIMUS_CHANNEL_MOD_NB];
+ uint8_t * mpTonemask;
+ stations_list_t *mpListOfStations;
+ ChannelSettingsList mListOfChannelSettings;
+ unsigned int mBeaconPeriod;
-protected:
-
- // protected attributes
- //
-
public:
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- ChannelComputer ( IPhy * p_phy, ISystem * p_system );
-
- /**
- * Empty Destructor
- */
- virtual ~ChannelComputer ( );
-
- // public methods
- //
-
- /**
- * Duplicate the MPDU payload.
- * @param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload
- * @return bool
- */
- bool duplicateMpduPayload ( PhySciMsgMpdu & mpdu );
-
- /**
- * Compute PB measurement and NOISE.
- * @param pb_measurement_array the PB measurement to fill in (for all PBs composing the MPDU)
- * @param noise the PHY SCI message NOISE to fill in
- * @param pb_header_array the PB header of each PB composing the MPDU
- * @param mpdu a PHY SCI message MPDU that contains the duplicated MPDU payload
- * @param tx_station_id the ID of the transmitting station
- * @param rx_station_id the ID of the destination station
- * @param current_tick the current Network Clock tick
- * @return bool
- */
- bool addPerturbation ( uint32_t * pb_measurement_array,
- PhySciMsgNoise & noise,
- const uint32_t * pb_header_array,
- const PhySciMsgMpdu & mpdu,
- const Sci_Msg_Station_Id tx_station_id,
- const Sci_Msg_Station_Id rx_station_id,
- const Network_Clock_Tick current_tick );
-
- /**
- * Add Channel Settings to the list.
- * Called when a station is created => create its associated Channel Settings.
- * @return bool
- */
- bool addChannelSettings ( const Sci_Msg_Station_Id created_station_id );
-
- /**
- * Find Channel Settings.
- * @param tx_station_id the ID of the transmitting station
- * @param rx_station_id the ID of the destination station
- * @return a list of Channel Settings
- */
- std::vector<ChannelSettings *> & findChannelSettings ( const Sci_Msg_Station_Id tx_station_id,
- const Sci_Msg_Station_Id rx_station_id,
- const bool both_directions );
-
- /**
- * Called when the PHY processor receives a preamble.
- * @param current_tick the current Network Clock tick
- * @param tx_station_id the ID of the transmitting station
- * @return bool
- */
- bool receivePre ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick );
-
- /**
- * Called when the PHY processor receives a frame control.
- * @param current_tick the current Network Clock tick
- * @param tx_station_id the ID of the transmitting station
- * @return bool
- */
- bool receiveFc ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Sets the tonemask.
- * @param p_tonemask the new value of mpTonemask
- * @return bool
- */
- bool setTonemask ( const uint8_t * p_tonemask );
-
- /**
- * Sets the tonemap of the current transmission.
- * @return bool
- * @param tx_station_id the ID of the transmitting station
- * @param length the tonemap length in octets
- * @param p_tonemap the tonemap
- */
- bool setTonemap ( const Sci_Msg_Station_Id tx_station_id,
- const unsigned long length,
- const unsigned char * p_tonemap );
-
- /**
- * Sets the beacon period in ticks 25 MHz.
- * @return bool
- * @param frequency the power-line frequency
- */
- bool setBeaconPeriod ( const float frequency );
-
- // protected attribute accessor methods
- //
+ ChannelComputer (
+ stations_list_t *ref1,
+ PhyProcessor * p_phy,
+ SystemProcessor * p_system);
+
+ virtual ~ChannelComputer ( );
+
+ /**
+ * Compute PB measurement and NOISE.
+ * @param noise the PHY SCI message NOISE to fill in
+ * @param payload a PHY SCI message MPDU
+ * @param tx_station_id the ID of the transmitting station
+ * @param rx_station_id the ID of the destination station
+ * @return bool
+ */
+ bool addPerturbation (PhySciMsg &noise,
+ PhySciMsg &payload,
+ const Sci_Msg_Station_Id tx_station_id,
+ const Sci_Msg_Station_Id rx_station_id);
+
+ /**
+ * Add Channel Settings to the list.
+ * Called when a station is created => create its associated Channel Settings.
+ * @return bool
+ */
+ bool addChannelSettings ( const Sci_Msg_Station_Id created_station_id );
+
+ /**
+ * Find Channel Settings.
+ * @param tx_station_id the ID of the transmitting station
+ * @param rx_station_id the ID of the destination station
+ * @return a list of Channel Settings
+ */
+ std::vector<ChannelSettings *> & findChannelSettings ( const Sci_Msg_Station_Id tx_station_id,
+ const Sci_Msg_Station_Id rx_station_id,
+ const bool both_directions );
+
+ /**
+ * Called when the PHY Processor receives a preamble.
+ * @param current_tick the current Network Clock tick
+ * @param tx_station_id the ID of the transmitting station
+ * @return bool
+ */
+ bool receivePre ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick );
+
+ /**
+ * Called when the PHY Processor receives a frame control.
+ * @param current_tick the current Network Clock tick
+ * @param tx_station_id the ID of the transmitting station
+ * @return bool
+ */
+ bool receiveFc ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick );
+
+ /**
+ * Sets the tonemask.
+ * @param p_tonemask the new value of mpTonemask
+ * @return bool
+ */
+ bool setTonemask ( const uint8_t * p_tonemask );
+
+ /**
+ * Sets the tonemap of the current transmission.
+ * @return bool
+ * @param tx_station_id the ID of the transmitting station
+ * @param length the tonemap length in octets
+ * @param p_tonemap the tonemap
+ */
+ bool setTonemap ( const Sci_Msg_Station_Id tx_station_id,
+ const unsigned long length,
+ const unsigned char * p_tonemap );
+
+ /**
+ * Sets the beacon period in ticks 25 MHz.
+ * @return bool
+ * @param frequency the power-line frequency
+ */
+ bool setBeaconPeriod ( const float frequency );
private:
- // private methods
- //
-
- /**
- * Initializes the Channel Computer class attributes.
- */
- void initAttributes ( );
-
- /**
- * Gets a tonemask value.
- * @param carrier_index
- * @return a boolean value indicating if the requested carrier is enabled or not
- */
- bool getTonemask ( const unsigned short int carrier_index ) const;
-
- /**
- * Update the list of Channel Settings.
- * Called when channel perturbation has to be added.
- * Check if stations have been removed => remove their associated Channel Settings.
- */
- void updateListOfChannelSettings ( );
-
- /**
- * Gets the beacon period in ticks 25 MHz.
- * @return mBeaconPeriod
- */
- unsigned int getBeaconPeriod ( ) const;
-
- /**
- * Calculates number of bits to pad in case of ROBO mode.
- * @param mpdu PB-s to pad
- * @param channel_mod channel modulation
- * @return number of bits to pad
- */
- unsigned int calculateNbPad ( const PhySciMsgMpdu & mpdu, enum Channel_Mod channel_mod ) const;
+ /**
+ * Initializes the Channel Computer class attributes.
+ */
+ void initAttributes ( );
+
+ /**
+ * Gets a tonemask value.
+ * @param carrier_index
+ * @return a boolean value indicating if the requested carrier is enabled or not
+ */
+ bool getTonemask ( const unsigned short int carrier_index ) const;
+
+ /**
+ * Update the list of Channel Settings.
+ * Called when channel perturbation has to be added.
+ * Check if stations have been removed => remove their associated Channel Settings.
+ */
+ void updateListOfChannelSettings ( );
+
+ /**
+ * Gets the beacon period in ticks 25 MHz.
+ * @return mBeaconPeriod
+ */
+ unsigned int getBeaconPeriod ( ) const;
+
+ /**
+ * Calculates number of bits to pad in case of ROBO mode.
+ * @return number of bits to pad
+ */
+ unsigned int calculateNbPad (const size_t pb_size,
+ const Phy_Mod modulation,
+ enum Channel_Mod channel_mod ) const;
protected:
- // protected methods
- // All following protected methods could be declared as private methods,
- // but they are declared as protected methods to be unitarly tested.
- //
-
- /**
- * Gets the sigma factor.
- * @param modulation the tonemap modulation
- * @param snr_in_db the SNR value in dB
- * @return the sigma factor
- */
- double getSigma ( const Channel_Mod modulation, const float snr_in_db ) const;
-
- /**
- * Gets the PowerScale.
- * @param modulation the tonemap modulation
- * @return 1 / (PowerScale^2)
- */
- float getPowerScale ( const Channel_Mod modulation ) const;
-
- /**
- * Gets the linear SNR.
- * @param snr_in_db the SNR value in dB
- * @return the linear SNR value
- */
- double getLinearSnr ( const float snr_in_db ) const;
-
- /**
- * Add noise.
- * @param point the original point coordinates
- * @param sigma the sigma factor
- * @return the noise point coordinates
- */
- const ChannelPoint addNoise ( const ChannelPoint & point, const double sigma );
-
- /**
- * Compute the BER.
- * @param codeA / codeB the 2 codes to compare
- * @return the BER
- */
- unsigned short int computeBer ( const unsigned short int codeA,
- const unsigned short int codeB ) const;
-
- /**
- * Compute the noise.
- * @param pointA / pointB the 2 points coordinates
- * @return the (distance)^2 between the 2 points
- */
- unsigned int computeNoise ( const ChannelPoint & pointA,
- const ChannelPoint & pointB ) const;
-
- /**
- * Compute the FER.
- * @param ber the BER of the current PB
- * @param n the average number of bits coded per carrier on the current PB
- * @param modulation the tonemap modulation
- * @return the FER
- */
- float computeFer ( const unsigned short int ber,
- const unsigned int n,
- const Channel_Mod modulation ) const;
-
- /**
- * Compute the CRC error.
- * @param fer the FER of the current PB
- * @return the CRC error
- */
- bool computeCrcError ( const float fer );
+ // protected methods
+ // All following protected methods could be declared as private methods,
+ // but they are declared as protected methods to be unitarly tested.
+ //
+
+ /**
+ * Gets the sigma factor.
+ * @param modulation the tonemap modulation
+ * @param snr_in_db the SNR value in dB
+ * @return the sigma factor
+ */
+ double getSigma ( const Channel_Mod modulation, const float snr_in_db ) const;
+
+ /**
+ * Gets the PowerScale.
+ * @param modulation the tonemap modulation
+ * @return 1 / (PowerScale^2)
+ */
+ float getPowerScale ( const Channel_Mod modulation ) const;
+
+ /**
+ * Gets the linear SNR.
+ * @param snr_in_db the SNR value in dB
+ * @return the linear SNR value
+ */
+ double getLinearSnr ( const float snr_in_db ) const;
+
+ /**
+ * Add noise.
+ * @param point the original point coordinates
+ * @param sigma the sigma factor
+ * @return the noise point coordinates
+ */
+ const ChannelPoint addNoise ( const ChannelPoint & point, const double sigma );
+
+ /**
+ * Compute the BER.
+ * @param codeA / codeB the 2 codes to compare
+ * @return the BER
+ */
+ unsigned short int computeBer ( const unsigned short int codeA,
+ const unsigned short int codeB ) const;
+
+ /**
+ * Compute the noise.
+ * @param pointA / pointB the 2 points coordinates
+ * @return the (distance)^2 between the 2 points
+ */
+ unsigned int computeNoise ( const ChannelPoint & pointA,
+ const ChannelPoint & pointB ) const;
+
+ /**
+ * Compute the FER.
+ * @param ber the BER of the current PB
+ * @param n the average number of bits coded per carrier on the current PB
+ * @param modulation the tonemap modulation
+ * @return the FER
+ */
+ float computeFer ( const unsigned short int ber,
+ const unsigned int n,
+ const Channel_Mod modulation ) const;
+
+ /**
+ * Compute the CRC error.
+ * @param fer the FER of the current PB
+ * @return the CRC error
+ */
+ bool computeCrcError ( const float fer );
};
-
-#endif /* CHANNELCOMPUTER_H */
+#endif /* maximus_channel_inc_channelcomputer_h */
diff --git a/cesar/maximus/channel/inc/ChannelComputerTest.h b/cesar/maximus/channel/inc/ChannelComputerTest.h
deleted file mode 100644
index e229e4c1ff..0000000000
--- a/cesar/maximus/channel/inc/ChannelComputerTest.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#ifndef CHANNELCOMPUTERTEST_H
-#define CHANNELCOMPUTERTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class Maximus;
-class CoreEngine;
-
-
-class ChannelComputerTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (ChannelComputerTest);
- CPPUNIT_TEST (duplicateMpduPayloadTest);
- CPPUNIT_TEST (addPerturbationTest);
- CPPUNIT_TEST (protectedTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void duplicateMpduPayloadTest (void);
- void addPerturbationTest (void);
- void protectedTest (void);
-
-private:
-
- Maximus * mpMaximus;
- CoreEngine * mpCoreEngine;
-
-};
-
-
-#endif /* CHANNELCOMPUTERTEST_H */
diff --git a/cesar/maximus/channel/inc/ChannelMapping.h b/cesar/maximus/channel/inc/ChannelMapping.h
index 99a353bc4a..21b7be6569 100644
--- a/cesar/maximus/channel/inc/ChannelMapping.h
+++ b/cesar/maximus/channel/inc/ChannelMapping.h
@@ -1,205 +1,142 @@
-/************************************************************************
- ChannelMapping.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelMapping.h
-**************************************************************************/
-
-#ifndef CHANNEL_MAPPING_H
-#define CHANNEL_MAPPING_H
-
-#include "ChannelPoint.h"
-
-#include "channel_types.h" // for 'Channel_Mod'
+#ifndef maximus_channel_inc_channelmapping_h
+#define maximus_channel_inc_channelmapping_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/channel/inc/ChannelMapping.h
+ * \ingroup maximus_channel
+ *
+ */
+#include "maximus/channel/inc/ChannelPoint.h"
+#include "maximus/common/types/channel_types.h" // for 'Channel_Mod'
-/**
- * class ChannelMapping
- */
class ChannelMapping
{
-
-public:
-
- // public attributes
- //
-
private:
- // private attributes
- //
-
- ChannelPoint mPoint;
- unsigned short int mCode;
- static unsigned short int mNbOfBitsArray[MAXIMUS_CHANNEL_MOD_NB];
- static short int mMappingArray[MAXIMUS_CHANNEL_VALUE_MAX_NB][MAXIMUS_CHANNEL_MOD_NB];
+ ChannelPoint mPoint;
+ unsigned short int mCode;
+ static unsigned short int mNbOfBitsArray[MAXIMUS_CHANNEL_MOD_NB];
+ static short int mMappingArray[MAXIMUS_CHANNEL_VALUE_MAX_NB][MAXIMUS_CHANNEL_MOD_NB];
-protected:
-
- // protected attributes
- //
-
public:
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- ChannelMapping ( );
-
- /**
- * Constructors
- */
- ChannelMapping ( const unsigned short int code );
- ChannelMapping ( const ChannelPoint & point );
-
- /**
- * Empty Destructor
- */
- virtual ~ChannelMapping ( );
-
- // public methods
- //
-
- /**
- * Computes the code from the already set I and Q coordinates.
- * @param modulation the used modulation
- * @return bool
- */
- unsigned short int computeCode ( const Channel_Mod modulation );
-
- /**
- * Computes the I and Q coordinates from an already set code.
- * @param modulation the used modulation
- * @return bool
- */
- const ChannelPoint & computePoint ( const Channel_Mod modulation );
-
- /**
- * Retrieve the integer (except for QAM8) I and Q coordinates from the already set I and Q coordinates.
- * @param modulation the used modulation
- * @return bool
- */
- const ChannelPoint retrievePoint ( const Channel_Mod modulation );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Sets the code.
- * @param modulation the used modulation
- * @param mpdu_payload_length the length of the MPDU payload
- * @param p_mpdu_payload pointer to the MPDU payload
- * @param mpdu_index indicates the current index of the MPDU payload (in bits)
- * @return bool (and update mpdu_index)
- */
- bool setCode ( const Channel_Mod modulation,
- const unsigned long mpdu_payload_length,
- const unsigned char * p_mpdu_payload,
- unsigned int & mpdu_index );
-
- /**
- * Sets the code.
- * @param code the new value of mCode
- * @return bool
- */
- bool setCode ( const unsigned short int code );
-
- /**
- * Gets the code.
- * @return mCode
- */
- unsigned short int getCode ( ) const;
-
- /**
- * Sets the coordinates.
- * @param point the new value of mPoint
- * @return bool
- */
- bool setPoint ( const ChannelPoint & point );
-
- /**
- * Gets the Channel Point.
- * @return mPoint
- */
- ChannelPoint & getPoint ( );
-
- /**
- * Sets the I coordinate.
- * @param i the new value of mPoint.I
- * @return bool
- */
- bool setI ( const float i );
-
- /**
- * Gets the I coordinate.
- * @return mPoint.I
- */
- float getI ( );
-
- /**
- * Sets the Q coordinate.
- * @param q mPoint.Q
- * @return bool
- */
- bool setQ ( const float q );
-
- /**
- * Gets the Q coordinate.
- * @return mPoint.Q
- */
- float getQ ( );
-
- /**
- * Gets number of bits coded depending on the channel modulation.
- * @param channel_mod channel modulation
- * @return number of bits
- */
- static unsigned short int getNbOfBitsArray ( enum Channel_Mod channel_mod );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
-protected:
-
- // protected methods
- //
-
+ /**
+ * Empty Constructor
+ */
+ ChannelMapping ( );
+
+ /**
+ * Constructors
+ */
+ ChannelMapping ( const unsigned short int code );
+ ChannelMapping ( const ChannelPoint & point );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~ChannelMapping ( );
+
+ /**
+ * Computes the code from the already set I and Q coordinates.
+ * @param modulation the used modulation
+ * @return bool
+ */
+ unsigned short int computeCode ( const Channel_Mod modulation );
+
+ /**
+ * Computes the I and Q coordinates from an already set code.
+ * @param modulation the used modulation
+ * @return bool
+ */
+ const ChannelPoint & computePoint ( const Channel_Mod modulation );
+
+ /**
+ * Retrieve the integer (except for QAM8) I and Q coordinates from the already set I and Q coordinates.
+ * @param modulation the used modulation
+ * @return bool
+ */
+ const ChannelPoint retrievePoint ( const Channel_Mod modulation );
+
+ /**
+ * Sets the code.
+ * @param modulation the used modulation
+ * @param mpdu_payload_length the length of the MPDU payload
+ * @param p_mpdu_payload pointer to the MPDU payload
+ * @param mpdu_index indicates the current index of the MPDU payload (in bits)
+ * @return bool (and update mpdu_index)
+ */
+ bool setCode ( const Channel_Mod modulation,
+ const unsigned long mpdu_payload_length,
+ const unsigned char * p_mpdu_payload,
+ unsigned int & mpdu_index );
+
+ /**
+ * Sets the code.
+ * @param code the new value of mCode
+ * @return bool
+ */
+ bool setCode ( const unsigned short int code );
+
+ /**
+ * Gets the code.
+ * @return mCode
+ */
+ unsigned short int getCode ( ) const;
+
+ /**
+ * Sets the coordinates.
+ * @param point the new value of mPoint
+ * @return bool
+ */
+ bool setPoint ( const ChannelPoint & point );
+
+ /**
+ * Gets the Channel Point.
+ * @return mPoint
+ */
+ ChannelPoint & getPoint ( );
+
+ /**
+ * Sets the I coordinate.
+ * @param i the new value of mPoint.I
+ * @return bool
+ */
+ bool setI ( const float i );
+
+ /**
+ * Gets the I coordinate.
+ * @return mPoint.I
+ */
+ float getI ( );
+
+ /**
+ * Sets the Q coordinate.
+ * @param q mPoint.Q
+ * @return bool
+ */
+ bool setQ ( const float q );
+
+ /**
+ * Gets the Q coordinate.
+ * @return mPoint.Q
+ */
+ float getQ ( );
+
+ /**
+ * Gets number of bits coded depending on the channel modulation.
+ * @param channel_mod channel modulation
+ * @return number of bits
+ */
+ static unsigned short int getNbOfBitsArray ( enum Channel_Mod channel_mod );
};
-#endif /* CHANNEL_MAPPING_H */
+#endif /* maximus_channel_inc_channelmapping_h */
diff --git a/cesar/maximus/channel/inc/ChannelMappingTest.h b/cesar/maximus/channel/inc/ChannelMappingTest.h
deleted file mode 100644
index 14faf88080..0000000000
--- a/cesar/maximus/channel/inc/ChannelMappingTest.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#ifndef CHANNELMAPPINGTEST_H
-#define CHANNELMAPPINGTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class ChannelMapping;
-
-
-class ChannelMappingTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (ChannelMappingTest);
- CPPUNIT_TEST (setCodeTest);
- CPPUNIT_TEST (computeCodeTest);
- CPPUNIT_TEST (computePointTest);
- CPPUNIT_TEST (retrievePointTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void setCodeTest (void);
- void computeCodeTest (void);
- void computePointTest (void);
- void retrievePointTest (void);
-
-private:
-
- ChannelMapping * mpChannelMapping;
-
-};
-
-
-#endif /* CHANNELMAPPINGTEST_H */
diff --git a/cesar/maximus/channel/inc/ChannelPoint.h b/cesar/maximus/channel/inc/ChannelPoint.h
index 2d6ec72249..ec0c47b67b 100644
--- a/cesar/maximus/channel/inc/ChannelPoint.h
+++ b/cesar/maximus/channel/inc/ChannelPoint.h
@@ -1,126 +1,62 @@
-/************************************************************************
- ChannelPoint.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelPoint.h
-**************************************************************************/
-
-#ifndef CHANNEL_POINT_H
-#define CHANNEL_POINT_H
-
-
+#ifndef maximus_channel_inc_channelpoint_h
+#define maximus_channel_inc_channelpoint_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
/**
- * class ChannelPoint
- */
+ * \file maximus/channel/inc/ChannelPoint.h
+ * \ingroup maximus_channel
+ *
+ */
+
class ChannelPoint
{
public:
- // public attributes
- //
-
- float I; // abscissa
- float Q; // ordinate
-
-private:
-
- // private attributes
- //
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- ChannelPoint ( );
-
- /**
- * Constructor
- */
- ChannelPoint ( float i, const float q );
-
- /**
- * Empty Destructor
- */
- virtual ~ChannelPoint ( );
-
- // public methods
- //
-
- /**
- * Operator =
- * @param channel_point
- * @return ChannelPoint &
- */
- ChannelPoint & operator= ( const ChannelPoint & channel_point );
-
- /**
- * Operator ==
- * @param channel_point
- * @return bool
- */
- bool operator== ( const ChannelPoint & channel_point ) const;
-
- /**
- * Checks Channel Point values ranges,
- * i.e. checks I and Q coordinates validity.
- * @return bool
- */
- bool checkValidity ( );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
-protected:
-
- // protected methods
- //
-
+ float I; // abscissa
+ float Q; // ordinate
+
+ /**
+ * Empty Constructor
+ */
+ ChannelPoint ( );
+
+ /**
+ * Constructor
+ */
+ ChannelPoint ( float i, const float q );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~ChannelPoint ( );
+
+ /**
+ * Operator =
+ * @param channel_point
+ * @return ChannelPoint &
+ */
+ ChannelPoint & operator= ( const ChannelPoint & channel_point );
+
+ /**
+ * Operator ==
+ * @param channel_point
+ * @return bool
+ */
+ bool operator== ( const ChannelPoint & channel_point ) const;
+
+ /**
+ * Checks Channel Point values ranges,
+ * i.e. checks I and Q coordinates validity.
+ * @return bool
+ */
+ bool checkValidity ( );
};
-
-#endif /* CHANNEL_POINT_H */
+#endif /* maximus_channel_inc_channelpoint_h */
diff --git a/cesar/maximus/channel/inc/ChannelPointTest.h b/cesar/maximus/channel/inc/ChannelPointTest.h
deleted file mode 100644
index 11001a3101..0000000000
--- a/cesar/maximus/channel/inc/ChannelPointTest.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef CHANNELPOINTTEST_H
-#define CHANNELPOINTTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class ChannelPoint;
-
-
-class ChannelPointTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (ChannelPointTest);
- CPPUNIT_TEST (checkValidityTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void checkValidityTest (void);
-
-private:
-
- ChannelPoint * mpChannelPoint;
-
-};
-
-
-#endif /* CHANNELPOINTTEST_H */
diff --git a/cesar/maximus/channel/inc/ChannelSettings.h b/cesar/maximus/channel/inc/ChannelSettings.h
index c2f02793fd..45ec851063 100644
--- a/cesar/maximus/channel/inc/ChannelSettings.h
+++ b/cesar/maximus/channel/inc/ChannelSettings.h
@@ -1,204 +1,144 @@
-/************************************************************************
- ChannelSettings.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelSettings.h
-**************************************************************************/
-
-#ifndef CHANNELSETTINGS_H
-#define CHANNELSETTINGS_H
+#ifndef maximus_channel_inc_channelsettings_h
+#define maximus_channel_inc_channelsettings_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/channel/inc/ChannelSettings.h
+ * \ingroup maximus_channel
+ *
+ */
-#include "networkclock_types.h" // for 'Network_Clock_Tick'
-#include "channel_types.h" // for 'Channel_Mod' and 'MAXIMUS_CHANNEL_INTERVAL_MAX_NB'
+#include "maximus/common/types/networkclock_types.h" // for 'Network_Clock_Tick'
+#include "maximus/common/types/channel_types.h" // for 'Channel_Mod' and 'MAXIMUS_CHANNEL_INTERVAL_MAX_NB'
#include "hal/phy/defs.h" // for 'PHY_CARRIER_NB'
-/**
- * class ChannelSettings
- */
-
class ChannelSettings
{
-
-public:
-
- // public attributes
- //
-
private:
- // private attributes
- //
-
- bool mIsConfigured;
- float mSnrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
- Channel_Mod mTonemapArray[PHY_CARRIER_NB];
- Network_Clock_Tick mPreDetectionDate;
- Network_Clock_Tick mFcReceptionDate;
-
-protected:
-
- // protected attributes
- //
+ bool mIsConfigured;
+ float mSnrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
+ Channel_Mod mTonemapArray[PHY_CARRIER_NB];
+ Network_Clock_Tick mPreDetectionDate;
+ Network_Clock_Tick mFcReceptionDate;
public:
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- ChannelSettings ( );
-
- /**
- * Empty Destructor
- */
- virtual ~ChannelSettings ( );
-
- // public methods
- //
-
- /**
- * Gets the first symbol start date (in ticks).
- * @return tick at which the first symbol has started
- */
- Network_Clock_Tick getFirstSymbolStartDate ( ) const;
-
- /**
- * Gets the tonemap modulation.
- * @param carrier the current carrier number
- * @return the tonemap modulation
- */
- Channel_Mod getModulation ( const unsigned int carrier ) const;
-
- /**
- * Gets the SNR in dB.
- * @param interval the current interval number
- * @param carrier the current carrier number
- * @return the SNR in dB
- */
- float getSnr ( const Network_Clock_Tick beacon_period,
- const Network_Clock_Tick symbol_start_date,
- const unsigned int carrier ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Gets if the channel has been configured.
- * @return mIsConfigured
- */
- bool isConfigured ( ) const;
-
- /**
- * Sets the SNR.
- * @param snr_value SNR value in dB
- * @return bool
- */
- bool setSnr ( const float snr_value );
-
- /**
- * Sets the SNR.
- * @param snr array of SNR values in dB
- * @return bool
- */
- bool setSnr ( const float snr_values[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1] );
-
- /**
- * Sets the tonemap of the current transmission.
- * @return bool
- * @param tonemap_array the new value of mTonemapArray
- */
- bool setTonemap ( const Channel_Mod tonemap_array[PHY_CARRIER_NB + 1] );
-
- /**
- * Sets the PRE detection date.
- * @param date tick at which the preamble has been received
- * @return bool
- */
- bool setPreDetectionDate ( const Network_Clock_Tick date );
-
- /**
- * Sets the FC reception date.
- * @param date tick at which the frame control has been received
- * @return bool
- */
- bool setFcReceptionDate ( const Network_Clock_Tick date );
-
- // protected attribute accessor methods
- //
+ /**
+ * Empty Constructor
+ */
+ ChannelSettings ( );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~ChannelSettings ( );
+
+ /**
+ * Gets the first symbol start date (in ticks).
+ * @return tick at which the first symbol has started
+ */
+ Network_Clock_Tick getFirstSymbolStartDate ( ) const;
+
+ /**
+ * Gets the tonemap modulation.
+ * @param carrier the current carrier number
+ * @return the tonemap modulation
+ */
+ Channel_Mod getModulation ( const unsigned int carrier ) const;
+
+ /**
+ * Gets the SNR in dB.
+ * @param interval the current interval number
+ * @param carrier the current carrier number
+ * @return the SNR in dB
+ */
+ float getSnr ( const Network_Clock_Tick beacon_period,
+ const Network_Clock_Tick symbol_start_date,
+ const unsigned int carrier ) const;
+
+ /**
+ * Gets if the channel has been configured.
+ * @return mIsConfigured
+ */
+ bool isConfigured ( ) const;
+
+ /**
+ * Sets the SNR.
+ * @param snr_value SNR value in dB
+ * @return bool
+ */
+ bool setSnr ( const float snr_value );
+
+ /**
+ * Sets the SNR.
+ * @param snr array of SNR values in dB
+ * @return bool
+ */
+ bool setSnr ( const float snr_values[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1] );
+
+ /**
+ * Sets the tonemap of the current transmission.
+ * @return bool
+ * @param tonemap_array the new value of mTonemapArray
+ */
+ bool setTonemap ( const Channel_Mod tonemap_array[PHY_CARRIER_NB + 1] );
+
+ /**
+ * Sets the PRE detection date.
+ * @param date tick at which the preamble has been received
+ * @return bool
+ */
+ bool setPreDetectionDate ( const Network_Clock_Tick date );
+
+ /**
+ * Sets the FC reception date.
+ * @param date tick at which the frame control has been received
+ * @return bool
+ */
+ bool setFcReceptionDate ( const Network_Clock_Tick date );
private:
- // private methods
- //
-
- /**
- * Initializes the Channel Settings class attributes.
- */
- void initAttributes ( );
-
- /**
- * Sets if the channel is configured.
- * @param is_configured the new value of mIsConfigured
- * @return bool
- */
- bool setIsConfigured ( const bool is_configured = true );
-
- /**
- * Gets the PRE detection date.
- * @return mPreDetectionDate tick at which the preamble has been received
- */
- Network_Clock_Tick getPreDetectionDate ( ) const;
-
- /**
- * Gets the FC reception date.
- * @return mFcReceptionDate tick at which the frame control has been received
- */
- Network_Clock_Tick getFcReceptionDate ( ) const;
-
- /**
- * Gets the time interval.
- * @param symbol_start_date the current symbol start date in ticks
- * @return the interval number
- */
- unsigned int getInterval ( const Network_Clock_Tick beacon_period,
- const Network_Clock_Tick symbol_start_date ) const;
-
-protected:
-
- // protected methods
- //
-
+ /**
+ * Initializes the Channel Settings class attributes.
+ */
+ void initAttributes ( );
+
+ /**
+ * Sets if the channel is configured.
+ * @param is_configured the new value of mIsConfigured
+ * @return bool
+ */
+ bool setIsConfigured ( const bool is_configured = true );
+
+ /**
+ * Gets the PRE detection date.
+ * @return mPreDetectionDate tick at which the preamble has been received
+ */
+ Network_Clock_Tick getPreDetectionDate ( ) const;
+
+ /**
+ * Gets the FC reception date.
+ * @return mFcReceptionDate tick at which the frame control has been received
+ */
+ Network_Clock_Tick getFcReceptionDate ( ) const;
+
+ /**
+ * Gets the time interval.
+ * @param symbol_start_date the current symbol start date in ticks
+ * @return the interval number
+ */
+ unsigned int getInterval ( const Network_Clock_Tick beacon_period,
+ const Network_Clock_Tick symbol_start_date ) const;
};
-#endif /* CHANNELSETTINGS_H */
+#endif /* maximus_channel_inc_channelsettings_h */
diff --git a/cesar/maximus/channel/inc/ChannelSettingsTest.h b/cesar/maximus/channel/inc/ChannelSettingsTest.h
deleted file mode 100644
index 1450815fe3..0000000000
--- a/cesar/maximus/channel/inc/ChannelSettingsTest.h
+++ /dev/null
@@ -1,42 +0,0 @@
-
-#ifndef CHANNELSETTINGSTEST_H
-#define CHANNELSETTINGSTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class ChannelSettings;
-
-
-class ChannelSettingsTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (ChannelSettingsTest);
- CPPUNIT_TEST (getFirstSymbolStartDateTest);
- CPPUNIT_TEST (getModulationTest);
- CPPUNIT_TEST (getSnrTest);
- CPPUNIT_TEST (setSnrArrayTest);
- CPPUNIT_TEST (setSnrFloatTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void getFirstSymbolStartDateTest ( );
- void getModulationTest ( );
- void getSnrTest ( );
- void setSnrArrayTest ( );
- void setSnrFloatTest ( );
-
-private:
-
- ChannelSettings * mpChannelSettings;
-
-};
-
-
-#endif /* CHANNELSETTINGSTEST_H */
diff --git a/cesar/maximus/channel/inc/IChannel.h b/cesar/maximus/channel/inc/IChannel.h
deleted file mode 100644
index b485a12e21..0000000000
--- a/cesar/maximus/channel/inc/IChannel.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/************************************************************************
- IChannel.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/IChannel.h
-**************************************************************************/
-
-#ifndef ICHANNEL_H
-#define ICHANNEL_H
-
-#include "sci_types.h" // for 'Sci_Msg_Station_Id'
-#include "networkclock_types.h" // for 'Network_Clock_Tick'
-#include "phy_types.h" // for 'MAC_MAX_PB_PER_MPDU'
-
-#include <stdint.h> // for 'uint8_t' type
-#include <vector>
-
-class PhySciMsgNoise;
-class PhySciMsgMpdu;
-class ChannelSettings;
-
-
-/**
- * class IChannel
- */
-
-class IChannel
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- IChannel ( ) { }
-
- /**
- * Empty Destructor
- */
- virtual ~IChannel ( ) { }
-
- // public methods
- //
-
- /**
- * Duplicate the MPDU payload.
- * @param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload
- * @return bool
- */
- virtual bool duplicateMpduPayload ( PhySciMsgMpdu & mpdu ) = 0;
-
- /**
- * Compute PB measurement and NOISE.
- * @param pb_measurement_array the PB measurement to fill in
- * @param noise the PHY SCI message NOISE to fill in
- * @param pb_header_array the PB header of each PB composing the MPDU
- * @param mpdu a PHY SCI message MPDU that contains the duplicated MPDU payload
- * @param tx_station_id the ID of the transmitting station
- * @param rx_station_id the ID of the destination station
- * @param current_tick the current Network Clock tick
- * @return bool
- */
- virtual bool addPerturbation ( uint32_t * pb_measurement_array,
- PhySciMsgNoise & noise,
- const uint32_t * pb_header_array,
- const PhySciMsgMpdu & mpdu,
- const Sci_Msg_Station_Id tx_station_id,
- const Sci_Msg_Station_Id rx_station_id,
- const Network_Clock_Tick current_tick ) = 0;
-
- /**
- * Add Channel Settings to the list.
- * Called when a station is created => create its associated Channel Settings.
- * @return bool
- */
- virtual bool addChannelSettings ( const Sci_Msg_Station_Id created_station_id ) = 0;
-
- /**
- * Find Channel Settings.
- * @param tx_station_id the ID of the transmitting station
- * @param rx_station_id the ID of the destination station
- * @return a list of Channel Settings
- */
- virtual std::vector<ChannelSettings *> & findChannelSettings ( const Sci_Msg_Station_Id tx_station_id,
- const Sci_Msg_Station_Id rx_station_id,
- const bool both_directions ) = 0;
-
- /**
- * Called when the PHY processor receives a preamble.
- * @param tx_station_id the ID of the transmitting station
- * @param current_tick the current Network Clock tick
- * @return bool
- */
- virtual bool receivePre ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick ) = 0;
-
- /**
- * Called when the PHY processor receives a frame control.
- * @param tx_station_id the ID of the transmitting station
- * @param current_tick the current Network Clock tick
- * @return bool
- */
- virtual bool receiveFc ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick ) = 0;
-
- /**
- * Sets the tonemask.
- * @param p_tonemask the new value of mpTonemask
- * @return bool
- */
- virtual bool setTonemask ( const uint8_t * p_tonemask ) = 0;
-
- /**
- * Sets the tonemap of the current transmission.
- * @return bool
- * @param tx_station_id the ID of the transmitting station
- * @param length the tonemap length in octets
- * @param p_tonemap the tonemap
- */
- virtual bool setTonemap ( const Sci_Msg_Station_Id tx_station_id,
- const unsigned long length,
- const unsigned char * p_tonemap ) = 0;
-
- /**
- * Sets the beacon period in ticks 25 MHz.
- * @return bool
- * @param frequency the power-line frequency
- */
- virtual bool setBeaconPeriod ( const float frequency ) = 0;
-
- /**
- * Gets the beacon period in ticks 25 MHz.
- * @return mBeaconPeriod
- */
- virtual unsigned int getBeaconPeriod ( ) const = 0;
-
-};
-
-
-#endif /* ICHANNEL_H */
diff --git a/cesar/maximus/channel/src/ChannelComputer.cpp b/cesar/maximus/channel/src/ChannelComputer.cpp
index 56a451dec9..2c5adbebab 100644
--- a/cesar/maximus/channel/src/ChannelComputer.cpp
+++ b/cesar/maximus/channel/src/ChannelComputer.cpp
@@ -1,49 +1,31 @@
-/************************************************************************
- ChannelComputer.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/src/ChannelComputer.cpp
-**************************************************************************/
-
-#include "ChannelComputer.h"
-#include "ChannelSettings.h"
-#include "ChannelMapping.h"
-#include "IPhy.h"
-#include "PhySciMsgNoise.h"
-#include "Station.h"
-#include "PhySciMsgMpdu.h"
-
-#include "Error.h"
-#include "Logger.h"
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/channel/src/ChannelComputer.cpp
+ * \ingroup maximus_channel
+ *
+ */
+
+#include "maximus/channel/inc/ChannelComputer.h"
+#include "maximus/channel/inc/ChannelSettings.h"
+#include "maximus/channel/inc/ChannelMapping.h"
+#include "maximus/processors/inc/PhyProcessor.h"
+#include "maximus/sci/inc/PhySciMsg.h"
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/interface/msg/inc/MsgMpdu.h"
+
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
#include "mac/common/timings.h" // for 'MAC_DX417_TCK', 'MAC_DX567_TCK', 'MAC_DX3534_TCK'
#include <cstdlib> // for 'rand()'
#include <netinet/in.h> // for 'htonl()' and 'htons()'
-#include <iomanip> // for 'setfill()' and 'setw()'
#include <math.h> // for 'pow()', 'sqrt()', 'exp()'
#include <boost/random/normal_distribution.hpp>
#include <boost/random/variate_generator.hpp>
@@ -54,483 +36,445 @@ The original location of this file is /home/buret/eclipse/maximus/channel/src/Ch
// Init number of copies array
unsigned short int ChannelComputer::mNumberOfCopiesArray[PHY_MOD_ROBO_NB] = { 4, /* PHY_MOD_ROBO */
- 2, /* PHY_MOD_HS_ROBO */
- 5 }; /* PHY_MOD_MINI_ROBO */
+ 2, /* PHY_MOD_HS_ROBO */
+ 5 }; /* PHY_MOD_MINI_ROBO */
// Table 3-24: Modulation Normalization Scales
-float ChannelComputer::mPowerScaleArray[MAXIMUS_CHANNEL_MOD_NB] = { 0, /* NONE */
- 1, /* BPSK */
- 2, /* QPSK */
- 5 + pow(1.29, 2), /* QAM8 */
- 10, /* QAM16 */
- 42, /* QAM64 */
- 170, /* QAM256 */
- 682 }; /* QAM1024 */
+float ChannelComputer::mPowerScaleArray[MAXIMUS_CHANNEL_MOD_NB] = {
+ 0,
+ 1,
+ 2,
+ 5 + (float) pow(1.29, 2),
+ 10,
+ 42,
+ 170,
+ 682
+};
+
+ChannelComputer::ChannelComputer (stations_list_t *ref1,
+ PhyProcessor * p_phy,
+ SystemProcessor * p_system):
+ mpTonemask(NULL),
+ mpListOfStations (ref1),
+ mBeaconPeriod(0)
+{
+ logFunction();
-// Constructors/Destructors
-//
+ if ((NULL == p_phy) || (NULL == p_system))
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "PHY and/or System pointers are NULL", errno);
+ }
+ // Register channel to PHY
+ if (!p_phy->setChannel(this))
+ {
+ throw Error(__PRETTY_FUNCTION__, "cannot set channel to PHY");
+ }
-ChannelComputer::ChannelComputer ( IPhy * p_phy, ISystem * p_system ):
-mpTonemask(NULL),
-mpListOfStations(NULL),
-mBeaconPeriod(0)
-{
- logFunction();
-
- if ((NULL == p_phy) || (NULL == p_system))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY and/or System pointers are NULL", errno);
- }
-
- // Register channel to PHY
- if (!p_phy->setChannel(this))
- {
- throw Error(__PRETTY_FUNCTION__, "cannot set channel to PHY");
- }
-
- // Get list of stations
- if (NULL == (mpListOfStations = p_system->getListOfStations()))
- {
- throw Error(__PRETTY_FUNCTION__, "error when getting list of stations");
- }
-
- initAttributes();
+ initAttributes();
}
void ChannelComputer::initAttributes ( )
{
- logFunction();
-
- // Instanciate one ChannelSettings object per channel,
- // i.e. (number of stations * (number of stations - 1)) objects
- for (StationsList::iterator i = mpListOfStations->begin(); i != mpListOfStations->end(); ++i)
- {
- for (StationsList::iterator j = mpListOfStations->begin(); j != mpListOfStations->end(); ++j)
- {
- if ( (NULL == (*i)) || (NULL == (*j)) )
- {
- throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
- }
- else
- {
- Channel_Settings_Key key;
- key.tx_station_id = (*i)->getStationId();
- key.rx_station_id = (*j)->getStationId();
- if (key.tx_station_id != key.rx_station_id)
+ logFunction();
+
+ // Instanciate one ChannelSettings object per channel,
+ // i.e. (number of stations * (number of stations - 1)) objects
+ for (stations_list_t::iterator i = mpListOfStations->begin(); i != mpListOfStations->end(); ++i)
+ {
+ for (stations_list_t::iterator j = mpListOfStations->begin(); j != mpListOfStations->end(); ++j)
{
- mListOfChannelSettings[key] = new ChannelSettings();
+ if ( (NULL == (*i)) || (NULL == (*j)) )
+ {
+ throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
+ }
+ else
+ {
+ Channel_Settings_Key key;
+ key.tx_station_id = (*i)->getStationId();
+ key.rx_station_id = (*j)->getStationId();
+ if (key.tx_station_id != key.rx_station_id)
+ {
+ mListOfChannelSettings[key] = new ChannelSettings();
+ }
+ }
}
- }
}
- }
}
ChannelComputer::~ChannelComputer ( )
{
- logFunction();
-
- mpTonemask = NULL;
- mpListOfStations = NULL;
+ logFunction();
- for (ChannelSettingsList::const_iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
- {
- if (NULL != it->second)
+ for (ChannelSettingsList::const_iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
{
- delete(it->second);
+ if (NULL != it->second)
+ {
+ delete(it->second);
+ }
}
- }
- mListOfChannelSettings.clear();
+ mListOfChannelSettings.clear();
}
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool ChannelComputer::duplicateMpduPayload ( PhySciMsgMpdu & mpdu )
-{
- logFunction();
-
- /* 1. Each PB must be resized to 520 octets (or 136 octets).
- * Add 8 octets for each PB: 4 octets for PB header and 4 octets for ICV (CRC-32). */
- unsigned long duplicatedPbLength = mpdu.getPbSize () + PHY_PB_HDR_SIZE + PHY_ICV_SIZE;
-
- /* 2. Data corresponding to bits added by the FEC processing are included in the MPDU payload. */
- if (PHY_FEC_RATE_1_2 == mpdu.getFecrate())
- {
- duplicatedPbLength *= PHY_FEC_RATE_1_2_RATIO;
- }
- else if (PHY_FEC_RATE_16_21 == mpdu.getFecrate())
- {
- duplicatedPbLength = (unsigned long) (duplicatedPbLength * PHY_FEC_RATE_16_21_RATIO);
- }
-
- /* 3. In case of ROBO mode, duplicate the new MPDU payload by number of copies. */
- if (PHY_MOD_ROBO_NB > mpdu.getMod())
- {
- duplicatedPbLength *= mNumberOfCopiesArray[mpdu.getMod ()];
- }
-
- /* 4. Save the length of a duplicated PB,
- * and calculate total length of the duplicated MPDU payload. */
- mpdu.setDuplicatedPbLength (duplicatedPbLength);
- unsigned long payloadLength = mpdu.getNbOfPbs () * duplicatedPbLength;
-
- unsigned char payload[payloadLength];
- unsigned int l=0;
- for (l=0; l<payloadLength/mpdu.getPayloadLength(); l++)
- {
- memcpy(&payload[l * mpdu.getPayloadLength()], mpdu.getPayload(), mpdu.getPayloadLength());
- }
- memcpy(&payload[l * mpdu.getPayloadLength()], mpdu.getPayload(), payloadLength % mpdu.getPayloadLength());
-
- return mpdu.setMpdu(payloadLength, payload);
-}
-
-
-bool ChannelComputer::addPerturbation ( uint32_t * pb_measurement_array,
- PhySciMsgNoise & noise,
- const uint32_t * pb_header_array,
- const PhySciMsgMpdu & mpdu,
- const Sci_Msg_Station_Id tx_station_id,
- const Sci_Msg_Station_Id rx_station_id,
- const Network_Clock_Tick current_tick )
+bool ChannelComputer::addPerturbation (
+ PhySciMsg &noise,
+ PhySciMsg &payload,
+ const Sci_Msg_Station_Id tx_station_id,
+ const Sci_Msg_Station_Id rx_station_id)
{
- logFunction();
- bool bAddPerturbation = false;
+ logFunction();
+
+ /* Constants used. */
+ const Phy_Mod modulation = payload.get_phy_mod ();
+ const Phy_Mpdu_Format format = payload.get_phy_MpduFormat ();
+ const Phy_Gil gil = payload.get_phy_gil ();
+ const Phy_Nb_Of_Symbols nb_symbols = payload.getNbOfSymbols ();
+ const size_t pb_size = payload.get_phy_PbSize ();
+ const size_t payload_size = payload.get_phy_data_size ();
+ const Phy_Fecrate fec_rate = payload.get_phy_FecRate ();
+ const unsigned char *phy_data_addr = payload.get_phy_data_addr ();
+
+ /* The real output: */
+ uint32_t *pb_measurement_array = payload.get_phy_PbMeasurement ();
+
+ /* frequency_noise + time_noise */
+ unsigned char *data = noise.get_phy_data_addr ();
+ /* XXX TODO : Must be rework */
+ phy_noise_energy_t *noiseData = (phy_noise_energy_t *) (data);
+
+ updateListOfChannelSettings ();
+ Channel_Settings_Key key = { tx_station_id, rx_station_id };
+
+ // If channel from TX station to RX station has not been configured,
+ // send default noise values
+ if ( (0 == mListOfChannelSettings.count (key))
+ || ( (1 == mListOfChannelSettings.count (key))
+ && (NULL != mListOfChannelSettings.find (key)->second)
+ && !mListOfChannelSettings.find(key)->second->isConfigured() ) )
+ {
+ maximus_log (LOG_DEBUG, "PB measurement = ");
- phy_noise_energy_t noiseData[PHY_CARRIER_NB /* frequency_noise */ + MAC_MAX_SYMB_PER_MPDU /* time_noise */];
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ {
+ pb_measurement_array[i] =
+ ((i % 2) << PHY_PB_MEAS_CRC_ERR_OFFSET)
+ | (4 << PHY_PB_MEAS_HALFIT_OFFSET)
+ | (1 << (i % 16));
- updateListOfChannelSettings();
- Channel_Settings_Key key = { tx_station_id, rx_station_id };
+ maximus_log (LOG_DEBUG, " PB " << i << " -> 0x"
+ << std::hex << ntohl (pb_measurement_array[i]));
+ }
- // If channel from TX station to RX station has not been configured,
- // send default noise values
- //
- if ( (0 == mListOfChannelSettings.count(key))
- || ( (1 == mListOfChannelSettings.count(key))
- && (NULL != mListOfChannelSettings.find(key)->second)
- && !mListOfChannelSettings.find(key)->second->isConfigured() ) )
- {
- // Set PB measurement of PHY SCI messages MPDU
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "PB measurement = " << endl;
-#endif /* CONFIG_LOG */
- for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
- {
- *(pb_measurement_array + i) = ((i%2) << PHY_PB_MEAS_CRC_ERR_OFFSET) \
- | (4 << PHY_PB_MEAS_HALFIT_OFFSET) | (1 << (i%16));
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "\tPB " << i << " -> 0x" << setfill('0') << setw(8) << uppercase << hex << ntohl(*(pb_measurement_array + i)) << endl;
-#endif /* CONFIG_LOG */
- }
+ /* Set PHY SCI message NOISE data:
+ * frequency noise & time noise. */
+ for (unsigned int i = 0;
+ i < (MAC_MAX_SYMB_PER_MPDU + PHY_CARRIER_NB);
+ i ++)
+ noiseData[i] = i;
- // Set PHY SCI message NOISE data
- for (unsigned int i=0; i<PHY_CARRIER_NB; i++)
- {
- noiseData[i] = (phy_noise_energy_t)i; // frequency noise
}
- for (unsigned int i=0; i<MAC_MAX_SYMB_PER_MPDU; i++)
+ // If channel from TX station to RX station has been configured,
+ // compute noise values
+ else
{
- noiseData[PHY_CARRIER_NB+i] = (phy_noise_energy_t)(PHY_CARRIER_NB+i); // time noise
- }
+ ChannelSettings * pSettings = mListOfChannelSettings.find(key)->second;
+ if (NULL == pSettings)
+ {
+ throw Error(__PRETTY_FUNCTION__, "channel settings pointer is NULL");
+ }
- // Set PHY SCI message NOISE data length and data
- bAddPerturbation = noise.setSpecializedSciMsgDataLength(PHY_CARRIER_NB*sizeof(phy_noise_energy_t) + MAC_MAX_SYMB_PER_MPDU*sizeof(phy_noise_energy_t));
- bAddPerturbation &= noise.setSpecializedSciMsgData((unsigned char *)noiseData);
- }
+ // Initialize frequency noise, time noise, and PHY SCI message NOISE data
+ unsigned long frequencyNoise[PHY_CARRIER_NB];
+ unsigned long timeNoise[MAC_MAX_SYMB_PER_MPDU];
+ for (int i=0; i<PHY_CARRIER_NB; i++)
+ {
+ frequencyNoise[i]= 0;
+ noiseData[i] = 0;
+ }
+ for (int i=0; i<MAC_MAX_SYMB_PER_MPDU; i++)
+ {
+ timeNoise[i] = 0;
+ noiseData[PHY_CARRIER_NB + i] = 0;
+ }
- // If channel from TX station to RX station has been configured,
- // compute noise values
- //
- else
- {
- ChannelSettings * pSettings = mListOfChannelSettings.find(key)->second;
- if (NULL == pSettings)
- {
- throw Error(__PRETTY_FUNCTION__, "channel settings pointer is NULL");
- }
+ // Initiliaze BER and CRC error
+ unsigned short int ber[MAC_MAX_PB_PER_MPDU];
+ bool crcError[MAC_MAX_PB_PER_MPDU];
+ for (int i=0; i<MAC_MAX_SYMB_PER_MPDU; i++)
+ {
+ ber[i] = 0;
+ crcError[i] = false;
+ }
- // Initialize frequency noise, time noise, and PHY SCI message NOISE data
- unsigned long frequencyNoise[PHY_CARRIER_NB];
- unsigned long timeNoise[MAC_MAX_SYMB_PER_MPDU];
- for (int i=0; i<PHY_CARRIER_NB; i++)
- {
- frequencyNoise[i]= 0;
- noiseData[i] = 0;
- }
- for (int i=0; i<MAC_MAX_SYMB_PER_MPDU; i++)
- {
- timeNoise[i] = 0;
- noiseData[PHY_CARRIER_NB + i] = 0;
- }
+ Network_Clock_Tick currentSymbolStartDate = pSettings->getFirstSymbolStartDate();
+ Channel_Mod currentModulation = MAXIMUS_CHANNEL_MOD_NONE;
+ unsigned short int currentSymbol = 0; /* index of current symbol */
+ unsigned short int currentPb = 0; /* index of current PB */
+ unsigned int currentCarrierNbOfBits = 0; /* number of bits coded on current carrier */
+ unsigned int currentPbNbOfCarriers = 0; /* number of carriers on current PB */
- // Initiliaze BER and CRC error
- unsigned short int ber[MAC_MAX_PB_PER_MPDU];
- bool crcError[MAC_MAX_PB_PER_MPDU];
- for (int i=0; i<MAC_MAX_SYMB_PER_MPDU; i++)
- {
- ber[i] = 0;
- crcError[i] = false;
- }
+ // Set modulation in case of ROBO mode
+ if (PHY_MOD_ROBO_NB > modulation)
+ {
+ // Table 3-18 and Chapter 3.5.6:
+ // For ROBO-AV modulation,
+ // the majority of non-masked carriers are mapped with coherent QPSK modulation
+ currentModulation = MAXIMUS_CHANNEL_MOD_QPSK;
+ }
- Network_Clock_Tick currentSymbolStartDate = pSettings->getFirstSymbolStartDate();
- Channel_Mod currentModulation = MAXIMUS_CHANNEL_MOD_NONE;
- unsigned short int currentSymbol = 0; /* index of current symbol */
- unsigned short int currentPb = 0; /* index of current PB */
- unsigned int currentCarrierNbOfBits = 0; /* number of bits coded on current carrier */
- unsigned int currentPbNbOfCarriers = 0; /* number of carriers on current PB */
+ /* In case of ROBO mode, number of symbols per PB is always an integer.
+ * Add padding bits if it is not the case. */
+ unsigned int nb_pad = calculateNbPad (pb_size,
+ modulation,
+ currentModulation);
+ int padding = -1;
+ bool endOfPb = false;
+ unsigned long raw_pb_length = pb_size + PHY_PB_HDR_SIZE + PHY_ICV_SIZE;
- // Set modulation in case of ROBO mode
- if (PHY_MOD_ROBO_NB > mpdu.getMod())
- {
- // Table 3-18 and Chapter 3.5.6:
- // For ROBO-AV modulation,
- // the majority of non-masked carriers are mapped with coherent QPSK modulation
- currentModulation = MAXIMUS_CHANNEL_MOD_QPSK;
- }
+ switch (fec_rate)
+ {
+ case PHY_FEC_RATE_16_21:
+ raw_pb_length *= PHY_FEC_RATE_16_21_RATIO;
+ break;
- /* In case of ROBO mode, number of symbols per PB is always an integer.
- * Add padding bits if it is not the case. */
- unsigned int nb_pad = calculateNbPad (mpdu, currentModulation);
- int padding = -1;
- bool endOfPb = false;
+ case PHY_FEC_RATE_1_2:
+ raw_pb_length *= PHY_FEC_RATE_1_2_RATIO;
+ break;
- // For all bits
- for (unsigned int mpduIndex = 0; mpduIndex < PHY_BYTES_TO_BITS(mpdu.getPayloadLength ()) ;)
- /* total number of bits read */
- {
- // For each carrier
- for (unsigned short int currentCarrier=0; currentCarrier<PHY_CARRIER_NB; currentCarrier++)
- {
- // Initiliaze number of bits coded on current carrier
- currentCarrierNbOfBits = mpduIndex;
+ default:
+ raw_pb_length = 0;
+ }
- // Update number of carriers on current PB
- currentPbNbOfCarriers++;
+ if (PHY_MOD_ROBO_NB > modulation)
+ raw_pb_length *= mNumberOfCopiesArray[modulation];
- // Find modulation in case of tonemap
- if (PHY_MOD_TM == mpdu.getMod())
+ // For all bits
+ unsigned int mpduIndex = 0;
+ while (mpduIndex < PHY_BYTES_TO_BITS (payload_size))
+ /* total number of bits read */
{
- currentModulation = pSettings->getModulation(currentCarrier);
- }
+ // For each carrier
+ for (unsigned short int currentCarrier=0; currentCarrier<PHY_CARRIER_NB; currentCarrier++)
+ {
+ // Initiliaze number of bits coded on current carrier
+ currentCarrierNbOfBits = mpduIndex;
+
+ // Update number of carriers on current PB
+ currentPbNbOfCarriers++;
+
+ // Find modulation in case of tonemap
+ if (PHY_MOD_TM == modulation)
+ currentModulation = pSettings->getModulation(currentCarrier);
+
+ // Check if carrier is non-masked (i.e. = 0)
+ if (!getTonemask(currentCarrier))
+ {
+ // Calculate sigma factor
+ double sigma = getSigma (currentModulation,
+ // find time interval and SNR value in dB
+ pSettings->getSnr (
+ getBeaconPeriod(),
+ currentSymbolStartDate,
+ currentCarrier));
+
+ // Create a Channel Mapping for P0 / C0
+ ChannelMapping mapping0;
+ // MPDU index is updated
+ mapping0.setCode (currentModulation, payload_size,
+ phy_data_addr, mpduIndex);
+ ChannelPoint P0 = mapping0.computePoint(currentModulation); // get original point coordinates
+ unsigned short int C0 = mapping0.getCode(); // get code
+
+ // Create a Channel Mapping for P1
+ ChannelPoint P1 = addNoise (P0, sigma); // get intermediate noise point coordinates
+ ChannelMapping mapping1 (P1);
+
+ // Create a Channel Mapping for P2 / C2
+ ChannelPoint P2 = mapping1.retrievePoint (currentModulation); // get noise point coordinates
+ ChannelMapping mapping2 (P2);
+ unsigned short int C2 = mapping2.computeCode (currentModulation); // get noise code
+
+ // Calculate BER
+ ber[currentPb] += computeBer (C0, C2);
+
+ // Update number of bits coded on current carrier
+ currentCarrierNbOfBits = mpduIndex - currentCarrierNbOfBits;
+
+ /* Detect end of a PB in the duplicated MPDU. */
+ if (mpduIndex >= (unsigned int) (
+ (currentPb + 1)
+ * PHY_BYTES_TO_BITS (raw_pb_length)))
+ {
+ endOfPb = true;
+ }
+
+ if (endOfPb)
+ {
+ if ((modulation < PHY_MOD_ROBO_NB) && (-1 == padding))
+ {
+ if (mpduIndex >= nb_pad)
+ {
+ /* Rewind mpduIndex to add 'nb_pad' padding bits. */
+ padding = nb_pad;
+ mpduIndex -= nb_pad;
+ }
+ }
+ else if ((modulation < PHY_MOD_ROBO_NB) && (padding != 0))
+ {
+ /* Update the number of bits that are still to pad. */
+ padding -= currentCarrierNbOfBits;
+ }
+ else
+ {
+ if (modulation < PHY_MOD_ROBO_NB)
+ {
+ /* All padding bits have been added. Reset the padding indicator,
+ * and go to the next symbol. */
+ padding = -1;
+ currentCarrier = PHY_CARRIER_NB;
+ }
+
+ /* Now, handle the treatment to apply at the end of each PB. */
+
+ // Calculate FER
+ float fer = computeFer (
+ ber[currentPb],
+ // average number of bits coded per carrier (masked and unmasked) on current PB
+ PHY_BYTES_TO_BITS (pb_size) / currentPbNbOfCarriers,
+ currentModulation);
+
+ // Calculate CRC error
+ crcError[currentPb] = computeCrcError(fer);
+
+ // Update index of current PB
+ currentPb++;
+
+ // Reset number of carriers on current PB
+ currentPbNbOfCarriers = 0;
+
+ endOfPb = false;
+ }
+ }
+
+ // Calculate noise_tmp
+ unsigned int noise_tmp;
+ if (PHY_MPDU_FORMAT_SOUND == format)
+ noise_tmp = computeNoise(P0, P1);
+ else
+ noise_tmp = computeNoise(P1, P2);
+
+ // Update frequency noise (PHY_CARRIER_NB) and time noise (MAC_MAX_SYMB_PER_MPDU)
+ frequencyNoise[currentCarrier] += noise_tmp;
+ timeNoise[currentSymbol] += noise_tmp;
+ }
+ }
- // Check if carrier is non-masked (i.e. = 0)
- if (!getTonemask(currentCarrier))
- {
- // Calculate sigma factor
- double sigma = getSigma(currentModulation,
- // find time interval and SNR value in dB
- pSettings->getSnr(getBeaconPeriod(), currentSymbolStartDate, currentCarrier));
-
- // Create a Channel Mapping for P0 / C0
- ChannelMapping mapping0;
- bAddPerturbation = mapping0.setCode(currentModulation,
- mpdu.getPayloadLength(),
- mpdu.getPayload(),
- mpduIndex); // MPDU index is updated
- ChannelPoint P0 = mapping0.computePoint(currentModulation); // get original point coordinates
- unsigned short int C0 = mapping0.getCode(); // get code
-
- // Create a Channel Mapping for P1
- ChannelPoint P1 = addNoise(P0, sigma); // get intermediate noise point coordinates
- ChannelMapping mapping1(P1);
-
- // Create a Channel Mapping for P2 / C2
- ChannelPoint P2 = mapping1.retrievePoint(currentModulation); // get noise point coordinates
- ChannelMapping mapping2(P2);
- unsigned short int C2 = mapping2.computeCode(currentModulation); // get noise code
-
- // Calculate BER
- ber[currentPb] += computeBer(C0, C2);
-
- // Update number of bits coded on current carrier
- currentCarrierNbOfBits = mpduIndex - currentCarrierNbOfBits;
-
- /* Detect end of a PB in the duplicated MPDU. */
- if (mpduIndex >= (unsigned int) ((currentPb + 1) * PHY_BYTES_TO_BITS(mpdu.getDuplicatedPbLength ())))
- {
- endOfPb = true;
- }
-
- if (endOfPb)
- {
- if ((mpdu.getMod () < PHY_MOD_ROBO_NB) && (-1 == padding))
+ // After each symbol, calculate average time noise
+ noiseData[PHY_CARRIER_NB + currentSymbol] =
+ timeNoise[currentSymbol] / PHY_CARRIER_NB;
+
+ // Update index of current symbol
+ currentSymbol++;
+
+ // Update start date of current symbol
+ if ( (2 >= currentSymbol) || (PHY_GIL_567 == gil) )
{
- if (mpduIndex >= nb_pad)
- {
- /* Rewind mpduIndex to add 'nb_pad' padding bits. */
- padding = nb_pad;
- mpduIndex -= nb_pad;
- }
+ currentSymbolStartDate += MAC_DX567_TCK;
}
- else if ((mpdu.getMod () < PHY_MOD_ROBO_NB) && (padding != 0))
+ else if (PHY_GIL_417 == gil)
{
- /* Update the number of bits that are still to pad. */
- padding -= currentCarrierNbOfBits;
+ currentSymbolStartDate += MAC_DX417_TCK;
}
- else
+ else if (PHY_GIL_3534 == gil)
{
- if (mpdu.getMod () < PHY_MOD_ROBO_NB)
- {
- /* All padding bits have been added. Reset the padding indicator,
- * and go to the next symbol. */
- padding = -1;
- currentCarrier = PHY_CARRIER_NB;
- }
-
- /* Now, handle the treatment to apply at the end of each PB. */
-
- // Calculate FER
- float fer = computeFer(ber[currentPb],
- // average number of bits coded per carrier (masked and unmasked) on current PB
- PHY_BYTES_TO_BITS(mpdu.getPbSize ()) / currentPbNbOfCarriers,
- currentModulation);
-
- // Calculate CRC error
- crcError[currentPb] = computeCrcError(fer);
-
- // Update index of current PB
- currentPb++;
-
- // Reset number of carriers on current PB
- currentPbNbOfCarriers = 0;
-
- endOfPb = false;
+ currentSymbolStartDate += MAC_DX3534_TCK;
}
- }
-
- // Calculate noise
- unsigned int noise;
- if (PHY_MPDU_FORMAT_SOUND == mpdu.getMpduFormat())
- {
- noise = computeNoise(P0, P1);
- }
- else
- {
- noise = computeNoise(P1, P2);
- }
-
- // Update frequency noise (PHY_CARRIER_NB) and time noise (MAC_MAX_SYMB_PER_MPDU)
- frequencyNoise[currentCarrier] += noise;
- timeNoise[currentSymbol] += noise;
}
- }
-
- // After each symbol, calculate average time noise
- noiseData[PHY_CARRIER_NB + currentSymbol] = timeNoise[currentSymbol] / PHY_CARRIER_NB;
-
- // Update index of current symbol
- currentSymbol++;
+ // Check number of symbols
+ if (nb_symbols != currentSymbol)
+ {
+ errno = EPROTO;
+ maximus_log (LOG_FATAL,
+ "number of symbols set in MPDU = "
+ << nb_symbols
+ << " ; number of symbols calculated by Maximus = "
+ << currentSymbol);
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "number of symbols is incorrect", errno);
+ }
- // Update start date of current symbol
- if ( (2 >= currentSymbol) || (PHY_GIL_567 == mpdu.getGil()) )
- {
- currentSymbolStartDate += MAC_DX567_TCK;
- }
- else if (PHY_GIL_417 == mpdu.getGil())
- {
- currentSymbolStartDate += MAC_DX417_TCK;
- }
- else if (PHY_GIL_3534 == mpdu.getGil())
- {
- currentSymbolStartDate += MAC_DX3534_TCK;
- }
- }
- // Check number of symbols
- if (mpdu.getNbOfSymbols() != currentSymbol)
- {
- errno = EPROTO;
-#if CONFIG_LOG
- clog << logger (LOG_FATAL) << "number of symbols set in MPDU = " << mpdu.getNbOfSymbols () << " ; number of symbols calculated by Maximus = " << currentSymbol << endl;
-#endif /* CONFIG_LOG */
- throw Error(__PRETTY_FUNCTION__, "number of symbols is incorrect", errno);
- }
+ // For each carrier, calculate average frequency noise
+ for (unsigned short int currentCarrier=0;
+ currentCarrier<PHY_CARRIER_NB;
+ currentCarrier++)
+ {
+ noiseData[currentCarrier] =
+ frequencyNoise[currentCarrier] / currentSymbol;
+ }
- // For each carrier, calculate average frequency noise
- for (unsigned short int currentCarrier=0; currentCarrier<PHY_CARRIER_NB; currentCarrier++)
- {
- noiseData[currentCarrier] = frequencyNoise[currentCarrier] / currentSymbol;
- }
+ // Set PB measurement of PHY SCI messages MPDU
+ maximus_log (LOG_DEBUG, "PB measurement = ");
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ {
+ pb_measurement_array[i] =
+ (crcError[i] << PHY_PB_MEAS_CRC_ERR_OFFSET)
+ | (4 << PHY_PB_MEAS_HALFIT_OFFSET)
+ | (1 << ber[i]);
- // Set PB measurement of PHY SCI messages MPDU
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "PB measurement = " << endl;
-#endif /* CONFIG_LOG */
- for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
- {
- *(pb_measurement_array + i) = (crcError[i] << PHY_PB_MEAS_CRC_ERR_OFFSET) \
- | (4 << PHY_PB_MEAS_HALFIT_OFFSET) | (1 << ber[i]);
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "\tPB " << i << " -> 0x" << setfill('0') << setw(8) << uppercase << hex << ntohl(*(pb_measurement_array + i)) << endl;
-#endif /* CONFIG_LOG */
+ maximus_log (LOG_DEBUG, " PB " << i << " -> 0x"
+ << std::hex << ntohl (pb_measurement_array[i]));
+ }
}
- // Set PHY SCI message NOISE data length and data
- bAddPerturbation = noise.setSpecializedSciMsgDataLength(PHY_CARRIER_NB*sizeof(phy_noise_energy_t) + MAC_MAX_SYMB_PER_MPDU*sizeof(phy_noise_energy_t));
- bAddPerturbation &= noise.setSpecializedSciMsgData((unsigned char *)noiseData);
-
- pSettings = NULL;
- }
-
- return bAddPerturbation;
+ return true;
}
bool ChannelComputer::addChannelSettings ( const Sci_Msg_Station_Id created_station_id )
{
- logFunction();
- bool bAddSettings = false;
-
- if (0 == created_station_id)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "station ID equals 0", errno);
- }
- else
- {
- for (StationsList::iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
- {
- if (NULL == (*it))
- {
- throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
- }
- else
- {
- Channel_Settings_Key key;
- key.tx_station_id = created_station_id;
- key.rx_station_id = (*it)->getStationId();
- if (key.tx_station_id != key.rx_station_id)
- {
- mListOfChannelSettings[key] = new ChannelSettings();
- bAddSettings = true;
- }
- key.tx_station_id = (*it)->getStationId();
- key.rx_station_id = created_station_id;
- if (key.tx_station_id != key.rx_station_id)
+ logFunction();
+ bool bAddSettings = false;
+
+ if (0 == created_station_id)
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "station ID equals 0", errno);
+ }
+ else
+ {
+ for (stations_list_t::iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
{
- mListOfChannelSettings[key] = new ChannelSettings();
- bAddSettings = true;
+ if (NULL == (*it))
+ {
+ throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
+ }
+ else
+ {
+ Channel_Settings_Key key;
+ key.tx_station_id = created_station_id;
+ key.rx_station_id = (*it)->getStationId();
+ if (key.tx_station_id != key.rx_station_id)
+ {
+ mListOfChannelSettings[key] = new ChannelSettings();
+ bAddSettings = true;
+ }
+ key.tx_station_id = (*it)->getStationId();
+ key.rx_station_id = created_station_id;
+ if (key.tx_station_id != key.rx_station_id)
+ {
+ mListOfChannelSettings[key] = new ChannelSettings();
+ bAddSettings = true;
+ }
+ }
}
- }
}
- }
- return bAddSettings;
+ return bAddSettings;
}
@@ -538,321 +482,309 @@ std::vector<ChannelSettings *> & ChannelComputer::findChannelSettings ( const Sc
const Sci_Msg_Station_Id rx_station_id,
const bool both_directions )
{
- logFunction();
- static std::vector<ChannelSettings *> listOfChannelSettings;
-
- listOfChannelSettings.clear();
- Channel_Settings_Key key;
- key.tx_station_id = tx_station_id;
- key.rx_station_id = rx_station_id;
-
- if ((0 != tx_station_id) && (0 != rx_station_id))
- {
- listOfChannelSettings.push_back(mListOfChannelSettings[key]);
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "\tfind channel " << key.tx_station_id << " -> " << key.rx_station_id << endl;
-#endif /* CONFIG_LOG */
- if (both_directions)
- {
- key.tx_station_id = rx_station_id;
- key.rx_station_id = tx_station_id;
- listOfChannelSettings.push_back(mListOfChannelSettings[key]);
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "\tfind channel " << key.tx_station_id << " -> " << key.rx_station_id << endl;
-#endif /* CONFIG_LOG */
- }
- }
- else if ((0 == tx_station_id) && (0 == rx_station_id))
- {
- for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
+ logFunction();
+ static std::vector<ChannelSettings *> listOfChannelSettings;
+
+ listOfChannelSettings.clear();
+ Channel_Settings_Key key;
+ key.tx_station_id = tx_station_id;
+ key.rx_station_id = rx_station_id;
+
+ if ((0 != tx_station_id) && (0 != rx_station_id))
{
- if (NULL == it->second)
- {
- throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.push_back(it->second);
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "\tfind channel " << it->first.tx_station_id << " -> " << it->first.rx_station_id << endl;
-#endif /* CONFIG_LOG */
- }
- }
- }
- else // (0 == tx_station_id) xor (0 == rx_station_id)
- {
- for (StationsList::iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
- {
- if (NULL == (*it))
- {
- throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
- }
- else
- {
- if (0 == tx_station_id)
- {
- key.tx_station_id = (*it)->getStationId();
- }
- else // 0 == rx_station_id
+ listOfChannelSettings.push_back(mListOfChannelSettings[key]);
+ maximus_log (LOG_DEBUG, " find channel " << key.tx_station_id
+ << " -> " << key.rx_station_id);
+ if (both_directions)
{
- key.rx_station_id = (*it)->getStationId();
+ key.tx_station_id = rx_station_id;
+ key.rx_station_id = tx_station_id;
+ listOfChannelSettings.push_back(mListOfChannelSettings[key]);
+ maximus_log (LOG_DEBUG, " find channel " << key.tx_station_id
+ << " -> " << key.rx_station_id);
}
- if (0 != mListOfChannelSettings.count(key))
+ }
+ else if ((0 == tx_station_id) && (0 == rx_station_id))
+ {
+ for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
{
- listOfChannelSettings.push_back(mListOfChannelSettings[key]);
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "\tfind channel " << key.tx_station_id << " -> " << key.rx_station_id << endl;
-#endif /* CONFIG_LOG */
+ if (NULL == it->second)
+ {
+ throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.push_back(it->second);
+ maximus_log (LOG_DEBUG, " find channel " << it->first.tx_station_id
+ << " -> " << it->first.rx_station_id);
+ }
}
- if (both_directions)
+ }
+ else // (0 == tx_station_id) xor (0 == rx_station_id)
+ {
+ for (stations_list_t::iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
{
- Channel_Settings_Key reverseKey;
- reverseKey.tx_station_id = key.rx_station_id;
- reverseKey.rx_station_id = key.tx_station_id;
- if (0 != mListOfChannelSettings.count(reverseKey))
- {
- listOfChannelSettings.push_back(mListOfChannelSettings[reverseKey]);
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "\tfind channel " << reverseKey.tx_station_id << " -> " << reverseKey.rx_station_id << endl;
-#endif /* CONFIG_LOG */
- }
+ if (NULL == (*it))
+ {
+ throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
+ }
+ else
+ {
+ if (0 == tx_station_id)
+ {
+ key.tx_station_id = (*it)->getStationId();
+ }
+ else // 0 == rx_station_id
+ {
+ key.rx_station_id = (*it)->getStationId();
+ }
+ if (0 != mListOfChannelSettings.count(key))
+ {
+ listOfChannelSettings.push_back(mListOfChannelSettings[key]);
+ maximus_log (LOG_DEBUG, " find channel " << key.tx_station_id
+ << " -> " << key.rx_station_id);
+ }
+ if (both_directions)
+ {
+ Channel_Settings_Key reverseKey;
+ reverseKey.tx_station_id = key.rx_station_id;
+ reverseKey.rx_station_id = key.tx_station_id;
+ if (0 != mListOfChannelSettings.count(reverseKey))
+ {
+ listOfChannelSettings.push_back(mListOfChannelSettings[reverseKey]);
+ maximus_log (LOG_DEBUG, " find channel " << reverseKey.tx_station_id
+ << " -> " << reverseKey.rx_station_id);
+ }
+ }
+ }
}
- }
}
- }
- return listOfChannelSettings;
+ return listOfChannelSettings;
}
bool ChannelComputer::receivePre ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick )
{
- logFunction();
- bool bPre = false;
+ logFunction();
+ bool bPre = false;
- for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
- {
- if (NULL == it->second)
- {
- throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
- }
- else if (tx_station_id == it->first.tx_station_id)
+ for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
{
- bPre = it->second->setPreDetectionDate(current_tick);
+ if (NULL == it->second)
+ {
+ throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
+ }
+ else if (tx_station_id == it->first.tx_station_id)
+ {
+ bPre = it->second->setPreDetectionDate(current_tick);
+ }
}
- }
- return bPre;
+ return bPre;
}
bool ChannelComputer::receiveFc ( const Sci_Msg_Station_Id tx_station_id, const Network_Clock_Tick current_tick )
{
- logFunction();
- bool bFc = false;
+ logFunction();
+ bool bFc = false;
- for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
- {
- if (NULL == it->second)
- {
- throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
- }
- else if (tx_station_id == it->first.tx_station_id)
+ for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end(); ++it)
{
- bFc = it->second->setFcReceptionDate(current_tick);
+ if (NULL == it->second)
+ {
+ throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
+ }
+ else if (tx_station_id == it->first.tx_station_id)
+ {
+ bFc = it->second->setFcReceptionDate(current_tick);
+ }
}
- }
- return bFc;
+ return bFc;
}
-
-// private methods
-//
-
-
bool ChannelComputer::getTonemask ( const unsigned short int carrier_index ) const
{
- if (NULL == mpTonemask)
- {
- throw Error(__PRETTY_FUNCTION__, "tonemask pointer is NULL");
- }
- if (PHY_CARRIER_NB <= carrier_index)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "carrier index exceeds max size of tonemask", errno);
- }
-
- uint8_t tonemaskValue = *(mpTonemask + carrier_index/8);
-
- return (tonemaskValue >> (carrier_index % 8)) & 0x01;
+ if (NULL == mpTonemask)
+ {
+ throw Error(__PRETTY_FUNCTION__, "tonemask pointer is NULL");
+ }
+ if (PHY_CARRIER_NB <= carrier_index)
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "carrier index exceeds max size of tonemask", errno);
+ }
+
+ uint8_t tonemaskValue = *(mpTonemask + carrier_index/8);
+
+ return (tonemaskValue >> (carrier_index % 8)) & 0x01;
}
void ChannelComputer::updateListOfChannelSettings ( )
{
- logFunction();
+ logFunction();
- bool toRemove;
- for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end();)
- {
- ChannelSettingsList::iterator settings = it;
- ++it;
- if (NULL == settings->second)
- {
- throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
- }
- else
+ bool toRemove;
+ for (ChannelSettingsList::iterator it = mListOfChannelSettings.begin(); it != mListOfChannelSettings.end();)
{
- toRemove = true;
- for (StationsList::iterator station = mpListOfStations->begin(); station != mpListOfStations->end(); ++station)
- {
- if (NULL == (*station))
+ ChannelSettingsList::iterator settings = it;
+ ++it;
+ if (NULL == settings->second)
{
- throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
+ throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
}
- else if ((settings->first.tx_station_id == (*station)->getStationId())
- || (settings->first.rx_station_id == (*station)->getStationId()))
+ else
{
- toRemove = false;
- break;
+ toRemove = true;
+ for (stations_list_t::iterator station = mpListOfStations->begin(); station != mpListOfStations->end(); ++station)
+ {
+ if (NULL == (*station))
+ {
+ throw Error(__PRETTY_FUNCTION__, "a station pointer is NULL");
+ }
+ else if ((settings->first.tx_station_id == (*station)->getStationId())
+ || (settings->first.rx_station_id == (*station)->getStationId()))
+ {
+ toRemove = false;
+ break;
+ }
+ }
+ if (toRemove)
+ {
+ delete(settings->second);
+ mListOfChannelSettings.erase(settings);
+ }
}
- }
- if (toRemove)
- {
- delete(settings->second);
- mListOfChannelSettings.erase(settings);
- }
- }
- }
+ }
}
unsigned int ChannelComputer::getBeaconPeriod ( ) const
{
- if (0 == mBeaconPeriod)
- {
- throw Error(__PRETTY_FUNCTION__, "beacon period equals 0");
- }
+ if (0 == mBeaconPeriod)
+ {
+ throw Error(__PRETTY_FUNCTION__, "beacon period equals 0");
+ }
- return mBeaconPeriod;
+ return mBeaconPeriod;
}
-unsigned int ChannelComputer::calculateNbPad ( const PhySciMsgMpdu & mpdu, enum Channel_Mod channel_mod ) const
+unsigned int ChannelComputer::calculateNbPad (
+ const size_t pb_size,
+ const Phy_Mod modulation,
+ enum Channel_Mod channel_mod ) const
{
- /* Number of bits to pad is defined by the HomePlugAv standard,
- * in paragraph 3.4.4.1 ROBO interleaver. */
-
- /* Step 1. Definitions. */
- /* number of bits per PB (information and parity) */
- int nb_raw = PHY_BYTES_TO_BITS(mpdu.getPbSize () + PHY_PB_HDR_SIZE + PHY_ICV_SIZE);
- /* number of carriers turned on (in tonemask) */
- int nb_carrier = 0;
- for (unsigned short int carrier = 0; carrier < PHY_CARRIER_NB; carrier++)
- {
- if (!getTonemask (carrier))
- {
- nb_carrier++;
- }
- }
- /* number of redundant copies of the data */
- int nb_copies = mNumberOfCopiesArray[mpdu.getMod ()];
- /* number of bits par carrier */
- int bpc = ChannelMapping::getNbOfBitsArray (channel_mod);
-
- /* Step 2. Determine the number of bits to pad.
- * This is not optimized (intermediate variables), but it is kept clear like in AV standard. */
- int nb_carrier_robo = nb_copies * (nb_carrier / nb_copies);
- int carriers_in_segment = nb_carrier_robo / nb_copies;
- int bits_per_symbol = bpc * nb_carrier_robo;
- int bits_in_segment = bpc * carriers_in_segment;
- int bits_in_last_symbol = nb_raw - bits_per_symbol * (nb_raw / bits_per_symbol);
- int bits_in_last_segment = 0;
- if (0 == bits_in_last_symbol)
- {
- bits_in_last_symbol = bits_per_symbol;
- bits_in_last_segment = bits_in_segment;
- }
- else
- {
- bits_in_last_segment = bits_in_last_symbol - bits_in_segment * ((bits_in_last_symbol - 1) / bits_in_segment);
- }
- return (unsigned int) (bits_in_segment - bits_in_last_segment); /* return nb_pad */
+ /* Number of bits to pad is defined by the HomePlugAv standard,
+ * in paragraph 3.4.4.1 ROBO interleaver. */
+
+ /* Step 1. Definitions. */
+ /* number of bits per PB (information and parity) */
+ int nb_raw = PHY_BYTES_TO_BITS (pb_size + PHY_PB_HDR_SIZE + PHY_ICV_SIZE);
+ /* number of carriers turned on (in tonemask) */
+ int nb_carrier = 0;
+ for (unsigned short int carrier = 0; carrier < PHY_CARRIER_NB; carrier++)
+ {
+ if (!getTonemask (carrier))
+ {
+ nb_carrier++;
+ }
+ }
+ /* number of redundant copies of the data */
+ int nb_copies = mNumberOfCopiesArray[modulation];
+ /* number of bits par carrier */
+ int bpc = ChannelMapping::getNbOfBitsArray (channel_mod);
+
+ /* Step 2. Determine the number of bits to pad.
+ * This is not optimized (intermediate variables), but it is kept clear like in AV standard. */
+ int nb_carrier_robo = nb_copies * (nb_carrier / nb_copies);
+ int carriers_in_segment = nb_carrier_robo / nb_copies;
+ int bits_per_symbol = bpc * nb_carrier_robo;
+ int bits_in_segment = bpc * carriers_in_segment;
+ int bits_in_last_symbol = nb_raw - bits_per_symbol * (nb_raw / bits_per_symbol);
+ int bits_in_last_segment = 0;
+ if (0 == bits_in_last_symbol)
+ {
+ bits_in_last_symbol = bits_per_symbol;
+ bits_in_last_segment = bits_in_segment;
+ }
+ else
+ {
+ bits_in_last_segment = bits_in_last_symbol - bits_in_segment * ((bits_in_last_symbol - 1) / bits_in_segment);
+ }
+ return (unsigned int) (bits_in_segment - bits_in_last_segment); /* return nb_pad */
}
-
-// protected methods
-//
-
-
double ChannelComputer::getSigma ( const Channel_Mod modulation, const float snr_in_db ) const
{
- if (0 == getLinearSnr(snr_in_db))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "linear SNR equals 0", errno);
- }
+ if (0 == getLinearSnr(snr_in_db))
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "linear SNR equals 0", errno);
+ }
- return sqrt(getPowerScale(modulation) / (2 * getLinearSnr(snr_in_db)));
+ return sqrt(getPowerScale(modulation) / (2 * getLinearSnr(snr_in_db)));
}
float ChannelComputer::getPowerScale ( const Channel_Mod modulation ) const
{
- return mPowerScaleArray[modulation];
+ return mPowerScaleArray[modulation];
}
double ChannelComputer::getLinearSnr ( const float snr_in_db ) const
{
- return pow(10, snr_in_db/10);
+ return pow(10, snr_in_db/10);
}
const ChannelPoint ChannelComputer::addNoise ( const ChannelPoint & point, const double sigma )
{
- //logFunction();
+ //logFunction();
- mEngine.seed(static_cast<unsigned int>(time(0)));
- boost::normal_distribution<double> norm(0,1);
- boost::variate_generator<boost::mt19937, boost::normal_distribution<double> > normal(mEngine, norm);
+ mEngine.seed(static_cast<unsigned int>(time(0)));
+ boost::normal_distribution<double> norm(0,1);
+ boost::variate_generator<boost::mt19937, boost::normal_distribution<double> > normal(mEngine, norm);
- return ChannelPoint(point.I + sigma * normal(), point.Q + sigma * normal());
+ return ChannelPoint(point.I + sigma * normal(), point.Q + sigma * normal());
}
unsigned short int ChannelComputer::computeBer ( const unsigned short int codeA,
const unsigned short int codeB ) const
{
- //logFunction();
- unsigned short int ber = 0;
+ //logFunction();
+ unsigned short int ber = 0;
- if ( (codeA > MAXIMUS_CHANNEL_CODE_MAX_VALUE) || (codeB > MAXIMUS_CHANNEL_CODE_MAX_VALUE) )
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "code value exceeds max value", errno);
- }
+ if ( (codeA > MAXIMUS_CHANNEL_CODE_MAX_VALUE) || (codeB > MAXIMUS_CHANNEL_CODE_MAX_VALUE) )
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "code value exceeds max value", errno);
+ }
- // Comparison for each bit
- for (unsigned int i = 0; i < PHY_BYTES_TO_BITS(sizeof (unsigned short int)); i++)
- {
- if ( ((codeA >> i) & 0x0001) != ((codeB >> i) & 0x0001) )
+ // Comparison for each bit
+ for (unsigned int i = 0; i < PHY_BYTES_TO_BITS(sizeof (unsigned short int)); i++)
{
- ber++;
- }
- }
+ if ( ((codeA >> i) & 0x0001) != ((codeB >> i) & 0x0001) )
+ {
+ ber++;
+ }
+ }
- return ber;
+ return ber;
}
unsigned int ChannelComputer::computeNoise ( const ChannelPoint & pointA,
const ChannelPoint & pointB ) const
{
- //logFunction();
+ //logFunction();
- return (unsigned int)(pow(pointB.I - pointA.I , 2) + pow(pointB.Q - pointA.Q , 2));
+ return (unsigned int)(pow(pointB.I - pointA.I , 2) + pow(pointB.Q - pointA.Q , 2));
}
@@ -860,80 +792,67 @@ float ChannelComputer::computeFer ( const unsigned short int ber,
const unsigned int n,
const Channel_Mod modulation ) const
{
- //logFunction();
-
- float t, x;
- const unsigned short int A = 50;
- const unsigned short int K = 100;
-
- // Calculate t(n)
- if (n < 2)
- {
- t = 0.3;
- }
- else if ( (n > 2) && (n <= 8) )
- {
- t = 0.65 * n - 1;
- }
- else // n > 8
- {
- t = 0.2 * n + 2.6;
- }
-
- // Calculate x
- if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
- {
- x = ber;
- }
- else
- {
- x = ber - 0.01 * t;
- }
-
- // Calculate g(x)
- return pow(10, -K * exp(-pow(A * x, 2)));
-}
+ //logFunction();
+ float t, x;
+ const unsigned short int A = 50;
+ const unsigned short int K = 100;
-bool ChannelComputer::computeCrcError ( const float fer )
-{
- //logFunction();
- bool crcError = false;
-
- mEngine.seed(static_cast<unsigned int>(time(0)));
- boost::uniform_01<boost::mt19937, float> uni(mEngine);
+ // Calculate t(n)
+ if (n < 2)
+ {
+ t = 0.3;
+ }
+ else if ( (n > 2) && (n <= 8) )
+ {
+ t = 0.65 * n - 1;
+ }
+ else // n > 8
+ {
+ t = 0.2 * n + 2.6;
+ }
- if (uni() < fer)
- {
- crcError = true;
- }
+ // Calculate x
+ if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
+ {
+ x = ber;
+ }
+ else
+ {
+ x = ber - 0.01 * t;
+ }
- return crcError;
+ // Calculate g(x)
+ return pow(10, -K * exp(-pow(A * x, 2)));
}
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
+bool ChannelComputer::computeCrcError ( const float fer )
+{
+ //logFunction();
+ bool crcError = false;
+ mEngine.seed(static_cast<unsigned int>(time(0)));
+ boost::uniform_01<boost::mt19937, float> uni(mEngine);
-// private attribute accessor methods
-//
+ if (uni() < fer)
+ {
+ crcError = true;
+ }
+ return crcError;
+}
bool ChannelComputer::setTonemask ( const uint8_t * p_tonemask )
{
- if (NULL == p_tonemask)
- {
- throw Error(__PRETTY_FUNCTION__, "tonemask pointer is NULL");
- }
+ if (NULL == p_tonemask)
+ {
+ throw Error(__PRETTY_FUNCTION__, "tonemask pointer is NULL");
+ }
- mpTonemask = const_cast<uint8_t *>(p_tonemask);
+ mpTonemask = const_cast<uint8_t *>(p_tonemask);
- return true;
+ return true;
}
@@ -941,60 +860,55 @@ bool ChannelComputer::setTonemap ( const Sci_Msg_Station_Id tx_station_id,
const unsigned long length,
const unsigned char * p_tonemap )
{
- bool bSetTonemap = true;
-
- if (((PHY_CARRIER_NB+1)/2 != length) || (NULL == p_tonemap))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "tonemap length is incorrect and/or tonemap pointer is NULL", errno);
- }
- if (0 == tx_station_id)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "transmitting station ID equals 0", errno);
- }
-
- // Fill the tonemap array
- Channel_Mod tonemapArray[PHY_CARRIER_NB + 1];
- for (int i=0; i<(PHY_CARRIER_NB+1)/2; i++)
- {
- tonemapArray[i*2] = (Channel_Mod)(*(p_tonemap + i) & 0x0F);
- tonemapArray[i*2+1] = (Channel_Mod)(*(p_tonemap + i) & 0xF0);
- }
-
- std::vector<ChannelSettings *> listOfChannelSettings = findChannelSettings(tx_station_id, 0 /* rx_station_id */, false /* both_directions */);
- for (std::vector<ChannelSettings *>::size_type i=0; i<listOfChannelSettings.size(); i++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
+ bool bSetTonemap = true;
+
+ if (((PHY_CARRIER_NB+1)/2 != length) || (NULL == p_tonemap))
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "tonemap length is incorrect and/or tonemap pointer is NULL", errno);
}
- else
+ if (0 == tx_station_id)
{
- bSetTonemap &= listOfChannelSettings.back()->setTonemap(tonemapArray);
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "transmitting station ID equals 0", errno);
}
- listOfChannelSettings.pop_back();
- }
-
- return bSetTonemap;
-}
-
-bool ChannelComputer::setBeaconPeriod ( const float frequency )
-{
- if (0 == frequency)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "frequency equals 0", errno);
- }
+ // Fill the tonemap array
+ Channel_Mod tonemapArray[PHY_CARRIER_NB + 1];
+ for (int i=0; i<(PHY_CARRIER_NB+1)/2; i++)
+ {
+ tonemapArray[i*2] = (Channel_Mod)(*(p_tonemap + i) & 0x0F);
+ tonemapArray[i*2+1] = (Channel_Mod)(*(p_tonemap + i) & 0xF0);
+ }
- /** Convert seconds to ticks 25 MHz. */
- mBeaconPeriod = (unsigned int) (MAC_MS_TO_TCK(MAC_SEC_TO_MS((1 / frequency) * 2)));
+ std::vector<ChannelSettings *> listOfChannelSettings = findChannelSettings(tx_station_id, 0 /* rx_station_id */, false /* both_directions */);
+ for (std::vector<ChannelSettings *>::size_type i=0; i<listOfChannelSettings.size(); i++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "a channel settings pointer is NULL");
+ }
+ else
+ {
+ bSetTonemap &= listOfChannelSettings.back()->setTonemap(tonemapArray);
+ }
+ listOfChannelSettings.pop_back();
+ }
- return true;
+ return bSetTonemap;
}
+bool ChannelComputer::setBeaconPeriod (
+ const float frequency)
+{
+ if (0 == frequency)
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "frequency equals 0", errno);
+ }
-// protected attribute accessor methods
-//
+ /** Convert seconds to ticks 25 MHz. */
+ mBeaconPeriod = (unsigned int) (MAC_MS_TO_TCK(MAC_SEC_TO_MS((1 / frequency) * 2)));
+ return true;
+}
diff --git a/cesar/maximus/channel/src/ChannelComputerTest.cpp b/cesar/maximus/channel/src/ChannelComputerTest.cpp
deleted file mode 100644
index 294d233032..0000000000
--- a/cesar/maximus/channel/src/ChannelComputerTest.cpp
+++ /dev/null
@@ -1,335 +0,0 @@
-
-#include "ChannelComputerTest.h"
-
-#include "ChannelComputer.h"
-#include "ChannelPoint.h"
-#include "ChannelSettings.h"
-#include "CoreEngine.h"
-#include "PhySciMsgMpdu.h"
-#include "PhySciMsgNoise.h"
-#include "INetworkClock.h"
-#include "IPhy.h"
-#include "Sta.h"
-#include "Msg.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-#include <math.h> // for 'pow()' and 'sqrt()'
-#include <cstring>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (ChannelComputerTest);
-
-class ProtectedTest : public ChannelComputer
-{
-public:
- ProtectedTest(IPhy * p_phy, ISystem * p_system) : ChannelComputer(p_phy, p_system) {}
- ~ProtectedTest() {}
- double getSigmaTest ( const Channel_Mod modulation, const float snr_in_db ) const
- {
- return getSigma(modulation, snr_in_db);
- }
- float getPowerScaleTest ( const Channel_Mod modulation ) const
- {
- return getPowerScale(modulation);
- }
- double getLinearSnrTest ( const float snr_in_db ) const
- {
- return getLinearSnr(snr_in_db);
- }
- ChannelPoint addNoiseTest ( const ChannelPoint & point, const double sigma )
- {
- return addNoise(point, sigma);
- }
- unsigned short int computeBerTest ( const unsigned short int codeA, const unsigned short int codeB ) const
- {
- return computeBer(codeA, codeB);
- }
- unsigned int computeNoiseTest ( const ChannelPoint & pointA, const ChannelPoint & pointB ) const
- {
- return computeNoise(pointA, pointB);
- }
- float computeFerTest ( const unsigned short int ber, const unsigned int n, const Channel_Mod modulation ) const
- {
- return computeFer(ber, n, modulation);
- }
- bool computeCrcErrorTest ( const float fer )
- {
- return computeCrcError(fer);
- }
-};
-
-
-void ChannelComputerTest::setUp (void)
-{
- logTest();
-
- mpCoreEngine = new CoreEngine();
- CPPUNIT_ASSERT_MESSAGE ( "Core Engine pointer is NULL", NULL != mpCoreEngine );
- mpMaximus = new Maximus (mpCoreEngine);
- CPPUNIT_ASSERT_MESSAGE ("Maximus pointer is NULL", NULL != mpMaximus);
- mpCoreEngine->getPhy()->init (50);
- mpMaximus->disturb_channel ();
-}
-
-
-void ChannelComputerTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- delete (mpMaximus);
- mpMaximus = NULL;
- }
-}
-
-
-void ChannelComputerTest::duplicateMpduPayloadTest (void)
-{
- logTest();
-
- PhySciMsgMpdu mpdu(mpCoreEngine->getPhy());
- unsigned long length = 1024;
- unsigned char payload[length];
- mpdu.setMpdu(length, payload);
- mpdu.setPbSize(512);
- mpdu.setNbOfPbs(2);
- mpdu.setFecrate(PHY_FEC_RATE_1_2);
- mpdu.setMod(PHY_MOD_ROBO);
- CPPUNIT_ASSERT_MESSAGE ( "duplicateMpduPayload failed",
- mpCoreEngine->getChannel ()->duplicateMpduPayload (mpdu)
- && (1040 * 2 * 4 == mpdu.getPayloadLength ())
- && (520 * 2 * 4 == mpdu.getDuplicatedPbLength ()));
-}
-
-
-void ChannelComputerTest::addPerturbationTest (void)
-{
- logTest();
-
- PhySciMsgMpdu mpdu(mpCoreEngine->getPhy());
- PhySciMsgNoise noise(mpCoreEngine->getPhy());
- uint32_t pbMeasurement[MAC_MAX_PB_PER_MPDU];
- uint32_t pbMeasurementResult[MAC_MAX_PB_PER_MPDU];
- memset(pbMeasurement, '\0', MAC_MAX_PB_PER_MPDU);
- memset(pbMeasurementResult, '\0', MAC_MAX_PB_PER_MPDU);
- uint32_t pbHdr[MAC_MAX_PB_PER_MPDU];
- memset(pbHdr, 0x12, MAC_MAX_PB_PER_MPDU);
- CPPUNIT_ASSERT_MESSAGE ( "addPerturbation failed",
- (mpCoreEngine->getChannel ()->addPerturbation (pbMeasurementResult,
- noise,
- pbHdr,
- mpdu,
- 0,
- 0,
- mpCoreEngine->getNetworkClock()->getCurrentTickValue()))
- && (NULL != pbMeasurementResult)
- && (0 != memcmp(pbMeasurement, pbMeasurementResult, MAC_MAX_PB_PER_MPDU))
- && (NULL != noise.getSpecializedSciMsgData())
- && ((PHY_CARRIER_NB*sizeof(uint32_t) + MAC_MAX_SYMB_PER_MPDU*sizeof(uint32_t)) == noise.getSpecializedSciMsgDataLength()) );
-
- Sta sta1 = mpMaximus->create_sta ();
- Sta sta2 = mpMaximus->create_sta ();
- mpMaximus->set_snr_from_src_to_dst (15, sta1, sta2, true);
- Msg fc = mpMaximus->create_fc ("set_tonemask");
- fc.send (sta1);
- unsigned long length = 512;
- unsigned char payload1[length];
- mpdu.setMpdu (length, payload1);
- mpdu.setMod (PHY_MOD_ROBO);
- mpdu.setFecrate (PHY_FEC_RATE_1_2);
- mpdu.setPbSize (512);
- mpdu.setNbOfPbs (1);
- mpdu.setNbOfSymbols (19);
- CPPUNIT_ASSERT_MESSAGE ("duplicateMpduPayload failed",
- mpCoreEngine->getChannel ()->duplicateMpduPayload (mpdu));
- CPPUNIT_ASSERT_MESSAGE ("addPerturbation failed",
- (mpCoreEngine->getChannel ()->addPerturbation (pbMeasurementResult,
- noise,
- pbHdr,
- mpdu,
- sta2.getStationId (),
- sta1.getStationId (),
- mpCoreEngine->getNetworkClock ()->getCurrentTickValue ())));
-
- length = 1024;
- unsigned char payload2[length];
- mpdu.setMpdu (length, payload2);
- mpdu.setNbOfPbs (2);
- mpdu.setNbOfSymbols (38);
- CPPUNIT_ASSERT_MESSAGE ("duplicateMpduPayload failed",
- mpCoreEngine->getChannel ()->duplicateMpduPayload (mpdu));
- CPPUNIT_ASSERT_MESSAGE ("addPerturbation failed",
- (mpCoreEngine->getChannel ()->addPerturbation (pbMeasurementResult,
- noise,
- pbHdr,
- mpdu,
- sta1.getStationId (),
- sta2.getStationId (),
- mpCoreEngine->getNetworkClock ()->getCurrentTickValue ())));
-}
-
-
-void ChannelComputerTest::protectedTest (void)
-{
- logTest();
-
- ProtectedTest channelComputer(mpCoreEngine->getPhy(), mpCoreEngine->getSystem());
-
- // Test PowerScale
- Channel_Mod modulation = MAXIMUS_CHANNEL_MOD_BPSK;
- float powerScale = channelComputer.getPowerScaleTest(modulation);
- CPPUNIT_ASSERT_MESSAGE ( "getPowerScale failed", almost_eqf (1, powerScale, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QPSK;
- powerScale = channelComputer.getPowerScaleTest(modulation);
- CPPUNIT_ASSERT_MESSAGE ( "getPowerScale failed", almost_eqf (2, powerScale, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM8;
- powerScale = channelComputer.getPowerScaleTest(modulation);
- CPPUNIT_ASSERT_MESSAGE ( "getPowerScale failed", almost_eqf (5 + pow (1.29, 2), powerScale, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM16;
- powerScale = channelComputer.getPowerScaleTest(modulation);
- CPPUNIT_ASSERT_MESSAGE ( "getPowerScale failed", almost_eqf (10, powerScale, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM64;
- powerScale = channelComputer.getPowerScaleTest(modulation);
- CPPUNIT_ASSERT_MESSAGE ( "getPowerScale failed", almost_eqf (42, powerScale, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM256;
- powerScale = channelComputer.getPowerScaleTest(modulation);
- CPPUNIT_ASSERT_MESSAGE ( "getPowerScale failed", almost_eqf (170, powerScale, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM1024;
- powerScale = channelComputer.getPowerScaleTest(modulation);
- CPPUNIT_ASSERT_MESSAGE ( "getPowerScale failed", almost_eqf (682, powerScale, 5));
-
- // Test linear SNR
- float snr = 10; // in dB
- double linearSnr = channelComputer.getLinearSnrTest(snr);
- CPPUNIT_ASSERT_MESSAGE ( "getLinearSnr failed", almost_eqf (10, linearSnr, 5));
- snr = 16; // in dB
- linearSnr = channelComputer.getLinearSnrTest(snr);
- CPPUNIT_ASSERT_MESSAGE ( "getLinearSnr failed", almost_eqf (pow (10, 1.6), linearSnr, 5));
- snr = 15.55555; // in dB
- linearSnr = channelComputer.getLinearSnrTest(snr);
- CPPUNIT_ASSERT_MESSAGE ( "getLinearSnr failed", almost_eqf (pow (10, 1.555555), linearSnr, 5));
-
- // Test sigma factor
- modulation = MAXIMUS_CHANNEL_MOD_BPSK;
- snr = 10; // in dB
- double sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt(1/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QPSK;
- snr = 11.1; // in dB
- sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt(2/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM8;
- snr = 12.2; // in dB
- sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt((5+pow(1.29, 2))/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM16;
- snr = 13.3; // in dB
- sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt(10/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM64;
- snr = 14.4; // in dB
- sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt(42/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM256;
- snr = 15.5; // in dB
- sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt(170/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QAM1024;
- snr = 16.6; // in dB
- sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt(682/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
- snr = 0; // in dB
- sigma = channelComputer.getSigmaTest(modulation, snr);
- CPPUNIT_ASSERT_MESSAGE ( "getSigma failed", almost_eqf (sqrt(682/(2*channelComputer.getLinearSnrTest(snr))), sigma, 5));
-
- // Test noise point
- ChannelPoint point(1, 0);
- ChannelPoint noisePoint = channelComputer.addNoiseTest(point, sigma);
- CPPUNIT_ASSERT_MESSAGE ( "addNoise failed",
- (point.I != noisePoint.I)
- && (point.Q != noisePoint.Q));
-
- // Test BER
- unsigned short int codeA = 0x3;
- unsigned short int codeB = 0x2;
- unsigned short int ber = channelComputer.computeBerTest(codeA, codeB);
- CPPUNIT_ASSERT_MESSAGE ( "computeBer failed", 1 == ber);
- codeA = 0x3FF;
- codeB = 0x0;
- ber = channelComputer.computeBerTest(codeA, codeB);
- CPPUNIT_ASSERT_MESSAGE ( "computeBer failed", 10 == ber);
- codeA = 0xFF;
- codeB = 0xF;
- ber = channelComputer.computeBerTest(codeA, codeB);
- CPPUNIT_ASSERT_MESSAGE ( "computeBer failed", 4 == ber);
- codeA = 0x44;
- codeB = 0x44;
- ber = channelComputer.computeBerTest(codeA, codeB);
- CPPUNIT_ASSERT_MESSAGE ( "computeBer failed", 0 == ber);
- bool b = false;
- try
- {
- codeA = 0xFFF;
- ber = channelComputer.computeBerTest(codeA, codeB);
- }
- catch (Error & e)
- {
- b = true;
- }
- CPPUNIT_ASSERT_MESSAGE ( "computeBer failed", b);
-
- // Test noise
- ChannelPoint pointA(0, 0);
- ChannelPoint pointB(0, 0);
- unsigned int noise = channelComputer.computeNoiseTest(pointA, pointB);
- CPPUNIT_ASSERT_MESSAGE ( "computeNoise failed", 0 == noise);
- pointB.I = 1;
- pointB.Q = 1;
- noise = channelComputer.computeNoiseTest(pointA, pointB);
- CPPUNIT_ASSERT_MESSAGE ( "computeNoise failed", 2 == noise);
- pointA.I = -3;
- pointA.Q = -1;
- noise = channelComputer.computeNoiseTest(pointA, pointB);
- CPPUNIT_ASSERT_MESSAGE ( "computeNoise failed", 20 == noise);
- pointB.I = -0.12345;
- pointB.Q = 6.789;
- noise = channelComputer.computeNoiseTest(pointA, pointB);
- CPPUNIT_ASSERT_MESSAGE ( "computeNoise failed", (unsigned int)pow(7.789, 2) + (unsigned int)pow(2.87655, 2) == noise);
-
- // Test FER
- unsigned int n = 10;
- modulation = MAXIMUS_CHANNEL_MOD_BPSK;
- float fer = channelComputer.computeFerTest(ber, n, modulation);
- float expectedFer = pow(10, 1-(unsigned short int)100*exp(-pow((unsigned short int)50*ber, 2)))/10;
- CPPUNIT_ASSERT_MESSAGE ( "computeFer 1 failed", almost_eqf (expectedFer, fer, 5));
- modulation = MAXIMUS_CHANNEL_MOD_QPSK;
- fer = channelComputer.computeFerTest(ber, n, modulation);
- expectedFer = pow(10, 1-(unsigned short int)100*exp(-pow((unsigned short int)50*(ber-0.01*(float)4.6), 2)))/10;
- float result = (fer > expectedFer) ? fer - expectedFer : expectedFer - fer;
- CPPUNIT_ASSERT_MESSAGE ( "computeFer 2 failed", result < 0.001);
- n = 5;
- fer = channelComputer.computeFerTest(ber, n, modulation);
- expectedFer = pow(10, 1-(unsigned short int)100*exp(-pow((unsigned short int)50*(ber-0.01*(float)2.25), 2)))/10;
- CPPUNIT_ASSERT_MESSAGE ( "computeFer 3 failed", result < 0.001);
- n = 0;
- fer = channelComputer.computeFerTest(ber, n, modulation);
- expectedFer = pow(10, 1-(unsigned short int)100*exp(-pow((unsigned short int)50*(ber-0.01*(float)0.3), 2)))/10;
- CPPUNIT_ASSERT_MESSAGE ( "computeFer 4 failed", result < 0.001);
-
- // Test CRC
- int count = 0;
- fer = 0;
- for (int i=0; i<11; i++)
- {
- if (channelComputer.computeCrcErrorTest(fer))
- {
- count++;
- }
- fer += 0.1;
- }
- CPPUNIT_ASSERT_MESSAGE ( "computeCrcError failed", (count > 0) && (count < 11));
-}
-
diff --git a/cesar/maximus/channel/src/ChannelMapping.cpp b/cesar/maximus/channel/src/ChannelMapping.cpp
index 49073e46f4..6745b2ac35 100644
--- a/cesar/maximus/channel/src/ChannelMapping.cpp
+++ b/cesar/maximus/channel/src/ChannelMapping.cpp
@@ -1,37 +1,20 @@
-/************************************************************************
- ChannelMapping.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/src/ChannelMapping.cpp
-**************************************************************************/
-
-#include "ChannelMapping.h"
-
-#include "Error.h"
-#include "Logger.h"
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/channel/src/ChannelMapping.cpp
+ * \ingroup maximus_channel
+ *
+ */
+
+#include "maximus/channel/inc/ChannelMapping.h"
+
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
#include <math.h> // for 'pow()'
@@ -42,459 +25,414 @@ The original location of this file is /home/buret/eclipse/maximus/channel/src/Ch
// Table 3-18: Modulation Characteristics
unsigned short int ChannelMapping::mNbOfBitsArray[MAXIMUS_CHANNEL_MOD_NB] = { 0, /* NONE */
- 1, /* BPSK */
- 2, /* QPSK */
- 3, /* QAM8 */
- 4, /* QAM16 */
- 6, /* QAM64 */
- 8, /* QAM256 */
- 10 }; /* QAM1024 */
+ 1, /* BPSK */
+ 2, /* QPSK */
+ 3, /* QAM8 */
+ 4, /* QAM16 */
+ 6, /* QAM64 */
+ 8, /* QAM256 */
+ 10 }; /* QAM1024 */
// Table 3-22: Symbol Mapping (Except 8-QAM)
// and Table 3-23: Symbol Mapping for 8-QAM
short int ChannelMapping::mMappingArray[MAXIMUS_CHANNEL_VALUE_MAX_NB][MAXIMUS_CHANNEL_MOD_NB] =
/* I/Q *//* code */
- /*BPSK*//*QPSK*//*8*/ /*16*//*64*//*256*//*1024*/
+/*BPSK*//*QPSK*//*8*/ /*16*//*64*//*256*//*1024*/
{ { 31, NONE, NONE, NONE, NONE, NONE, NONE, 0x18 },
- { 29, NONE, NONE, NONE, NONE, NONE, NONE, 0x19 },
- { 27, NONE, NONE, NONE, NONE, NONE, NONE, 0x1B },
- { 25, NONE, NONE, NONE, NONE, NONE, NONE, 0x1A },
- { 23, NONE, NONE, NONE, NONE, NONE, NONE, 0x1E },
- { 21, NONE, NONE, NONE, NONE, NONE, NONE, 0x1F },
- { 19, NONE, NONE, NONE, NONE, NONE, NONE, 0x1D },
- { 17, NONE, NONE, NONE, NONE, NONE, NONE, 0x1C },
- { 15, NONE, NONE, NONE, NONE, NONE, 0xC, 0x14 },
- { 13, NONE, NONE, NONE, NONE, NONE, 0xD, 0x15 },
- { 11, NONE, NONE, NONE, NONE, NONE, 0xF, 0x17 },
- { 9, NONE, NONE, NONE, NONE, NONE, 0xE, 0x16 },
- { 7, NONE, NONE, NONE, NONE, 0x6, 0xA, 0x12 },
- { 5, NONE, NONE, NONE, NONE, 0x7, 0xB, 0x13 },
- { 3, NONE, NONE, 0x3, 0x3, 0x5, 0x9, 0x11 },
- { 1, 0x1, 0x1, 0x2, 0x2, 0x4, 0x8, 0x10 },
- { -1, 0X0, 0X0, 0x0, 0x0, 0x0, 0x0, 0X00 },
- { -3, NONE, NONE, 0x1, 0x1, 0x1, 0x1, 0x01 },
- { -5, NONE, NONE, NONE, NONE, 0x3, 0x3, 0x03 },
- { -7, NONE, NONE, NONE, NONE, 0x2, 0x2, 0x02 },
- { -9, NONE, NONE, NONE, NONE, NONE, 0x6, 0x06 },
- { -11, NONE, NONE, NONE, NONE, NONE, 0x7, 0x07 },
- { -13, NONE, NONE, NONE, NONE, NONE, 0x5, 0x05 },
- { -15, NONE, NONE, NONE, NONE, NONE, 0x4, 0x04 },
- { -17, NONE, NONE, NONE, NONE, NONE, NONE, 0x0C },
- { -19, NONE, NONE, NONE, NONE, NONE, NONE, 0x0D },
- { -21, NONE, NONE, NONE, NONE, NONE, NONE, 0x0F },
- { -23, NONE, NONE, NONE, NONE, NONE, NONE, 0x0E },
- { -25, NONE, NONE, NONE, NONE, NONE, NONE, 0x0A },
- { -27, NONE, NONE, NONE, NONE, NONE, NONE, 0x0B },
- { -29, NONE, NONE, NONE, NONE, NONE, NONE, 0x09 },
- { -31, NONE, NONE, NONE, NONE, NONE, NONE, 0x08 } };
-
-
-// Constructors/Destructors
-//
-
+ { 29, NONE, NONE, NONE, NONE, NONE, NONE, 0x19 },
+ { 27, NONE, NONE, NONE, NONE, NONE, NONE, 0x1B },
+ { 25, NONE, NONE, NONE, NONE, NONE, NONE, 0x1A },
+ { 23, NONE, NONE, NONE, NONE, NONE, NONE, 0x1E },
+ { 21, NONE, NONE, NONE, NONE, NONE, NONE, 0x1F },
+ { 19, NONE, NONE, NONE, NONE, NONE, NONE, 0x1D },
+ { 17, NONE, NONE, NONE, NONE, NONE, NONE, 0x1C },
+ { 15, NONE, NONE, NONE, NONE, NONE, 0xC, 0x14 },
+ { 13, NONE, NONE, NONE, NONE, NONE, 0xD, 0x15 },
+ { 11, NONE, NONE, NONE, NONE, NONE, 0xF, 0x17 },
+ { 9, NONE, NONE, NONE, NONE, NONE, 0xE, 0x16 },
+ { 7, NONE, NONE, NONE, NONE, 0x6, 0xA, 0x12 },
+ { 5, NONE, NONE, NONE, NONE, 0x7, 0xB, 0x13 },
+ { 3, NONE, NONE, 0x3, 0x3, 0x5, 0x9, 0x11 },
+ { 1, 0x1, 0x1, 0x2, 0x2, 0x4, 0x8, 0x10 },
+ { -1, 0X0, 0X0, 0x0, 0x0, 0x0, 0x0, 0X00 },
+ { -3, NONE, NONE, 0x1, 0x1, 0x1, 0x1, 0x01 },
+ { -5, NONE, NONE, NONE, NONE, 0x3, 0x3, 0x03 },
+ { -7, NONE, NONE, NONE, NONE, 0x2, 0x2, 0x02 },
+ { -9, NONE, NONE, NONE, NONE, NONE, 0x6, 0x06 },
+ { -11, NONE, NONE, NONE, NONE, NONE, 0x7, 0x07 },
+ { -13, NONE, NONE, NONE, NONE, NONE, 0x5, 0x05 },
+ { -15, NONE, NONE, NONE, NONE, NONE, 0x4, 0x04 },
+ { -17, NONE, NONE, NONE, NONE, NONE, NONE, 0x0C },
+ { -19, NONE, NONE, NONE, NONE, NONE, NONE, 0x0D },
+ { -21, NONE, NONE, NONE, NONE, NONE, NONE, 0x0F },
+ { -23, NONE, NONE, NONE, NONE, NONE, NONE, 0x0E },
+ { -25, NONE, NONE, NONE, NONE, NONE, NONE, 0x0A },
+ { -27, NONE, NONE, NONE, NONE, NONE, NONE, 0x0B },
+ { -29, NONE, NONE, NONE, NONE, NONE, NONE, 0x09 },
+ { -31, NONE, NONE, NONE, NONE, NONE, NONE, 0x08 } };
ChannelMapping::ChannelMapping ( ):
-mCode(0)
+ mCode(0)
{
- //logFunction();
+ //logFunction();
}
ChannelMapping::ChannelMapping ( const unsigned short int code ):
-mCode(0)
+ mCode(0)
{
- //logFunction();
+ //logFunction();
- setCode(code);
+ setCode(code);
}
ChannelMapping::ChannelMapping ( const ChannelPoint & point ):
-mCode(0)
+ mCode(0)
{
- //logFunction();
+ //logFunction();
- setPoint(point);
+ setPoint(point);
}
ChannelMapping::~ChannelMapping ( )
{
- //logFunction();
+ //logFunction();
}
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
unsigned short int ChannelMapping::computeCode ( const Channel_Mod modulation )
{
- //logFunction();
- unsigned short int codeI = 0, codeQ = 0;
-
- if (MAXIMUS_CHANNEL_MOD_NB <= modulation)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Modulation is out-of-range", errno);
- }
- else if (getPoint().checkValidity())
- {
- /* Retrieve the code from the I and Q coordinates and the used modulation. */
- for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
- {
- // Retrieve the code corresponding to I value
- if (getI() == mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE])
- {
- codeI = mMappingArray[i][modulation];
- }
- // Retrieve the code corresponding to Q value
- if (getQ() == mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE])
- {
- codeQ = mMappingArray[i][modulation];
- }
- }
+ //logFunction();
+ unsigned short int codeI = 0, codeQ = 0;
- /* Compute the code depending on the used modulation. */
- /* (Table 3-21: Bit Mapping, Chapter 3.5) */
-
- if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
+ if (MAXIMUS_CHANNEL_MOD_NB <= modulation)
{
- // For BPSK, the code equals to the code corresponding to I value
- setCode(codeI);
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "Modulation is out-of-range", errno);
}
- else if (MAXIMUS_CHANNEL_MOD_QAM8 == modulation)
+ else if (getPoint().checkValidity())
{
- // For QAM8, the code equals to the code corresponding to I value
- // + 0b100 if Q = 1.29
- if (MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE == getQ())
- {
- setCode(0x4 | codeI);
- }
- else if (-MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE == getQ())
- {
- setCode(codeI);
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Q value is out-of-range", errno);
- }
+ /* Retrieve the code from the I and Q coordinates and the used modulation. */
+ for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
+ {
+ // Retrieve the code corresponding to I value
+ if (getI() == mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE])
+ {
+ codeI = mMappingArray[i][modulation];
+ }
+ // Retrieve the code corresponding to Q value
+ if (getQ() == mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE])
+ {
+ codeQ = mMappingArray[i][modulation];
+ }
+ }
+
+ /* Compute the code depending on the used modulation. */
+ /* (Table 3-21: Bit Mapping, Chapter 3.5) */
+
+ if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
+ {
+ // For BPSK, the code equals to the code corresponding to I value
+ setCode(codeI);
+ }
+ else if (MAXIMUS_CHANNEL_MOD_QAM8 == modulation)
+ {
+ // For QAM8, the code equals to the code corresponding to I value
+ // + 0b100 if Q = 1.29
+ if (MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE == getQ())
+ {
+ setCode(0x4 | codeI);
+ }
+ else if (-MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE == getQ())
+ {
+ setCode(codeI);
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Q value is out-of-range", errno);
+ }
+ }
+ else
+ {
+ // For other modulations, the code is composed of:
+ // - the code corresponding to I value (LSB)
+ // - and the code corresponding to Q value (MSB)
+ unsigned short int halfNbOfBits = mNbOfBitsArray[modulation] >> 1; // mNbOfBitsArray[modulation] / 2
+ setCode((codeQ << halfNbOfBits) | codeI);
+ }
}
- else
- {
- // For other modulations, the code is composed of:
- // - the code corresponding to I value (LSB)
- // - and the code corresponding to Q value (MSB)
- unsigned short int halfNbOfBits = mNbOfBitsArray[modulation] >> 1; // mNbOfBitsArray[modulation] / 2
- setCode((codeQ << halfNbOfBits) | codeI);
- }
- }
- return getCode();
+ return getCode();
}
const ChannelPoint & ChannelMapping::computePoint ( const Channel_Mod modulation )
{
- //logFunction();
+ //logFunction();
- /* Retrieve the I and Q coordinates from the code and the used modulation. */
- if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
- {
- // For BPSK, the Q value is not used
- for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
+ /* Retrieve the I and Q coordinates from the code and the used modulation. */
+ if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
{
- if (getCode() == mMappingArray[i][modulation])
- {
- setI(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
- setQ(0);
- break;
- }
+ // For BPSK, the Q value is not used
+ for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
+ {
+ if (getCode() == mMappingArray[i][modulation])
+ {
+ setI(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
+ setQ(0);
+ break;
+ }
+ }
}
- }
- else if (MAXIMUS_CHANNEL_MOD_QAM8 == modulation)
- {
- // For QAM8, the I value equals to the 2 LSB of the code,
- // and the Q value sign depends on the 3rd bit value
- // (Q is positive 0 if the 3rd bit is set to 0b1, else Q is negative)
- for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
+ else if (MAXIMUS_CHANNEL_MOD_QAM8 == modulation)
{
- if ((getCode() & 0x3) == mMappingArray[i][modulation])
- {
- setI(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
- setQ((getCode() > 0x3) ? MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE : -MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE);
- break;
- }
+ // For QAM8, the I value equals to the 2 LSB of the code,
+ // and the Q value sign depends on the 3rd bit value
+ // (Q is positive 0 if the 3rd bit is set to 0b1, else Q is negative)
+ for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
+ {
+ if ((getCode() & 0x3) == mMappingArray[i][modulation])
+ {
+ setI(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
+ setQ((getCode() > 0x3) ? MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE : -MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE);
+ break;
+ }
+ }
}
- }
- else
- {
- // For other modulations:
- // - the I value equals to the LSB of the code
- // - the Q value equals to the MSB of the code
- unsigned short int halfNbOfBits = mNbOfBitsArray[modulation] >> 1; // mNbOfBitsArray[modulation] / 2
- unsigned short int mask = (1 << halfNbOfBits) - 1; // halfNbOfBits * '1'
- for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
+ else
{
- if ((getCode() & mask) == mMappingArray[i][modulation])
- {
- setI(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
- }
- if (((getCode() >> halfNbOfBits) & mask) == mMappingArray[i][modulation])
- {
- setQ(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
- }
+ // For other modulations:
+ // - the I value equals to the LSB of the code
+ // - the Q value equals to the MSB of the code
+ unsigned short int halfNbOfBits = mNbOfBitsArray[modulation] >> 1; // mNbOfBitsArray[modulation] / 2
+ unsigned short int mask = (1 << halfNbOfBits) - 1; // halfNbOfBits * '1'
+ for (int i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
+ {
+ if ((getCode() & mask) == mMappingArray[i][modulation])
+ {
+ setI(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
+ }
+ if (((getCode() >> halfNbOfBits) & mask) == mMappingArray[i][modulation])
+ {
+ setQ(mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE]);
+ }
+ }
}
- }
- getPoint().checkValidity();
- return getPoint();
+ getPoint().checkValidity();
+ return getPoint();
}
const ChannelPoint ChannelMapping::retrievePoint ( const Channel_Mod modulation )
{
- //logFunction();
+ //logFunction();
- float x = getI();
- float y = getQ();
- short int max = 0;
+ float x = getI();
+ float y = getQ();
+ short int max = 0;
- /* Depending on the modulation, find the maximum value of the I and Q coordinates. */
+ /* Depending on the modulation, find the maximum value of the I and Q coordinates. */
- int i;
- for (i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
- {
- if (NONE != (unsigned short int)mMappingArray[i][modulation])
+ int i;
+ for (i=0; i<MAXIMUS_CHANNEL_VALUE_MAX_NB; i++)
{
- max = mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE];
- break;
+ if (NONE != (unsigned short int)mMappingArray[i][modulation])
+ {
+ max = mMappingArray[i][MAXIMUS_CHANNEL_I_Q_VALUE];
+ break;
+ }
}
- }
-
- /* If abscissa or ordinate exceeds this maximum value,
- * set it to the maximum value. */
-
- if (x > max)
- {
- x = max;
- }
- else if (x < -max)
- {
- x = -max;
- }
- if (y > max)
- {
- y = max;
- }
- else if (y < -max)
- {
- y = -max;
- }
-
- /* Retrieve the I and Q coordinates from abscissa and ordinate. */
-
- for (int j=i; j<MAXIMUS_CHANNEL_VALUE_MAX_NB-i; j++)
- {
- if ( (x <= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] + 1)
- && (x >= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] - 1) )
+
+ /* If abscissa or ordinate exceeds this maximum value,
+ * set it to the maximum value. */
+
+ if (x > max)
{
- x = mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE];
- break;
+ x = max;
}
- }
-
- for (int j=i; j<MAXIMUS_CHANNEL_VALUE_MAX_NB-i; j++)
- {
- if ( (y <= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] + 1)
- && (y >= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] - 1) )
+ else if (x < -max)
{
- y = mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE];
- break;
+ x = -max;
+ }
+ if (y > max)
+ {
+ y = max;
+ }
+ else if (y < -max)
+ {
+ y = -max;
}
- }
-
- // For BPSK, the Q value is not used
- if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
- {
- y = 0;
- }
-
- // For QAM8, the Q value equals to 1.29 or -1.29
- else if (MAXIMUS_CHANNEL_MOD_QAM8 == modulation)
- {
- (y >= 0) ? y = MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE : y = -MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE;
- }
-
- ChannelPoint(x, y).checkValidity();
- return ChannelPoint(x, y);
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-// Accessor methods
-//
+ /* Retrieve the I and Q coordinates from abscissa and ordinate. */
+ for (int j=i; j<MAXIMUS_CHANNEL_VALUE_MAX_NB-i; j++)
+ {
+ if ( (x <= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] + 1)
+ && (x >= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] - 1) )
+ {
+ x = mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE];
+ break;
+ }
+ }
-// public attribute accessor methods
-//
+ for (int j=i; j<MAXIMUS_CHANNEL_VALUE_MAX_NB-i; j++)
+ {
+ if ( (y <= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] + 1)
+ && (y >= mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE] - 1) )
+ {
+ y = mMappingArray[j][MAXIMUS_CHANNEL_I_Q_VALUE];
+ break;
+ }
+ }
+ // For BPSK, the Q value is not used
+ if (MAXIMUS_CHANNEL_MOD_BPSK == modulation)
+ {
+ y = 0;
+ }
-// private attribute accessor methods
-//
+ // For QAM8, the Q value equals to 1.29 or -1.29
+ else if (MAXIMUS_CHANNEL_MOD_QAM8 == modulation)
+ {
+ (y >= 0) ? y = MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE : y = -MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE;
+ }
+ ChannelPoint(x, y).checkValidity();
+ return ChannelPoint(x, y);
+}
bool ChannelMapping::setCode ( const Channel_Mod modulation,
const unsigned long mpdu_payload_length,
const unsigned char * p_mpdu_payload,
unsigned int & mpdu_index )
{
- //logFunction();
- bool bSetCode = false;
-
- if (NULL == p_mpdu_payload)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "MPDU payload pointer is NULL", errno);
- }
- else
- {
- unsigned short int nbOfBits = mNbOfBitsArray[modulation];
- unsigned short int offset = 24 - (8 * (nbOfBits / 8)) + (mpdu_index /* index in bits */ % 8);
- unsigned int mask = ((1 << nbOfBits) - 1) /* nbOfBits * '1' */ << offset;
- unsigned int mpduPayload = 0;
-
- // Zero padding if needed
- if (mpdu_index + nbOfBits > 8 * mpdu_payload_length)
+ //logFunction();
+ bool bSetCode = false;
+
+ if (NULL == p_mpdu_payload)
{
- if (8 * mpdu_payload_length - 2 == mpdu_index)
- {
- mpduPayload = ((*(p_mpdu_payload + mpdu_index/8)) << 24)
- | ((*(p_mpdu_payload + mpdu_index/8 + 1)) << 16);
- }
- else // mpdu_index = 8 * mpdu_payload_length - 1
- {
- mpduPayload = ((*(p_mpdu_payload + mpdu_index/8)) << 24);
- }
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "MPDU payload pointer is NULL", errno);
}
-
else
{
- mpduPayload = ((*(p_mpdu_payload + mpdu_index/8)) << 24)
- | ((*(p_mpdu_payload + mpdu_index/8 + 1)) << 16)
- | ((*(p_mpdu_payload + mpdu_index/8 + 2)) << 8)
- | (*(p_mpdu_payload + mpdu_index/8 + 3));
+ unsigned short int nbOfBits = mNbOfBitsArray[modulation];
+ unsigned short int offset = 24 - (8 * (nbOfBits / 8)) + (mpdu_index /* index in bits */ % 8);
+ unsigned int mask = ((1 << nbOfBits) - 1) /* nbOfBits * '1' */ << offset;
+ unsigned int mpduPayload = 0;
+
+ // Zero padding if needed
+ if (mpdu_index + nbOfBits > 8 * mpdu_payload_length)
+ {
+ if (8 * mpdu_payload_length - 2 == mpdu_index)
+ {
+ mpduPayload = ((*(p_mpdu_payload + mpdu_index/8)) << 24)
+ | ((*(p_mpdu_payload + mpdu_index/8 + 1)) << 16);
+ }
+ else // mpdu_index = 8 * mpdu_payload_length - 1
+ {
+ mpduPayload = ((*(p_mpdu_payload + mpdu_index/8)) << 24);
+ }
+ }
+
+ else
+ {
+ mpduPayload = ((*(p_mpdu_payload + mpdu_index/8)) << 24)
+ | ((*(p_mpdu_payload + mpdu_index/8 + 1)) << 16)
+ | ((*(p_mpdu_payload + mpdu_index/8 + 2)) << 8)
+ | (*(p_mpdu_payload + mpdu_index/8 + 3));
+ }
+
+ mCode = (mpduPayload & mask) >> offset;
+
+ mpdu_index += nbOfBits;
+ bSetCode = true;
}
- mCode = (mpduPayload & mask) >> offset;
-
- mpdu_index += nbOfBits;
- bSetCode = true;
- }
-
- return bSetCode;
+ return bSetCode;
}
bool ChannelMapping::setCode ( const unsigned short int code )
{
- //logFunction();
- bool bSetCode = false;
-
- if (MAXIMUS_CHANNEL_CODE_MAX_VALUE < code)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "code value is out-of-range", errno);
- }
- else
- {
- mCode = code;
- bSetCode = true;
- }
-
- return bSetCode;
+ //logFunction();
+ bool bSetCode = false;
+
+ if (MAXIMUS_CHANNEL_CODE_MAX_VALUE < code)
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "code value is out-of-range", errno);
+ }
+ else
+ {
+ mCode = code;
+ bSetCode = true;
+ }
+
+ return bSetCode;
}
unsigned short int ChannelMapping::getCode ( ) const
{
- if (MAXIMUS_CHANNEL_CODE_MAX_VALUE < mCode)
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "code value is out-of-range", errno);
- }
+ if (MAXIMUS_CHANNEL_CODE_MAX_VALUE < mCode)
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "code value is out-of-range", errno);
+ }
- return mCode;
+ return mCode;
}
bool ChannelMapping::setPoint ( const ChannelPoint & point )
{
- //logFunction();
+ //logFunction();
- mPoint = point;
+ mPoint = point;
- return true;
+ return true;
}
ChannelPoint & ChannelMapping::getPoint ( )
{
- return mPoint;
+ return mPoint;
}
bool ChannelMapping::setI ( const float i )
{
- getPoint().I = i;
+ getPoint().I = i;
- return true;
+ return true;
}
float ChannelMapping::getI ( )
{
- return getPoint().I;
+ return getPoint().I;
}
bool ChannelMapping::setQ ( const float q )
{
- getPoint().Q = q;
+ getPoint().Q = q;
- return true;
+ return true;
}
float ChannelMapping::getQ ( )
{
- return getPoint().Q;
+ return getPoint().Q;
}
unsigned short int ChannelMapping::getNbOfBitsArray ( enum Channel_Mod channel_mod )
{
- return mNbOfBitsArray[channel_mod];
+ return mNbOfBitsArray[channel_mod];
}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/channel/src/ChannelMappingTest.cpp b/cesar/maximus/channel/src/ChannelMappingTest.cpp
deleted file mode 100644
index cfe0f0bd47..0000000000
--- a/cesar/maximus/channel/src/ChannelMappingTest.cpp
+++ /dev/null
@@ -1,432 +0,0 @@
-
-#include "ChannelMappingTest.h"
-
-#include "ChannelMapping.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-#include <cstring>
-
-CPPUNIT_TEST_SUITE_REGISTRATION (ChannelMappingTest);
-
-
-void ChannelMappingTest::setUp (void)
-{
- logTest();
-
- mpChannelMapping = new ChannelMapping();
- CPPUNIT_ASSERT_MESSAGE ( "Channel Mapping pointer is NULL", NULL != mpChannelMapping );
-}
-
-
-void ChannelMappingTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpChannelMapping)
- {
- delete (mpChannelMapping);
- mpChannelMapping = NULL;
- }
-}
-
-
-void ChannelMappingTest::setCodeTest (void)
-{
- logTest();
-
- unsigned short int c = 0xF;
- CPPUNIT_ASSERT_MESSAGE ( "setCode failed",
- (mpChannelMapping->setCode(c))
- && (c == mpChannelMapping->getCode()) );
-
- Channel_Mod mod = MAXIMUS_CHANNEL_MOD_QAM16; // 4 bits
- unsigned char payload[512];
- memset(payload, 0x1E, 512);
- unsigned int index = 500 * 8;
- c = 0xE;
- CPPUNIT_ASSERT_MESSAGE ( "setCode failed",
- (mpChannelMapping->setCode(mod, 512, payload, index))
- && (c == mpChannelMapping->getCode())
- && (500 * 8 + 4 == index) );
- c = 0x1;
- CPPUNIT_ASSERT_MESSAGE ( "setCode failed",
- (mpChannelMapping->setCode(mod, 512, payload, index))
- && (c == mpChannelMapping->getCode())
- && (501 * 8 == index) );
-
- mod = MAXIMUS_CHANNEL_MOD_QAM1024; // 10 bits
- index += 4;
- c = 0x1E1;
- CPPUNIT_ASSERT_MESSAGE ( "setCode failed",
- (mpChannelMapping->setCode(mod, 512, payload, index))
- && (c == mpChannelMapping->getCode())
- && (502 * 8 + 6 == index) );
-
- mod = MAXIMUS_CHANNEL_MOD_QAM256; // 8 bits
- c = 0x78;
- CPPUNIT_ASSERT_MESSAGE ( "setCode failed",
- (mpChannelMapping->setCode(mod, 512, payload, index))
- && (c == mpChannelMapping->getCode())
- && (503 * 8 + 6 == index) );
-
- // Test zero padding
- mod = MAXIMUS_CHANNEL_MOD_QAM64; // 6 bits
- index = 511 * 8 + 6;
- c = 0x0;
- CPPUNIT_ASSERT_MESSAGE ( "setCode failed",
- (mpChannelMapping->setCode(mod, 512, payload, index))
- && (c == mpChannelMapping->getCode())
- && (512 * 8 + 4 == index) );
- index = 511 * 8 + 4;
- c = 0x1;
- CPPUNIT_ASSERT_MESSAGE ( "setCode failed",
- (mpChannelMapping->setCode(mod, 512, payload, index))
- //&& (c == mpChannelMapping->getCode())
- && (512 * 8 + 2 == index) );
-}
-
-
-void ChannelMappingTest::computeCodeTest (void)
-{
- logTest();
-
- // Basic test
- ChannelPoint p(1, 3);
- mpChannelMapping->setPoint(p);
- Channel_Mod mod = MAXIMUS_CHANNEL_MOD_QAM16;
- unsigned short int c = 0xE;
- CPPUNIT_ASSERT_MESSAGE ( "code failed",
- c == mpChannelMapping->computeCode(mod) );
-
- /* Test all possible coordinates for all modulations. */
- short int coordinate[32] = { -1, 1, // BPSK and QPSK
- -3, 3, // QAM8 and QAM16
- -7, 7, -5, 5, // QAM64
- -15, 15, -13, 13, -9, 9, -11, 11, // QAM256
- -31, 31, -29, 29, -25, 25, -27, 27, -17, 17, -19, 19, -23, 23, -21, 21 }; // QAM1024
- ChannelPoint point[1024];
- int n, N;
-
- // Test for BPSK
- mod = MAXIMUS_CHANNEL_MOD_BPSK;
- N = 2;
- for (n=0; n<N; n++)
- {
- mpChannelMapping->setCode(n);
- mpChannelMapping->computePoint(mod);
- CPPUNIT_ASSERT_MESSAGE ( "computeCode BPSK failed",
- n == mpChannelMapping->computeCode(mod) );
- }
- for (n=0; n<N; n++)
- {
- point[n].I = coordinate[n%N];
- point[n].Q = 0;
- mpChannelMapping->setCode(n);
- CPPUNIT_ASSERT_MESSAGE ( "computePoint BPSK failed",
- point[n] == mpChannelMapping->computePoint(mod) );
- CPPUNIT_ASSERT_MESSAGE ( "computeCode BPSK failed",
- n == mpChannelMapping->computeCode(mod) );
- }
-
- // Test for QPSK
- mod = MAXIMUS_CHANNEL_MOD_QPSK;
- N = 4;
- for (n=0; n<N; n++)
- {
- point[n].I = coordinate[n%(N/2)];
- point[n].Q = coordinate[n/(N/2)];
- mpChannelMapping->setCode(n);
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QPSK failed",
- point[n] == mpChannelMapping->computePoint(mod) );
- CPPUNIT_ASSERT_MESSAGE ( "computeCode QPSK failed",
- n == mpChannelMapping->computeCode(mod) );
- }
-
- // Test for QAM8
- mod = MAXIMUS_CHANNEL_MOD_QAM8;
- N = 8;
- point[0].I = -1;
- point[1].I = -3;
- point[2].I = 1;
- point[3].I = 3;
- point[4].I = -1;
- point[5].I = -3;
- point[6].I = 1;
- point[7].I = 3;
- for (n=0; n<N; n++)
- {
- point[n].Q = (n > 3) ? 1.29f : -1.29f;
- mpChannelMapping->setCode(n);
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QAM8 failed",
- point[n] == mpChannelMapping->computePoint(mod) );
- CPPUNIT_ASSERT_MESSAGE ( "computeCode QAM8 failed",
- n == mpChannelMapping->computeCode(mod) );
- }
-
- // Test for QAM16
- mod = MAXIMUS_CHANNEL_MOD_QAM16;
- N = 16;
- for (n=0; n<N; n++)
- {
- mpChannelMapping->setCode(n);
- mpChannelMapping->computePoint(mod);
- CPPUNIT_ASSERT_MESSAGE ( "computeCode QAM16 failed",
- n == mpChannelMapping->computeCode(mod) );
- }
-
- // Test for QAM64
- mod = MAXIMUS_CHANNEL_MOD_QAM64;
- N = 64;
- for (n=0; n<N; n++)
- {
- mpChannelMapping->setCode(n);
- mpChannelMapping->computePoint(mod);
- CPPUNIT_ASSERT_MESSAGE ( "computeCode QPSK failed",
- n == mpChannelMapping->computeCode(mod) );
- }
-
- // Test for QAM256
- mod = MAXIMUS_CHANNEL_MOD_QAM256;
- N = 256;
- for (n=0; n<N; n++)
- {
- mpChannelMapping->setCode(n);
- mpChannelMapping->computePoint(mod);
- CPPUNIT_ASSERT_MESSAGE ( "computeCode QAM256 failed",
- n == mpChannelMapping->computeCode(mod) );
- }
-
- // Test for QAM1024
- mod = MAXIMUS_CHANNEL_MOD_QAM1024;
- N = 1024;
- for (n=0; n<N; n++)
- {
- mpChannelMapping->setCode(n);
- mpChannelMapping->computePoint(mod);
- CPPUNIT_ASSERT_MESSAGE ( "computeCode QAM1024 failed",
- n == mpChannelMapping->computeCode(mod) );
- }
-}
-
-
-void ChannelMappingTest::computePointTest (void)
-{
- logTest();
-
- // Basic test
- mpChannelMapping->setCode(0xE);
- Channel_Mod mod = MAXIMUS_CHANNEL_MOD_QAM16;
- unsigned short int i = 1, q = 3;
- CPPUNIT_ASSERT_MESSAGE ( "computePoint failed",
- (i == mpChannelMapping->computePoint(mod).I)
- && (q == mpChannelMapping->computePoint(mod).Q) );
-
- /* Test all possible code values for all modulations. */
- ChannelMapping code[1024];
- int n;
- for (n=0; n<1024; n++)
- {
- code[n].setCode(n);
- }
-
- // Test for BPSK
- mod = MAXIMUS_CHANNEL_MOD_BPSK;
- for (n=0; n<2; n++)
- {
- code[n].computePoint(mod);
- }
- CPPUNIT_ASSERT_MESSAGE ( "computePoint BPSK failed",
- (-1 == code[0].getI()) && (0 == code[0].getQ())
- && (1 == code[1].getI()) && (0 == code[1].getQ()) );
-
- // Test for QPSK
- mod = MAXIMUS_CHANNEL_MOD_QPSK;
- for (n=0; n<4; n++)
- {
- code[n].computePoint(mod);
- }
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QPSK failed",
- (-1 == code[0].getI()) && (-1 == code[0].getQ())
- && (1 == code[1].getI()) && (-1 == code[1].getQ())
- && (-1 == code[2].getI()) && (1 == code[2].getQ())
- && (1 == code[3].getI()) && (1 == code[3].getQ()) );
-
- // Test for QAM8
- mod = MAXIMUS_CHANNEL_MOD_QAM8;
- for (n=0; n<8; n++)
- {
- code[n].computePoint(mod);
- }
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QAM8 failed",
- (-1 == code[0].getI()) && (-1.29f == code[0].getQ())
- && (-3 == code[1].getI()) && (-1.29f == code[1].getQ())
- && (1 == code[2].getI()) && (-1.29f == code[2].getQ())
- && (3 == code[3].getI()) && (-1.29f == code[3].getQ())
- && (-1 == code[4].getI()) && (1.29f == code[4].getQ())
- && (-3 == code[5].getI()) && (1.29f == code[5].getQ())
- && (1 == code[6].getI()) && (1.29f == code[6].getQ())
- && (3 == code[7].getI()) && (1.29f == code[7].getQ()) );
-
- // Test for QAM16
- mod = MAXIMUS_CHANNEL_MOD_QAM16;
- for (n=0; n<16; n++)
- {
- code[n].computePoint(mod);
- }
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QAM16 failed",
- (-1 == code[0].getI()) && (-1 == code[0].getQ())
- && (-3 == code[1].getI()) && (-1 == code[1].getQ())
- && (1 == code[2].getI()) && (-1 == code[2].getQ())
- && (3 == code[3].getI()) && (-1 == code[3].getQ())
- && (-1 == code[4].getI()) && (-3 == code[4].getQ())
- && (-3 == code[5].getI()) && (-3 == code[5].getQ())
- && (1 == code[6].getI()) && (-3 == code[6].getQ())
- && (3 == code[7].getI()) && (-3 == code[7].getQ())
- && (-1 == code[8].getI()) && (1 == code[8].getQ())
- && (-3 == code[9].getI()) && (1 == code[9].getQ())
- && (1 == code[10].getI()) && (1 == code[10].getQ())
- && (3 == code[11].getI()) && (1 == code[11].getQ())
- && (-1 == code[12].getI()) && (3 == code[12].getQ())
- && (-3 == code[13].getI()) && (3 == code[13].getQ())
- && (1 == code[14].getI()) && (3 == code[14].getQ())
- && (3 == code[15].getI()) && (3 == code[15].getQ()) );
-
- // Test for QAM64
- mod = MAXIMUS_CHANNEL_MOD_QAM64;
- for (n=0; n<64; n++)
- {
- code[n].computePoint(mod);
- }
- short int coordinate64[8] = { -1, -3, -7, -5, 1, 3, 7, 5 };
- for (n=0; n<64; n+=8)
- {
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QAM64 failed",
- (coordinate64[0] == code[n].getI()) && (coordinate64[n/8] == code[n].getQ())
- && (coordinate64[1] == code[n+1].getI()) && (coordinate64[n/8] == code[n+1].getQ())
- && (coordinate64[2] == code[n+2].getI()) && (coordinate64[n/8] == code[n+2].getQ())
- && (coordinate64[3] == code[n+3].getI()) && (coordinate64[n/8] == code[n+3].getQ())
- && (coordinate64[4] == code[n+4].getI()) && (coordinate64[n/8] == code[n+4].getQ())
- && (coordinate64[5] == code[n+5].getI()) && (coordinate64[n/8] == code[n+5].getQ())
- && (coordinate64[6] == code[n+6].getI()) && (coordinate64[n/8] == code[n+6].getQ())
- && (coordinate64[7] == code[n+7].getI()) && (coordinate64[n/8] == code[n+7].getQ()) );
- }
-
- // Test for QAM256
- mod = MAXIMUS_CHANNEL_MOD_QAM256;
- for (n=0; n<256; n++)
- {
- code[n].computePoint(mod);
- }
- short int coordinate256[16] = { -1, -3, -7, -5, -15, -13, -9, -11, 1, 3, 7, 5, 15, 13, 9, 11 };
- for (n=0; n<256; n+=16)
- {
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QAM256 failed",
- (coordinate256[0] == code[n].getI()) && (coordinate256[n/16] == code[n].getQ())
- && (coordinate256[1] == code[n+1].getI()) && (coordinate256[n/16] == code[n+1].getQ())
- && (coordinate256[2] == code[n+2].getI()) && (coordinate256[n/16] == code[n+2].getQ())
- && (coordinate256[3] == code[n+3].getI()) && (coordinate256[n/16] == code[n+3].getQ())
- && (coordinate256[4] == code[n+4].getI()) && (coordinate256[n/16] == code[n+4].getQ())
- && (coordinate256[5] == code[n+5].getI()) && (coordinate256[n/16] == code[n+5].getQ())
- && (coordinate256[6] == code[n+6].getI()) && (coordinate256[n/16] == code[n+6].getQ())
- && (coordinate256[7] == code[n+7].getI()) && (coordinate256[n/16] == code[n+7].getQ())
- && (coordinate256[8] == code[n+8].getI()) && (coordinate256[n/16] == code[n+8].getQ())
- && (coordinate256[9] == code[n+9].getI()) && (coordinate256[n/16] == code[n+9].getQ())
- && (coordinate256[10] == code[n+10].getI()) && (coordinate256[n/16] == code[n+10].getQ())
- && (coordinate256[11] == code[n+11].getI()) && (coordinate256[n/16] == code[n+11].getQ())
- && (coordinate256[12] == code[n+12].getI()) && (coordinate256[n/16] == code[n+12].getQ())
- && (coordinate256[13] == code[n+13].getI()) && (coordinate256[n/16] == code[n+13].getQ())
- && (coordinate256[14] == code[n+14].getI()) && (coordinate256[n/16] == code[n+14].getQ())
- && (coordinate256[15] == code[n+15].getI()) && (coordinate256[n/16] == code[n+15].getQ()) );
- }
-
- // Test for QAM1024
- mod = MAXIMUS_CHANNEL_MOD_QAM1024;
- for (n=0; n<1024; n++)
- {
- code[n].computePoint(mod);
- }
- short int coordinate1024[32] = { -1, -3, -7, -5, -15, -13, -9, -11, -31, -29, -25, -27, -17, -19, -23, -21, \
- 1, 3, 7, 5, 15, 13, 9, 11, 31, 29, 25, 27, 17, 19, 23, 21 };
- for (n=0; n<1024; n+=32)
- {
- CPPUNIT_ASSERT_MESSAGE ( "computePoint QAM1024 failed",
- (coordinate1024[0] == code[n].getI()) && (coordinate1024[n/32] == code[n].getQ())
- && (coordinate1024[1] == code[n+1].getI()) && (coordinate1024[n/32] == code[n+1].getQ())
- && (coordinate1024[2] == code[n+2].getI()) && (coordinate1024[n/32] == code[n+2].getQ())
- && (coordinate1024[3] == code[n+3].getI()) && (coordinate1024[n/32] == code[n+3].getQ())
- && (coordinate1024[4] == code[n+4].getI()) && (coordinate1024[n/32] == code[n+4].getQ())
- && (coordinate1024[5] == code[n+5].getI()) && (coordinate1024[n/32] == code[n+5].getQ())
- && (coordinate1024[6] == code[n+6].getI()) && (coordinate1024[n/32] == code[n+6].getQ())
- && (coordinate1024[7] == code[n+7].getI()) && (coordinate1024[n/32] == code[n+7].getQ())
- && (coordinate1024[8] == code[n+8].getI()) && (coordinate1024[n/32] == code[n+8].getQ())
- && (coordinate1024[9] == code[n+9].getI()) && (coordinate1024[n/32] == code[n+9].getQ())
- && (coordinate1024[10] == code[n+10].getI()) && (coordinate1024[n/32] == code[n+10].getQ())
- && (coordinate1024[11] == code[n+11].getI()) && (coordinate1024[n/32] == code[n+11].getQ())
- && (coordinate1024[12] == code[n+12].getI()) && (coordinate1024[n/32] == code[n+12].getQ())
- && (coordinate1024[13] == code[n+13].getI()) && (coordinate1024[n/32] == code[n+13].getQ())
- && (coordinate1024[14] == code[n+14].getI()) && (coordinate1024[n/32] == code[n+14].getQ())
- && (coordinate1024[15] == code[n+15].getI()) && (coordinate1024[n/32] == code[n+15].getQ())
- && (coordinate1024[16] == code[n+16].getI()) && (coordinate1024[n/32] == code[n+16].getQ())
- && (coordinate1024[17] == code[n+17].getI()) && (coordinate1024[n/32] == code[n+17].getQ())
- && (coordinate1024[18] == code[n+18].getI()) && (coordinate1024[n/32] == code[n+18].getQ())
- && (coordinate1024[19] == code[n+19].getI()) && (coordinate1024[n/32] == code[n+19].getQ())
- && (coordinate1024[20] == code[n+20].getI()) && (coordinate1024[n/32] == code[n+20].getQ())
- && (coordinate1024[21] == code[n+21].getI()) && (coordinate1024[n/32] == code[n+21].getQ())
- && (coordinate1024[22] == code[n+22].getI()) && (coordinate1024[n/32] == code[n+22].getQ())
- && (coordinate1024[23] == code[n+23].getI()) && (coordinate1024[n/32] == code[n+23].getQ())
- && (coordinate1024[24] == code[n+24].getI()) && (coordinate1024[n/32] == code[n+24].getQ())
- && (coordinate1024[25] == code[n+25].getI()) && (coordinate1024[n/32] == code[n+25].getQ())
- && (coordinate1024[26] == code[n+26].getI()) && (coordinate1024[n/32] == code[n+26].getQ())
- && (coordinate1024[27] == code[n+27].getI()) && (coordinate1024[n/32] == code[n+27].getQ())
- && (coordinate1024[28] == code[n+28].getI()) && (coordinate1024[n/32] == code[n+28].getQ())
- && (coordinate1024[29] == code[n+29].getI()) && (coordinate1024[n/32] == code[n+29].getQ())
- && (coordinate1024[30] == code[n+30].getI()) && (coordinate1024[n/32] == code[n+30].getQ())
- && (coordinate1024[31] == code[n+31].getI()) && (coordinate1024[n/32] == code[n+31].getQ()) );
- }
-}
-
-
-void ChannelMappingTest::retrievePointTest (void)
-{
- logTest();
-
- // Test for BPSK
- Channel_Mod mod = MAXIMUS_CHANNEL_MOD_BPSK;
- mpChannelMapping->setPoint(ChannelPoint(1.1, 0.1));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(1, 0) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(-2.3456789, 3));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(-1, 0) == mpChannelMapping->retrievePoint(mod) );
-
- // Test for QPSK
- mod = MAXIMUS_CHANNEL_MOD_QPSK;
- mpChannelMapping->setPoint(ChannelPoint(0, 2));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(1, 1) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(2, -3));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(1, -1) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(-3, 0));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(-1, 1) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(-2.3456789, -0.00000000001));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(-1, -1) == mpChannelMapping->retrievePoint(mod) );
-
- // Test for QAM8
- mod = MAXIMUS_CHANNEL_MOD_QAM8;
- mpChannelMapping->setPoint(ChannelPoint(-2, -0.1));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(-1, -1.29f) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(-2.1, -10));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(-3, -1.29f) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(1.9, -0.1));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(1, -1.29) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(2.3456789, -0.00000000001));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(3, -1.29f) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(-0.1, 0));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(-1, 1.29f) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(-4, 0));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(-3, 1.29f) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(0, 0));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(1, 1.29f) == mpChannelMapping->retrievePoint(mod) );
- mpChannelMapping->setPoint(ChannelPoint(2.3456789, 0.00000000001));
- CPPUNIT_ASSERT_MESSAGE ( "retrievePoint BPSK failed", ChannelPoint(3, 1.29f) == mpChannelMapping->retrievePoint(mod) );
-}
-
diff --git a/cesar/maximus/channel/src/ChannelPoint.cpp b/cesar/maximus/channel/src/ChannelPoint.cpp
index 513c4fd0f6..0ed134a92b 100644
--- a/cesar/maximus/channel/src/ChannelPoint.cpp
+++ b/cesar/maximus/channel/src/ChannelPoint.cpp
@@ -1,156 +1,95 @@
-/************************************************************************
- ChannelPoint.cpp - Copyright buret
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/channel/src/ChannelPoint.cpp
+ * \ingroup maximus_channel
+ *
+ */
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
+#include "maximus/channel/inc/ChannelPoint.h"
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/src/ChannelPoint.cpp
-**************************************************************************/
-
-#include "ChannelPoint.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include "channel_types.h"
-
-#include <math.h> // for 'fabs()'
-
-
-// Constructors/Destructors
-//
+#include "maximus/common/types/channel_types.h"
+#include <math.h> // for 'fabs()'
ChannelPoint::ChannelPoint ( ):
-I(0),
-Q(0)
+ I(0),
+ Q(0)
{
- //logFunction();
+ //logFunction();
}
ChannelPoint::ChannelPoint ( const float i, const float q ):
-I(0),
-Q(0)
+ I(0),
+ Q(0)
{
- //logFunction();
+ //logFunction();
- I = i;
- Q = q;
+ I = i;
+ Q = q;
}
ChannelPoint::~ChannelPoint ( )
{
- //logFunction();
+ //logFunction();
}
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
ChannelPoint & ChannelPoint::operator= ( const ChannelPoint & channel_point )
{
- //logFunction();
+ //logFunction();
- I = channel_point.I;
- Q = channel_point.Q;
+ I = channel_point.I;
+ Q = channel_point.Q;
- return *this;
+ return *this;
}
bool ChannelPoint::operator== ( const ChannelPoint & channel_point ) const
{
- //logFunction();
- bool bOperator = false;
-
- if ( (I == channel_point.I)
- && (Q == channel_point.Q))
- {
- bOperator = true;
- }
-
- return bOperator;
+ //logFunction();
+ bool bOperator = false;
+
+ if ( (I == channel_point.I)
+ && (Q == channel_point.Q))
+ {
+ bOperator = true;
+ }
+
+ return bOperator;
}
bool ChannelPoint::checkValidity ( )
{
- //logFunction();
-
- bool bCheck = (MAXIMUS_CHANNEL_I_Q_MIN_VALUE <= I)
- && (MAXIMUS_CHANNEL_I_Q_MAX_VALUE >= I)
- && ((-1 == (short int)I % 2) || (1 == (short int)I % 2))
- && (MAXIMUS_CHANNEL_I_Q_MIN_VALUE <= Q)
- && (MAXIMUS_CHANNEL_I_Q_MAX_VALUE >= Q)
- && ((-1 == (short int)Q % 2) || (1 == (short int)Q % 2)
- || (0 == Q) /* BPSK */
- || (MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE == fabs(Q))); /* QAM8 */
-
- if (!bCheck)
- {
- I = 0;
- Q = 0;
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "I or Q coordinates are out-of-range", errno);
- }
-
- return bCheck;
+ //logFunction();
+
+ bool bCheck = (MAXIMUS_CHANNEL_I_Q_MIN_VALUE <= I)
+ && (MAXIMUS_CHANNEL_I_Q_MAX_VALUE >= I)
+ && ((-1 == (short int)I % 2) || (1 == (short int)I % 2))
+ && (MAXIMUS_CHANNEL_I_Q_MIN_VALUE <= Q)
+ && (MAXIMUS_CHANNEL_I_Q_MAX_VALUE >= Q)
+ && ((-1 == (short int)Q % 2) || (1 == (short int)Q % 2)
+ || (0 == Q) /* BPSK */
+ || (MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE == fabs(Q))); /* QAM8 */
+
+ if (!bCheck)
+ {
+ I = 0;
+ Q = 0;
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "I or Q coordinates are out-of-range", errno);
+ }
+
+ return bCheck;
}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/channel/src/ChannelPointTest.cpp b/cesar/maximus/channel/src/ChannelPointTest.cpp
deleted file mode 100644
index 78fd1b07c7..0000000000
--- a/cesar/maximus/channel/src/ChannelPointTest.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-
-#include "ChannelPointTest.h"
-
-#include "ChannelPoint.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION (ChannelPointTest);
-
-
-void ChannelPointTest::setUp (void)
-{
- logTest();
-
- mpChannelPoint = new ChannelPoint();
- CPPUNIT_ASSERT_MESSAGE ( "Channel Point pointer is NULL", NULL != mpChannelPoint );
-}
-
-
-void ChannelPointTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpChannelPoint)
- {
- delete (mpChannelPoint);
- mpChannelPoint = NULL;
- }
-}
-
-
-void ChannelPointTest::checkValidityTest (void)
-{
- logTest();
-
- mpChannelPoint->I = 1;
- mpChannelPoint->Q = -1.29f;
- CPPUNIT_ASSERT_MESSAGE ( "checkValidity failed", mpChannelPoint->checkValidity() );
-}
-
diff --git a/cesar/maximus/channel/src/ChannelSettings.cpp b/cesar/maximus/channel/src/ChannelSettings.cpp
index 76fd7093f8..4a53a8968b 100644
--- a/cesar/maximus/channel/src/ChannelSettings.cpp
+++ b/cesar/maximus/channel/src/ChannelSettings.cpp
@@ -1,95 +1,61 @@
-/************************************************************************
- ChannelSettings.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/src/ChannelSettings.cpp
-**************************************************************************/
-
-#include "ChannelSettings.h"
-
-#include "Error.h"
-#include "Logger.h"
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/channel/src/ChannelSettings.cpp
+ * \ingroup maximus_channel
+ *
+ */
+
+#include "maximus/channel/inc/ChannelSettings.h"
+
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
#include "hal/phy/maximus/inc/maximus_defs.h" // for 'MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK'
#include <cstring> // memset
-// Constructors/Destructors
-//
-
ChannelSettings::ChannelSettings ( ):
-mIsConfigured(false),
-mPreDetectionDate(0),
-mFcReceptionDate(0)
+ mIsConfigured(false),
+ mPreDetectionDate(0),
+ mFcReceptionDate(0)
{
- initAttributes();
+ initAttributes();
}
void ChannelSettings::initAttributes ( )
{
- logFunction();
+ logFunction();
- // Init SNR array
- memset(mSnrArray, '\0', MAXIMUS_CHANNEL_INTERVAL_MAX_NB * (PHY_CARRIER_NB + 1) * sizeof(float));
+ // Init SNR array
+ memset(mSnrArray, '\0', MAXIMUS_CHANNEL_INTERVAL_MAX_NB * (PHY_CARRIER_NB + 1) * sizeof(float));
- // Init tonemap array
- memset(mTonemapArray, '\0', PHY_CARRIER_NB * sizeof(Channel_Mod));
+ // Init tonemap array
+ memset(mTonemapArray, '\0', PHY_CARRIER_NB * sizeof(Channel_Mod));
}
ChannelSettings::~ChannelSettings ( )
{
- logFunction();
+ logFunction();
}
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
Network_Clock_Tick ChannelSettings::getFirstSymbolStartDate ( ) const
{
- return getFcReceptionDate() - MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK;
+ return getFcReceptionDate() - MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK;
}
Channel_Mod ChannelSettings::getModulation ( const unsigned int carrier ) const
{
- return mTonemapArray[carrier];
+ return mTonemapArray[carrier];
}
@@ -97,135 +63,108 @@ float ChannelSettings::getSnr ( const Network_Clock_Tick beacon_period,
const Network_Clock_Tick symbol_start_date,
const unsigned int carrier ) const
{
- return mSnrArray[getInterval(beacon_period, symbol_start_date)][carrier + 1];
+ return mSnrArray[getInterval(beacon_period, symbol_start_date)][carrier + 1];
}
-
-// private methods
-//
-
-
bool ChannelSettings::setIsConfigured ( const bool is_configured )
{
- logFunction();
+ logFunction();
- mIsConfigured = is_configured;
+ mIsConfigured = is_configured;
- return true;
+ return true;
}
Network_Clock_Tick ChannelSettings::getPreDetectionDate ( ) const
{
- return mPreDetectionDate;
+ return mPreDetectionDate;
}
Network_Clock_Tick ChannelSettings::getFcReceptionDate ( ) const
{
- return mFcReceptionDate;
+ return mFcReceptionDate;
}
unsigned int ChannelSettings::getInterval ( const Network_Clock_Tick beacon_period,
const Network_Clock_Tick symbol_start_date ) const
{
- unsigned int i;
+ unsigned int i;
- for (i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB-1; i++)
- {
- if ( (symbol_start_date % beacon_period) / 25 < mSnrArray[i][0] )
+ for (i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB-1; i++)
{
- break;
+ if ( (symbol_start_date % beacon_period) / 25 < mSnrArray[i][0] )
+ {
+ break;
+ }
}
- }
- return i;
+ return i;
}
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
bool ChannelSettings::isConfigured ( ) const
{
- return mIsConfigured;
+ return mIsConfigured;
}
bool ChannelSettings::setSnr ( const float snr_value )
{
- logFunction();
+ logFunction();
- for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
- {
- mSnrArray[i][0] = 0; // interval
- for (int j=1; j<=PHY_CARRIER_NB; j++)
+ for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
{
- mSnrArray[i][j] = snr_value;
+ mSnrArray[i][0] = 0; // interval
+ for (int j=1; j<=PHY_CARRIER_NB; j++)
+ {
+ mSnrArray[i][j] = snr_value;
+ }
}
- }
- return setIsConfigured();
+ return setIsConfigured();
}
bool ChannelSettings::setSnr ( const float snr_values[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1] )
{
- logFunction();
+ logFunction();
- for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
- {
- for (int j=0; j<=PHY_CARRIER_NB; j++)
+ for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
{
- mSnrArray[i][j] = snr_values[i][j];
+ for (int j=0; j<=PHY_CARRIER_NB; j++)
+ {
+ mSnrArray[i][j] = snr_values[i][j];
+ }
}
- }
- return setIsConfigured();
+ return setIsConfigured();
}
bool ChannelSettings::setTonemap ( const Channel_Mod tonemap_array[PHY_CARRIER_NB + 1] )
{
- for (int i=0; i<PHY_CARRIER_NB; i++)
- {
- mTonemapArray[i] = tonemap_array[i];
- }
+ for (int i=0; i<PHY_CARRIER_NB; i++)
+ {
+ mTonemapArray[i] = tonemap_array[i];
+ }
- return true;
+ return true;
}
bool ChannelSettings::setPreDetectionDate ( const Network_Clock_Tick date )
{
- mPreDetectionDate = date;
+ mPreDetectionDate = date;
- return true;
+ return true;
}
bool ChannelSettings::setFcReceptionDate ( const Network_Clock_Tick date )
{
- mFcReceptionDate = date;
+ mFcReceptionDate = date;
- return true;
+ return true;
}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/channel/src/ChannelSettingsTest.cpp b/cesar/maximus/channel/src/ChannelSettingsTest.cpp
deleted file mode 100644
index d95ea6ae68..0000000000
--- a/cesar/maximus/channel/src/ChannelSettingsTest.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-
-#include "ChannelSettingsTest.h"
-
-#include "ChannelSettings.h"
-#include "CoreEngine.h"
-#include "IChannel.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-#include "hal/phy/maximus/inc/maximus_defs.h" // for 'MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK'
-
-#include <cstring>
-
-#define SNR_DB 16
-
-CPPUNIT_TEST_SUITE_REGISTRATION (ChannelSettingsTest);
-
-
-void ChannelSettingsTest::setUp (void)
-{
- logTest();
-
- mpChannelSettings = new ChannelSettings();
- CPPUNIT_ASSERT_MESSAGE ( "Channel Settings pointer is NULL", NULL != mpChannelSettings );
-}
-
-
-void ChannelSettingsTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpChannelSettings)
- {
- delete (mpChannelSettings);
- mpChannelSettings = NULL;
- }
-}
-
-
-void ChannelSettingsTest::getFirstSymbolStartDateTest (void)
-{
- logTest();
-
- try
- {
- mpChannelSettings->setFcReceptionDate(15*25);
- CPPUNIT_ASSERT_MESSAGE ( "getFirstSymbolStartDate failed",
- 10*25 == mpChannelSettings->getFirstSymbolStartDate() );
- }
- catch (Error & e)
- {
- e.display();
- }
-}
-
-
-void ChannelSettingsTest::getModulationTest (void)
-{
- logTest();
-
- try
- {
- Channel_Mod tonemapArray[PHY_CARRIER_NB + 1];
- for (int i=0; i<=PHY_CARRIER_NB; i++)
- {
- tonemapArray[i] = MAXIMUS_CHANNEL_MOD_NONE;
- }
- tonemapArray[50] = MAXIMUS_CHANNEL_MOD_QPSK;
- mpChannelSettings->setTonemap(tonemapArray);
- CPPUNIT_ASSERT_MESSAGE ( "getModulation failed",
- MAXIMUS_CHANNEL_MOD_QPSK == mpChannelSettings->getModulation(50) );
- }
- catch (Error & e)
- {
- e.display();
- }
-}
-
-
-void ChannelSettingsTest::getSnrTest (void)
-{
- logTest();
-
- try
- {
- float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
- memset(snrArray, '\0', MAXIMUS_CHANNEL_INTERVAL_MAX_NB * (PHY_CARRIER_NB + 1));
- snrArray[0][0] = 10000; // in ticks 25 MHz
- snrArray[1][0] = 20000;
- snrArray[2][0] = 30000;
- snrArray[3][0] = 40000;
- snrArray[0][1] = 10; // in dB
- snrArray[1][1] = 11;
- snrArray[2][1] = 12;
- snrArray[3][1] = 13;
- snrArray[0][1155] = 14;
- snrArray[1][1155] = 15;
- snrArray[2][1155] = 16;
- snrArray[3][1155] = 17;
- mpChannelSettings->setSnr(snrArray);
- Network_Clock_Tick beaconPeriod = 1000000; // in ticks 25 MHz
-
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 10 == mpChannelSettings->getSnr(beaconPeriod, 5150000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 11 == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 260000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 12 == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 520000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 13 == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 780000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 14 == mpChannelSettings->getSnr(beaconPeriod, 5150000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 15 == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 260000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 16 == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 520000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", 17 == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 780000, 1154) );
- }
- catch (Error & e)
- {
- e.display();
- }
-}
-
-
-void ChannelSettingsTest::setSnrArrayTest (void)
-{
- logTest();
-
- try
- {
- float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
- memset(snrArray, 0, MAXIMUS_CHANNEL_INTERVAL_MAX_NB * (PHY_CARRIER_NB + 1));
- snrArray[0][0] = 999999999; // in ticks 25 MHz
- for (int l=1; l<PHY_CARRIER_NB+1; l++)
- {
- snrArray[0][l] = SNR_DB; // in dB
- }
- mpChannelSettings->setSnr(snrArray);
- Network_Clock_Tick beaconPeriod = 1000000; // in ticks 25 MHz
-
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 260000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 520000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 780000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 260000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 520000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 780000, 1154) );
- }
- catch (Error & e)
- {
- e.display();
- }
-}
-
-
-void ChannelSettingsTest::setSnrFloatTest (void)
-{
- logTest();
-
- try
- {
- mpChannelSettings->setSnr(SNR_DB);
- Network_Clock_Tick beaconPeriod = 1000000; // in ticks 25 MHz
-
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 260000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 520000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 780000, 0) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 260000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 520000, 1154) );
- CPPUNIT_ASSERT_MESSAGE ( "getSnr failed", SNR_DB == mpChannelSettings->getSnr(beaconPeriod, 5150000 + 780000, 1154) );
- }
- catch (Error & e)
- {
- e.display();
- }
-}
-
diff --git a/cesar/maximus/common/interfaces/Maximus.h b/cesar/maximus/common/interfaces/Maximus.h
deleted file mode 100644
index ef29b1cfe3..0000000000
--- a/cesar/maximus/common/interfaces/Maximus.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/************************************************************************
- Maximus.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/Maximus.h
-**************************************************************************/
-
-#ifndef MAXIMUS_H
-#define MAXIMUS_H
-
-#include "IPhy.h" // for 'PhyMpduCb'
-#include "IEthernet.h" // for 'EtherCb'
-
-#include "networkclock_types.h" // for 'tick_t'
-#include "channel_types.h" // for 'MAXIMUS_CHANNEL_INTERVAL_MAX_NB'
-#include "sci_types.h" // for 'Sci_Msg_Station_Id'
-#include "system_types.h" // for 'File_Descriptor'
-
-#include <fstream> // for 'std::ofstream'
-#include <string> // for 'std::string'
-#include <vector> // for 'std::vector'
-
-#define catchFunction(p_maximus) \
-catch ( Error & e ) \
-{ \
- e.display(); \
- p_maximus->stop(); \
- throw; \
-}
-
-class CoreEngine;
-class ISystem;
-class IFunctionCall;
-class INetworkClock;
-class ISci;
-class IChannel;
-class Sta;
-class Msg;
-class PhySciMsgMpdu;
-
-class Error;
-
-typedef Network_Clock_Tick tick_t;
-
-typedef std::vector<Msg *> MsgsList;
-typedef std::vector<Sta *> StasList;
-
-
-/**
- * class Maximus
- */
-
-class Maximus
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- Maximus ( );
-
- /**
- * Empty Destructor
- */
- virtual ~Maximus ( );
-
- // public methods
- //
-
- /**
- * @param argc
- * @param argv
- * Initialize Maximus with main program arguments.
- */
- void init ( int argc, char * argv[] );
-
- /**
- * @param interface_cb
- * Initialize PHY with an interface callback function for PHY SCI message MPDU reception.
- */
- void init_phy ( PhyMpduCb interface_cb );
-
- /**
- * Initializes Ethernet with an interface callback function for Ether SCI message reception,
- * and creates a TAP.
- * @param ether_cb the interface Ethernet reception callback function
- * @return mEtherLogFileDescriptor
- */
- File_Descriptor init_ether ( EtherCb interface_cb );
-
- /**
- * This method handles messages reception and events processing.
- * When called, Maximus processes:
- * - received messages from all simulated stations at the current tick;
- * - all Maximus simulator events of the current tick.
- */
- void process ( );
-
- /**
- * @return Sta &
- * @param station_executable the station executable to run
- * @param seed may be needed for Cesar initialization
- * Create a new station.
- * Return a reference on a station object.
- */
- Sta & create_sta ( const std::string & station_executable = std::string(), uint32_t seed = 0 );
-
- /**
- * @return Msg &
- * @param name
- * Create a function message, which name is set to name.
- * Return a reference on a message object.
- */
- Msg & create_fc ( const std::string & name );
-
- /**
- * @return Msg &
- * Create a probe message.
- * Return a reference on a message object.
- */
- Msg & create_probe ( );
-
- /**
- * Creates a PHY SCI message MPDU.
- * Returns a pointer to a PHY SCI message MPDU object.
- * @return PhySciMsgMpdu *
- */
- PhySciMsgMpdu * create_mpdu ( );
-
- /**
- * Sends an already configured PHY SCI message MPDU.
- * @param p_mpdu
- * @return bool
- */
- void send_mpdu ( PhySciMsgMpdu * p_mpdu );
-
- /**
- * Creates an Ether SCI message.
- * Returns a pointer to an Ether SCI message object.
- * @return EtherSciMsg *
- */
- EtherSciMsg * create_ether ( );
-
- /**
- * Sends an already configured Ether SCI message.
- * @param ether
- * @return bool
- */
- void send_ether ( EtherSciMsg & ether );
-
- /**
- * @param value
- * Wait until (Maximus current tick + value) is reached.
- */
- void wait ( const tick_t value );
-
- /**
- * Wait until all responses to sent function messages in asynchronous mode are received.
- */
- void wait ( );
-
- /**
- * Enable or disable the channel perturbation.
- */
- void disturb_channel ( const bool enable = true );
-
- /**
- * Get the Network Clock current tick.
- */
- tick_t get_date ( );
-
- /**
- * Set the power line frequency.
- */
- void set_freq ( const float frequency );
-
- /**
- * Get the power line frequency.
- */
- float get_freq ( );
-
- /**
- * Set the SNR.
- */
- void set_snr ( const float snr_value );
- void set_snr ( const std::string & snr_file );
- void set_snr_from_src ( const float snr_value, const Sta & src, const bool both_directions );
- void set_snr_from_src ( const std::string & snr_file, const Sta & src, const bool both_directions );
- void set_snr_to_dst ( const float snr_value, const Sta & dst, const bool both_directions );
- void set_snr_to_dst ( const std::string & snr_file, const Sta & dst, const bool both_directions );
- void set_snr_from_src_to_dst ( const float snr_value, const Sta & src, const Sta & dst, const bool both_directions );
- void set_snr_from_src_to_dst ( const std::string & snr_file, const Sta & src, const Sta & dst, const bool both_directions );
-
- /**
- * Activate wrong preambles transmission.
- * @param average_duration average number of ticks 25 MHz between two consecutive wrong preambles
- * @param std_deviation the standard deviation
- */
- void activate_false_alarm ( const Network_Clock_Tick average_duration, const float std_deviation );
-
- /**
- * Deactivate wrong preambles transmission.
- */
- void deactivate_false_alarm ( );
-
- /**
- * Indicate if the station is IDLE or not.
- * @param station_id the ID of the station
- * @return 'true' if the station is IDLE, 'false' otherwise
- */
- bool is_station_idle ( Sci_Msg_Station_Id station_id );
-
- /**
- * Authorize or not PLC communication between 2 stations.
- * @param sta1 one of the concerned stations (order has no importance)
- * @param sta2 the second station
- * @param hidden indicates if the stations have to be hidden or visible from each other
- */
- void hide_sta (const Sta & sta1, const Sta & sta2, bool hidden);
-
-private:
-
- // private attributes
- //
-
- CoreEngine * mpCoreEngine;
- std::ofstream mMaximusLogFile;
- Network_Clock_Tick mMaxTickValue;
- Network_Clock_Tick mWaitTickValue;
- MsgsList mListOfMsgs;
- StasList mListOfStas;
-
- bool mIsWireshark;
- File_Descriptor mEtherLogFileDescriptor;
-
- // private methods
- //
-
- /**
- * @return CoreEngine *
- */
- CoreEngine * getCoreEngine ( );
-
- /**
- * @return ISystem *
- */
- ISystem * getSystemManager ( );
-
- /**
- * @return IFunctionCall *
- */
- IFunctionCall * getFunctionCallManager ( );
-
- /**
- * @return INetworkClock *
- */
- INetworkClock * getNetworkClockProcessor ( );
-
- /**
- * @return IPhy *
- */
- IPhy * getPhyProcessor ( );
-
- /**
- * @return ISci *
- */
- ISci * getSciServer ( );
-
- /**
- * Gets a pointer to Channel.
- * @return mpCoreEngine->mpChannel
- */
- IChannel * getChannel ( );
-
- /**
- * Gets a pointer to Ethernet.
- * @return mpCoreEngine->mpEthernet
- */
- IEthernet * getEthernet ( );
-
- /**
- * @return Network_Clock_Tick
- */
- Network_Clock_Tick getMaxTickValue ( ) const;
-
- /**
- * @return bool
- * @param max_tick_value
- */
- bool setMaxTickValue ( const Network_Clock_Tick max_tick_value );
-
- /**
- * @return Network_Clock_Tick
- */
- Network_Clock_Tick getWaitTickValue ( ) const;
-
- /**
- * @return bool
- * @param wait_tick_value
- */
- bool setWaitTickValue ( const Network_Clock_Tick wait_tick_value );
-
- /**
- * @param snr_file the SNR file to read
- * @param the SNR array read from the SNR file
- * @return bool
- */
- bool readSnrFile ( const std::string & snr_file, float snr_array[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1] );
-
- /**
- * Indicates if Wireshark is enabled or not.
- * @return 'true' if Wireshark is enabled, 'false' otherwise
- */
- bool isWireshark ( ) const;
-
-public:
-
- // public methods
- //
-
- /**
- * Constructor (FOR UNITARY TESTS ONLY)
- */
- Maximus ( CoreEngine * p_core_engine );
-
- static void wrapper ( int n );
-
- void stop ( );
-
-};
-
-
-#endif // MAXIMUS_H
diff --git a/cesar/maximus/common/interfaces/Msg.h b/cesar/maximus/common/interfaces/Msg.h
deleted file mode 100644
index 907703dcc6..0000000000
--- a/cesar/maximus/common/interfaces/Msg.h
+++ /dev/null
@@ -1,312 +0,0 @@
-/************************************************************************
- Msg.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/Msg.h
-**************************************************************************/
-
-#ifndef MSG_H
-#define MSG_H
-
-#include "sci_types.h" // for 'Sci_Msg_Station_Id'
-#include "functioncall_types.h" // for 'PROBE_ID' and 'FUNCTION_CALL_PARAM_MAX_SIZE'
-#include "FunctionSciMsg.h" // for 'ParametersList'
-#include "FunctionCallParameter.h" // for 'ParametersList'
-
-#include <boost/function.hpp> // for 'cb_t'
-#include <string>
-
-class Sta;
-class IFunctionCall;
-class ISystem;
-class Maximus;
-class Msg;
-
-typedef boost::function <void (Msg &)> cb_t;
-
-
-/**
- * class Msg
- */
-
-class Msg
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- Msg ( Maximus * p_maximus,
- IFunctionCall * p_function_call_manager,
- ISystem * p_system_manager,
- const std::string & name = PROBE_ID );
-
- /**
- * Copy constructor
- */
- Msg ( const Msg & msg );
-
- /**
- * Empty Destructor
- */
- virtual ~Msg ( );
-
- // public methods
- //
-
- /**
- * @return Msg &
- * @param msg
- */
- Msg & operator= ( const Msg & msg );
-
- /**
- * @return Msg &
- * @param name
- * Add a void parameter named name to an existing message,
- * i.e. its length is set to 0 and its value is set to NULL.
- * Return the message.
- */
- Msg & add_param ( const std::string & name );
-
- /**
- * @return Msg &
- * @param name
- * @param length
- * @param value
- * Add a parameter named name to an existing message.
- * Its length is set to length and its value is set to value.
- * Return the message.
- */
- Msg & add_param ( const std::string & name, const unsigned long length, const unsigned char * p_value );
-
- /**
- * @return Msg &
- * @param name
- * @param value
- * Add a parameter named name to an existing message.
- * Its length is set to the size of value string and its value is set to value.
- * Return the message.
- */
- Msg & add_param ( const std::string & name, const std::string & value );
-
- /**
- * @return Msg &
- * @param name
- * @param value
- * Add a parameter named name to an existing message.
- * Its length is set to the size of value type and its value is set to value.
- * Return the message.
- */
- template <typename T> Msg & add_param ( const std::string & name, T const & value );
-
- /**
- * @return Msg &
- * @param name
- * Remove the parameter named name from an existing message.
- * Return the message.
- */
- Msg & remove_param ( const std::string & name );
-
- /**
- * @return Msg &
- * @param user_cb
- * Register a callback function to an existing function message.
- * This callback will be called when the function message response will be received.
- * If a callback had already been set, it is replaced by the new one.
- * Return the message.
- */
- Msg & set_cb ( const cb_t & user_cb );
-
- /**
- * @return Msg &
- * Remove a registered callback from an existing function message.
- * Return the message.
- */
- Msg & remove_cb ( );
-
- /**
- * @return Msg &
- * @param sta
- * Set destination station to sta for an existing message.
- * If a destination station had already been set, it is replaced by the new one.
- * Return the message.
- */
- Msg & set_sta ( Sta & sta );
-
- /**
- * Send an existing function message in the asynchronous mode,
- * i.e. Maximus does not wait for function message response reception before continuing its execution.
- * Note that before sending a function message via this method,
- * user has to set its destination station.
- */
- void send_async ( );
-
- /**
- * @param sta
- * Send an existing function message to the station sta,
- * in the asynchronous mode.
- */
- void send_async ( Sta & sta );
-
- /**
- * Send an existing message in the synchronous mode,
- * i.e. Maximus will wait for function message response reception before continuing its execution.
- * Return the received message.
- * Note that before sending a message via this method,
- * user has to set its destination station.
- */
- Msg & send ( );
-
- /**
- * @param sta
- * Send an existing message to the station sta,
- * in the synchronous mode.
- * Return the received message.
- */
- Msg & send ( Sta & sta );
-
-
- /**
- * @return bool
- * @param name
- * Return 'true' if the parameter named name exists in the message.
- */
- bool is_param ( const std::string & name ) const;
-
- /**
- * @return unsigned char *
- * @param name
- * @param length
- * @param p_data
- * Retrieve contents of the parameter named name.
- * Return updated length of the received parameter via length and a pointer to its value via p_data.
- * Return NULL if the parameter named name does not exist in the message, else return p_data.
- * Note that user has to allocate enough memory for parameter value.
- * If parameter value length is unknown, user has to allocate FUNCTION_CALL_PARAM_MAX_SIZE bytes.
- */
- unsigned char * bind_param ( const std::string & name, unsigned long & length, unsigned char * p_data ) const;
-
- /**
- * @param name
- * Return the value of the parameter named name.
- */
- template <typename T> T & bind_param ( const std::string & name ) const;
-
- /**
- * @return Function_Call_Msg_Id
- * Return mpFunctionSciMsg->mSpecializedSciMsgId.
- */
- Function_Call_Msg_Id get_tx_msg_id ( ) const;
-
- /**
- * @return Function_Call_Msg_Id
- * Return mpFunctionSciMsg->mpSpecializedSciMsgHeader->msg_id.
- */
- Function_Call_Msg_Id get_rx_msg_id ( ) const;
-
-private:
-
- // private attributes
- //
-
- Maximus * mpMaximus;
- IFunctionCall * mpFunctionCallManager;
- ISystem * mpSystemManager;
- cb_t mCallback;
- FunctionSciMsg * mpFunctionSciMsg;
- bool mResponseReceived;
-
- // private methods
- //
-
- // private attributes accessor methods
- //
-
- /**
- * @return Maximus *
- */
- Maximus * getMaximus ( ) const;
-
- /**
- * @return IFunctionCall *
- */
- IFunctionCall * getFunctionCallManager ( ) const;
-
- /**
- * @return ISystem *
- */
- ISystem * getSystemManager ( ) const;
-
- /**
- * @return cb_t
- */
- cb_t getCallback ( ) const;
-
- /**
- * @return bool
- * @param cb_t
- */
- bool setCallback ( const cb_t callback );
-
- /**
- * @return FunctionSciMsg *
- */
- FunctionSciMsg * getFunctionSciMsg ( ) const;
-
- /**
- * @return bool
- * @param function_sci_msg
- */
- bool setFunctionSciMsg ( const FunctionSciMsg & function_sci_msg );
-
- /**
- * @return bool
- */
- bool isResponseReceived ( ) const;
-
- /**
- * @return bool
- * @param bool
- */
- bool setResponseReceived ( const bool response_received );
-
-public:
-
- void receiveResponse ( const FunctionSciMsg & function_sci_msg );
-
- void receiveAsynchronousResponse ( const FunctionSciMsg & function_sci_msg );
-
-};
-
-
-#include "Msg.tpp"
-
-#endif // MSG_H
diff --git a/cesar/maximus/common/interfaces/Sta.h b/cesar/maximus/common/interfaces/Sta.h
deleted file mode 100644
index a137474e75..0000000000
--- a/cesar/maximus/common/interfaces/Sta.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/************************************************************************
- Sta.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/Sta.h
-**************************************************************************/
-
-#ifndef STA_H
-#define STA_H
-
-#include "sci_types.h" // for 'Sci_Msg_Station_Id'
-
-#include <map> // for 'map'
-#include <string>
-
-class Maximus;
-class ISystem;
-
-typedef std::map<const Sci_Msg_Station_Id, unsigned short int> StaCounter;
-
-
-
-/**
- * class Sta
- */
-
-class Sta
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- Sta ( Maximus * p_maximus, ISystem * p_system_manager, const std::string & station_executable, uint32_t seed = 0 );
-
- /**
- * Copy constructors
- */
- Sta ( const Sta & sta );
-
- /**
- * Empty Destructor
- */
- virtual ~Sta ( );
-
- // public methods
- //
-
- /**
- * @return Sta &
- * @param sta
- */
- Sta & operator= ( const Sta & sta );
-
- /**
- * Remove an existing station.
- */
- void remove ( );
-
- /**
- * Deactivate an existing station,
- * i.e. the station will not receive Maximus messages anymore, until it will be reactivated.
- */
- void deactivate ( );
-
- /**
- * Reactivate a deactivated station.
- */
- void activate ( );
-
- /**
- * Launch a debugger attached to the station executable,
- * with arguments passed to main program.
- */
- void debug ( );
-
- /**
- * Indicate if the station is IDLE or not.
- */
- bool is_idle ( ) const;
-
- /**
- * Set the station name.
- */
- void set_name ( const std::string & station_name );
-
-private:
-
- // private attributes
- //
-
- Maximus * mpMaximus; // used for 'Maximus::process()' method only
- ISystem * mpSystemManager;
- Sci_Msg_Station_Id mStationId;
-
- /* Each 'Sta' instance points to an eCos process (via 'mStationId').
- * When a 'Sta' is created from a Python script,
- * the 'Sta' copy constructor is called by the Boost.Python interface.
- * Thus, several 'Sta' instances point to the same eCos process.
- * The eCos process has to be stopped only when the last 'Sta' pointing to it is deleted,
- * i.e. when the station counter defined below equals 1. */
- static StaCounter mStaCounter;
-
- // private methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Gets a pointer to Maximus.
- * @return mpMaximus
- */
- Maximus * getMaximus ( ) const;
-
- /**
- * @return ISystem *
- */
- ISystem * getSystemManager ( ) const;
-
- /**
- * @return bool
- */
- bool resetStationId ( );
-
-public:
-
- // public methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return Sci_Msg_Station_Id
- */
- Sci_Msg_Station_Id getStationId ( ) const;
-
-};
-
-
-#endif // STA_H
diff --git a/cesar/maximus/common/types.h b/cesar/maximus/common/types.h
new file mode 100644
index 0000000000..b9c9252e53
--- /dev/null
+++ b/cesar/maximus/common/types.h
@@ -0,0 +1,24 @@
+#ifndef maximus_common_types_h
+#define maximus_common_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types.h
+ * \ingroup maximus_common
+ *
+ */
+#include "maximus/common/types/channel_types.h"
+#include "maximus/common/types/functioncall_types.h"
+#include "maximus/common/types/networkclock_types.h"
+#include "maximus/common/types/sci_types.h"
+#include "maximus/common/types/ethernet_types.h"
+#include "maximus/common/types/hal_phy_types.h"
+#include "maximus/common/types/phy_types.h"
+#include "maximus/common/types/system_types.h"
+
+#endif /* maximus_common_types_h */
diff --git a/cesar/maximus/common/types/channel_types.h b/cesar/maximus/common/types/channel_types.h
index 86552d77d8..9f925a1fd1 100644
--- a/cesar/maximus/common/types/channel_types.h
+++ b/cesar/maximus/common/types/channel_types.h
@@ -1,35 +1,17 @@
-/************************************************************************
- channel_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/channel_types.h
-**************************************************************************/
-
-#ifndef CHANNEL_TYPES_H
-#define CHANNEL_TYPES_H
+#ifndef maximus_common_types_channel_types_h
+#define maximus_common_types_channel_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/channel_types.h
+ * \ingroup maximus_common_types
+ *
+ */
#define MAXIMUS_CHANNEL_VALUE_MAX_NB 32
#define MAXIMUS_CHANNEL_I_Q_MAX_VALUE 31
@@ -37,20 +19,20 @@ The original location of this file is /home/buret/eclipse/maximus/common/types/c
#define MAXIMUS_CHANNEL_CODE_MAX_VALUE 0x3FF // 0b1111111111 in QAM1024
#define MAXIMUS_CHANNEL_Q_QAM8_ABSOLUTE_VALUE 1.29f
-#define MAXIMUS_CHANNEL_INTERVAL_MAX_NB 128
+#define MAXIMUS_CHANNEL_INTERVAL_MAX_NB 128
enum Channel_Mod
{
- MAXIMUS_CHANNEL_MOD_NONE = 0x00,
- MAXIMUS_CHANNEL_MOD_BPSK = 0x01,
- MAXIMUS_CHANNEL_MOD_QPSK = 0x02,
- MAXIMUS_CHANNEL_MOD_QAM8 = 0x03,
- MAXIMUS_CHANNEL_MOD_QAM16 = 0x04,
- MAXIMUS_CHANNEL_MOD_QAM64 = 0x05,
- MAXIMUS_CHANNEL_MOD_QAM256 = 0x06,
- MAXIMUS_CHANNEL_MOD_QAM1024 = 0x07,
- MAXIMUS_CHANNEL_MOD_NB = 0x08,
- MAXIMUS_CHANNEL_I_Q_VALUE = MAXIMUS_CHANNEL_MOD_NONE
+ MAXIMUS_CHANNEL_MOD_NONE = 0x00,
+ MAXIMUS_CHANNEL_MOD_BPSK = 0x01,
+ MAXIMUS_CHANNEL_MOD_QPSK = 0x02,
+ MAXIMUS_CHANNEL_MOD_QAM8 = 0x03,
+ MAXIMUS_CHANNEL_MOD_QAM16 = 0x04,
+ MAXIMUS_CHANNEL_MOD_QAM64 = 0x05,
+ MAXIMUS_CHANNEL_MOD_QAM256 = 0x06,
+ MAXIMUS_CHANNEL_MOD_QAM1024 = 0x07,
+ MAXIMUS_CHANNEL_MOD_NB = 0x08,
+ MAXIMUS_CHANNEL_I_Q_VALUE = MAXIMUS_CHANNEL_MOD_NONE
};
-#endif // CHANNEL_TYPES_H
+#endif // maximus_common_types_channel_types_h
diff --git a/cesar/maximus/common/types/ethernet_types.h b/cesar/maximus/common/types/ethernet_types.h
index 646edb32dc..3006e04ebb 100644
--- a/cesar/maximus/common/types/ethernet_types.h
+++ b/cesar/maximus/common/types/ethernet_types.h
@@ -1,35 +1,17 @@
-/************************************************************************
- ethernet_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/ethernet_types.h
-**************************************************************************/
-
-#ifndef ETHERNET_TYPES_H
-#define ETHERNET_TYPES_H
+#ifndef maximus_common_types_ethernet_types_h
+#define maximus_common_types_ethernet_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/ethernet_types.h
+ * \ingroup maximus_common_types
+ *
+ */
#include <stdint.h> /* for 'uint8_t', 'uint16_t' and 'uint32_t' types */
@@ -42,31 +24,31 @@ typedef uint8_t Ethernet_Flags; /* not used */
struct Ethernet_Header
{
- uint8_t version;
- uint8_t type;
- uint8_t flags; /* not used */
- uint8_t reserved;
+ uint8_t version;
+ uint8_t type;
+ uint8_t flags; /* not used */
+ uint8_t reserved;
} __attribute__ ((__packed__));
/* Ethernet_Header.type */
enum Ethernet_Type
{
- ETHERNET_TYPE_NONE = 0x00,
-
- /* IPMBOX_MSG_DATA > Data message type.
- * Ether SCI msg data contain the MSDU (Ethernet Frame). */
- ETHERNET_TYPE_DATA = 0x01,
- /* IPMBOX_MSG_MBX > MME message type.
- * Ether SCI msg data contain the MSDU (MME). */
- ETHERNET_TYPE_MME = 0x02,
- /* IPMBOX_MSG_EMPTY_BUF > Buffer alloc message type.
- * Ether SCI msg data contain the number of buffers to allocate (uint32_t)
- * and IDs of each buffer to allocate (uint32_t). */
- ETHERNET_TYPE_BUFFER_ADD = 0x03,
- /* IPMBOX_MSG_EMPTY_BUF > Buffer dealloc message type.
- * Ether SCI msg data contain the ID of released buffer (uint32_t). */
- ETHERNET_TYPE_BUFFER_RELEASED = 0x04,
- ETHERNET_TYPE_NB
+ ETHERNET_TYPE_NONE = 0x00,
+
+ /* IPMBOX_MSG_DATA > Data message type.
+ * Ether SCI msg data contain the MSDU (Ethernet Frame). */
+ ETHERNET_TYPE_DATA = 0x01,
+ /* IPMBOX_MSG_MBX > MME message type.
+ * Ether SCI msg data contain the MSDU (MME). */
+ ETHERNET_TYPE_MME = 0x02,
+ /* IPMBOX_MSG_EMPTY_BUF > Buffer alloc message type.
+ * Ether SCI msg data contain the number of buffers to allocate (uint32_t)
+ * and IDs of each buffer to allocate (uint32_t). */
+ ETHERNET_TYPE_BUFFER_ADD = 0x03,
+ /* IPMBOX_MSG_EMPTY_BUF > Buffer dealloc message type.
+ * Ether SCI msg data contain the ID of released buffer (uint32_t). */
+ ETHERNET_TYPE_BUFFER_RELEASED = 0x04,
+ ETHERNET_TYPE_NB
};
-#endif /* ETHERNET_TYPES_H */
+#endif /* maximus_common_types_ethernet_types_h */
diff --git a/cesar/maximus/common/types/functioncall_types.h b/cesar/maximus/common/types/functioncall_types.h
index 0a6484eb85..2f29b2b72a 100644
--- a/cesar/maximus/common/types/functioncall_types.h
+++ b/cesar/maximus/common/types/functioncall_types.h
@@ -1,35 +1,17 @@
-/************************************************************************
- functioncall_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/functioncall_types.h
-**************************************************************************/
-
-#ifndef FUNCTIONCALL_TYPES_H
-#define FUNCTIONCALL_TYPES_H
+#ifndef maximus_common_types_functioncall_types_h
+#define maximus_common_types_functioncall_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/functioncall_types.h
+ * \ingroup maximus_common_types
+ *
+ */
#include <stdint.h> // for 'uint8_t', 'uint16_t' and 'uint32_t' types
@@ -50,22 +32,22 @@ typedef uint8_t Function_Call_Flags;
struct Function_Call_Header
{
- uint8_t version;
- uint8_t type;
- uint16_t msg_id;
- uint8_t param_nb;
- uint8_t flags;
- uint16_t reserved;
+ uint8_t version;
+ uint8_t type;
+ uint16_t msg_id;
+ uint8_t param_nb;
+ uint8_t flags;
+ uint16_t reserved;
} __attribute__ ((__packed__));
// Function_Call_Header.type
//
enum Function_Call_Type
{
- FUNCTION_CALL_TYPE_NONE = 0x00,
- FUNCTION_CALL_TYPE_REQ = 0x01,
- FUNCTION_CALL_TYPE_RSP = 0x02,
- FUNCTION_CALL_TYPE_NB
+ FUNCTION_CALL_TYPE_NONE = 0x00,
+ FUNCTION_CALL_TYPE_REQ = 0x01,
+ FUNCTION_CALL_TYPE_RSP = 0x02,
+ FUNCTION_CALL_TYPE_NB
};
// Function_Call_Header.msg_id
@@ -74,6 +56,6 @@ typedef uint16_t Function_Call_Msg_Id;
// Function_Call_Header.param_nb
//
-typedef unsigned int Function_Call_Parameters_Number;
+typedef uint8_t Function_Call_Parameters_Number;
-#endif // FUNCTIONCALL_TYPES_H
+#endif // maximus_common_types_functioncall_types_h
diff --git a/cesar/maximus/common/types/hal_phy_types.h b/cesar/maximus/common/types/hal_phy_types.h
index 030ed92e95..60dd62e8e0 100644
--- a/cesar/maximus/common/types/hal_phy_types.h
+++ b/cesar/maximus/common/types/hal_phy_types.h
@@ -1,40 +1,19 @@
-/************************************************************************
- hal_phy_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/hal_phy_types.h
-**************************************************************************/
-
-#ifndef HAL_PHY_TYPES_H
-#define HAL_PHY_TYPES_H
-
-#include "common/std.h"
-#include "hal/phy/defs.h" // for 'phy_fc_mode_t', 'phy_mod_t', 'phy_fecrate_t', and 'phy_gil_t'
-
-#include <stdint.h> // for 'uint8_t', 'uint16_t' and 'uint32_t' types
+#ifndef maximus_common_types_hal_phy_types_h
+#define maximus_common_types_hal_phy_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/hal_phy_types.h
+ * \ingroup maximus_common_types
+ *
+ */
+#include "hal/phy/defs.h"
+#include <stdint.h>
// Phy_Header.pb_nb
//
@@ -72,4 +51,4 @@ typedef uint16_t Phy_Tx_Id;
//
typedef uint32_t Phy_Nb_Of_Symbols;
-#endif // HAL_PHY_TYPES_H
+#endif // maximus_common_types_hal_phy_types_h
diff --git a/cesar/maximus/common/types/networkclock_types.h b/cesar/maximus/common/types/networkclock_types.h
index bc276c6fdf..c074d57de4 100644
--- a/cesar/maximus/common/types/networkclock_types.h
+++ b/cesar/maximus/common/types/networkclock_types.h
@@ -1,35 +1,18 @@
-/************************************************************************
- networkclock_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/networkclock_types.h
-**************************************************************************/
-
-#ifndef NETWORKCLOCK_TYPES_H
-#define NETWORKCLOCK_TYPES_H
+#ifndef maximus_common_types_networkclock_types_h
+#define maximus_common_types_networkclock_types_h
+
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/networkclock_types.h
+ * \ingroup maximus_common
+ *
+ */
#include <stdint.h> // for 'uint8_t', 'uint16_t' and 'uint32_t' types
@@ -38,27 +21,27 @@ The original location of this file is /home/buret/eclipse/maximus/common/types/n
struct Network_Clock_Header
{
- uint8_t version;
- uint8_t type;
- uint16_t id;
- uint16_t flags;
- uint16_t reserved;
- uint32_t tick_high;
- uint32_t tick_low;
+ uint8_t version;
+ uint8_t type;
+ uint16_t id;
+ uint16_t flags;
+ uint16_t reserved;
+ uint32_t tick_high;
+ uint32_t tick_low;
} __attribute__ ((__packed__));
// Network_Clock_Header.type
//
enum Network_Clock_Type
{
- NETWORK_CLOCK_TYPE_NONE = 0x00,
- NETWORK_CLOCK_TYPE_REMOVE = 0x01,
- NETWORK_CLOCK_TYPE_STATION = 0x02,
- NETWORK_CLOCK_TYPE_FUNCTION_CALL = 0x03,
- NETWORK_CLOCK_TYPE_PHY = 0x04,
- NETWORK_CLOCK_TYPE_SYSTEM = 0x05,
- NETWORK_CLOCK_TYPE_ETHERNET = 0x06,
- NETWORK_CLOCK_TYPE_NB
+ NETWORK_CLOCK_TYPE_NONE = 0x00,
+ NETWORK_CLOCK_TYPE_REMOVE = 0x01,
+ NETWORK_CLOCK_TYPE_STATION = 0x02,
+ NETWORK_CLOCK_TYPE_FUNCTION_CALL = 0x03,
+ NETWORK_CLOCK_TYPE_PHY = 0x04,
+ NETWORK_CLOCK_TYPE_SYSTEM = 0x05,
+ NETWORK_CLOCK_TYPE_ETHERNET = 0x06,
+ NETWORK_CLOCK_TYPE_NB
};
// Network_Clock_Header.id
@@ -70,4 +53,4 @@ typedef uint16_t Network_Clock_Id;
//
typedef unsigned long long Network_Clock_Tick;
-#endif // NETWORKCLOCK_TYPES_H
+#endif // maximus_common_types_networkclock_types_h
diff --git a/cesar/maximus/common/types/phy_types.h b/cesar/maximus/common/types/phy_types.h
index 0df4e0dd97..9eab2d93c0 100644
--- a/cesar/maximus/common/types/phy_types.h
+++ b/cesar/maximus/common/types/phy_types.h
@@ -1,37 +1,19 @@
-/************************************************************************
- phy_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/phy_types.h
-**************************************************************************/
-
-#ifndef PHY_TYPES_H
-#define PHY_TYPES_H
-
-#include "sci_types.h"
+#ifndef maximus_common_types_phy_types_h
+#define maximus_common_types_phy_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/phy_types.h
+ * \ingroup maximus_common_types
+ *
+ */
+
+#include "maximus/common/types/sci_types.h"
#include "mac/common/defs.h" // for 'MAC_PB520_BYTES'
#include "mac/common/timings.h"
@@ -39,8 +21,8 @@ The original location of this file is /home/buret/eclipse/maximus/common/types/p
#include <stdint.h> // for 'uint8_t', 'uint16_t' and 'uint32_t' types
#define PHY_VERSION 0x02
-#define PHY_PB_MAX_NB (SCI_MSG_MAX_SIZE/MAC_PB520_BYTES - 1) // = 31 per MPDU (-1 because of PHY header size)
-#define PHY_MSG_MAX_NB_PER_MPDU (MAC_MAX_PB_PER_MPDU/PHY_PB_MAX_NB + 1)
+#define PHY_PB_MAX_NB MAC_MAX_PB_PER_MPDU
+#define PHY_MSG_MAX_NB_PER_MPDU 2
/** Length of PB header and ICV in bytes. */
#define PHY_PB_HDR_SIZE 4
@@ -69,60 +51,60 @@ typedef uint16_t Phy_Flags;
struct Phy_Header
{
- uint8_t version;
- uint8_t type;
- uint8_t mpdu_format; // delimiter type that indicates PHY SCI msg format in case of PHY_TYPE_MPDU_PAYLOAD
- uint8_t pb_nb; // if PB size is set to 128 octets, there is only one PB
- uint8_t msg_nb; // total number of messages needed to transmit the MPDU (in case of PHY_TYPE_MPDU_PAYLOAD)
- uint8_t fc_mode; // phy_fc_mode_t
- uint8_t short_ppdu; // bool
- uint8_t mod; // phy_mod_t
- uint8_t fecrate; // phy_fecrate_t
- uint8_t gil; // phy_gil_t
- uint8_t tonemap_index;
- uint8_t reserved;
- uint16_t tx_id; // unique ID incremented for each transmission
- uint16_t flags;
- uint32_t symbol_nb; // uint
- uint32_t iv[3];
- uint32_t nek[4];
- uint32_t pb_measurement[PHY_PB_MAX_NB]; // 32 bits per PB for:
- // ber (Bit Error Rate) -> 16 bits
- // halfit -> 5 bits
- // crc_error -> 1 bit
- uint32_t pb_header[PHY_PB_MAX_NB]; // 4 octets per PB
+ uint8_t version;
+ uint8_t type;
+ uint8_t mpdu_format; // delimiter type that indicates PHY SCI msg format in case of PHY_TYPE_MPDU_PAYLOAD
+ uint8_t pb_nb; // if PB size is set to 128 octets, there is only one PB
+ uint8_t msg_nb; // total number of messages needed to transmit the MPDU (in case of PHY_TYPE_MPDU_PAYLOAD)
+ uint8_t fc_mode; // phy_fc_mode_t
+ uint8_t short_ppdu; // bool
+ uint8_t mod; // phy_mod_t
+ uint8_t fecrate; // phy_fecrate_t
+ uint8_t gil; // phy_gil_t
+ uint8_t tonemap_index;
+ uint8_t reserved;
+ uint16_t tx_id; // unique ID incremented for each transmission
+ uint16_t flags;
+ uint32_t symbol_nb; // uint
+ uint32_t iv[3];
+ uint32_t nek[4];
+ uint32_t pb_measurement[MAC_MAX_PB_PER_MPDU]; // 32 bits per PB for:
+ // ber (Bit Error Rate) -> 16 bits
+ // halfit -> 5 bits
+ // crc_error -> 1 bit
+ uint32_t pb_header[MAC_MAX_PB_PER_MPDU]; // 4 octets per PB
} __attribute__ ((__packed__));
// Phy_Header.type
//
enum Phy_Type
{
- PHY_TYPE_NONE = 0x00,
- PHY_TYPE_PREAMBLE = 0x01, // PHY SCI msg data are empty
- PHY_TYPE_FC_HYBRID_MODE = 0x02, // PHY SCI msg data contain HP1.0.1 Frame Control (25 bits => on 4 octets) and AV Frame Control (128 bits)
- PHY_TYPE_FC_AV_ONLY_MODE = 0x03, // PHY SCI msg data only contain AV Frame Control (128 bits)
- PHY_TYPE_PRS = 0x04, // PHY SCI msg data contain PRS0 or PRS1 symbol (on 1 octet)
- PHY_TYPE_MPDU_PAYLOAD = 0x05, // PHY SCI msg data only contain MPDU payload ('nb_of_pbs' PBs of 128 or 512 octets depending on PHY_FLAG_PB512)
- PHY_TYPE_TONEMASK = 0x06, // PHY SCI msg data contain 'uint carrier_nb' and the tonemask (uses 1 block)
- PHY_TYPE_TONEMAP = 0x07, // PHY SCI msg data contain tonemap (uses 2 blocks)
- PHY_TYPE_NOISE = 0x08, // PHY SCI msg data contain 'uint16_t frequency_noise[PHY_CARRIER_NB]' and 'uint16_t time_noise[MAC_MAX_SYMB_PER_MPDU]'
- PHY_TYPE_RX = 0x09, // PHY SCI msg data contain the source station ID of the expected transmission
- PHY_TYPE_ZERO_CROSS = 0x0A, // PHY SCI msg data are empty
- PHY_TYPE_NB
+ PHY_TYPE_NONE = 0x00,
+ PHY_TYPE_PREAMBLE = 0x01, // PHY SCI msg data are empty
+ PHY_TYPE_FC_HYBRID_MODE = 0x02, // PHY SCI msg data contain HP1.0.1 Frame Control (25 bits => on 4 octets) and AV Frame Control (128 bits)
+ PHY_TYPE_FC_AV_ONLY_MODE = 0x03, // PHY SCI msg data only contain AV Frame Control (128 bits)
+ PHY_TYPE_PRS = 0x04, // PHY SCI msg data contain PRS0 or PRS1 symbol (on 1 octet)
+ PHY_TYPE_MPDU_PAYLOAD = 0x05, // PHY SCI msg data only contain MPDU payload ('nb_of_pbs' PBs of 128 or 512 octets depending on PHY_FLAG_PB512)
+ PHY_TYPE_TONEMASK = 0x06, // PHY SCI msg data contain 'uint carrier_nb' and the tonemask (uses 1 block)
+ PHY_TYPE_TONEMAP = 0x07, // PHY SCI msg data contain tonemap (uses 2 blocks)
+ PHY_TYPE_NOISE = 0x08, // PHY SCI msg data contain 'uint16_t frequency_noise[PHY_CARRIER_NB]' and 'uint16_t time_noise[MAC_MAX_SYMB_PER_MPDU]'
+ PHY_TYPE_RX = 0x09, // PHY SCI msg data contain the source station ID of the expected transmission
+ PHY_TYPE_ZERO_CROSS = 0x0A, // PHY SCI msg data are empty
+ PHY_TYPE_NB
};
// Phy_Header.mpdu_format
//
enum Phy_Mpdu_Format
{
- PHY_MPDU_FORMAT_NONE = 0x00,
- PHY_MPDU_FORMAT_BEACON = 0x01, // Beacon => Long MPDU
- PHY_MPDU_FORMAT_SOF = 0x02, // Start Of Frame => Long MPDU
- PHY_MPDU_FORMAT_SACK = 0x03, // Selective ACKnowledgement => Short MPDU (i.e. there is no payload)
- PHY_MPDU_FORMAT_RTS_CTS = 0x04, // Request To Send / Clear To Send => Short MPDU (i.e. there is no payload)
- PHY_MPDU_FORMAT_SOUND = 0x05, // Sound => Long MPDU
- PHY_MPDU_FORMAT_RSOF = 0x06, // Reverse Start Of Frame => Long MPDU
- PHY_MPDU_FORMAT_NB
+ PHY_MPDU_FORMAT_NONE = 0x00,
+ PHY_MPDU_FORMAT_BEACON = 0x01, // Beacon => Long MPDU
+ PHY_MPDU_FORMAT_SOF = 0x02, // Start Of Frame => Long MPDU
+ PHY_MPDU_FORMAT_SACK = 0x03, // Selective ACKnowledgement => Short MPDU (i.e. there is no payload)
+ PHY_MPDU_FORMAT_RTS_CTS = 0x04, // Request To Send / Clear To Send => Short MPDU (i.e. there is no payload)
+ PHY_MPDU_FORMAT_SOUND = 0x05, // Sound => Long MPDU
+ PHY_MPDU_FORMAT_RSOF = 0x06, // Reverse Start Of Frame => Long MPDU
+ PHY_MPDU_FORMAT_NB
};
-#endif // PHY_TYPES_H
+#endif // maximus_common_types_phy_types_h
diff --git a/cesar/maximus/common/types/sci_types.h b/cesar/maximus/common/types/sci_types.h
index 33701a1579..af3bc6c81e 100644
--- a/cesar/maximus/common/types/sci_types.h
+++ b/cesar/maximus/common/types/sci_types.h
@@ -1,106 +1,98 @@
-/************************************************************************
- sci_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/sci_types.h
-**************************************************************************/
-
-#ifndef SCI_TYPES_H
-#define SCI_TYPES_H
+#ifndef maximus_common_types_sci_types_h
+#define maximus_common_types_sci_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/sci_types.h
+ * \ingroup maximus_common
+ *
+ */
#include <stdint.h> /* for 'uint8_t', 'uint16_t' and 'uint32_t' types */
+#include "mac/common/defs.h" // for 'MAC_PB520_BYTES'
#define SCI_MSG_MAGIC "MAXI"
#define SCI_MSG_VERSION 0x03
#define SCI_MSG_ID_STATION 0x8000
#define SCI_MSG_ID_MASK 0x7fff
-#define SCI_MSG_MAX_SIZE 16384
+
+/* In maximus code, sometimes max size allowed include the sci header.
+ * Specific header size vary from few bytes to many bytes (more than 2kB).
+ *
+ * SCI_PATCH_HEADER is a dirty way to avoid memory corruption. All definitions
+ * about different size must be clarify to remove this define.
+ */
+#define SCI_PATCH_HEADER 8
+#define SCI_MSG_MAX_SIZE ((MAC_MAX_PB_PER_MPDU + SCI_PATCH_HEADER) \
+ * MAC_PB520_BYTES)
/* Used by SciServer. */
enum Sci_Server_Status
{
- MAXIMUS_SCI_SERVER_STATUS_NONE = 0,
- MAXIMUS_SCI_SERVER_STATUS_RUNNING = 1,
- MAXIMUS_SCI_SERVER_STATUS_STOP = 2,
- MAXIMUS_SCI_SERVER_STATUS_STOPPED = 3,
- MAXIMUS_SCI_SERVER_STATUS_NB
+ MAXIMUS_SCI_SERVER_STATUS_NONE = 0,
+ MAXIMUS_SCI_SERVER_STATUS_RUNNING = 1,
+ MAXIMUS_SCI_SERVER_STATUS_STOP = 2,
+ MAXIMUS_SCI_SERVER_STATUS_STOPPED = 3,
+ MAXIMUS_SCI_SERVER_STATUS_NB
};
/* Used by SciMsg. */
enum Sci_Msg_Status
{
- MAXIMUS_SCI_MSG_STATUS_NONE = 0,
- MAXIMUS_SCI_MSG_STATUS_TO_SEND = 1,
- MAXIMUS_SCI_MSG_STATUS_SENT = 2,
- MAXIMUS_SCI_MSG_STATUS_RECEIVED = 3,
- MAXIMUS_SCI_MSG_STATUS_PROCESSED = 4,
- MAXIMUS_SCI_MSG_STATUS_NB
+ MAXIMUS_SCI_MSG_STATUS_NONE = 0,
+ MAXIMUS_SCI_MSG_STATUS_TO_SEND = 1,
+ MAXIMUS_SCI_MSG_STATUS_SENT = 2,
+ MAXIMUS_SCI_MSG_STATUS_RECEIVED = 3,
+ MAXIMUS_SCI_MSG_STATUS_PROCESSED = 4,
+ MAXIMUS_SCI_MSG_STATUS_NB
};
/* Common SCI message structure between station and maximus. */
struct Sci_Msg_Header
{
- /* 1st field is magic id (32 bits): always “MAXI”. */
- uint32_t magic_id;
- /* 2nd field is version (8 bits): message protocol version. */
- uint8_t version;
- /* 3rd field is type (8): message type; Sci_Msg_Type. */
- uint8_t type;
- /* 4th field is length (16 bits): message length without header. */
- uint16_t length;
- /* 5th field is station id (16 bits): source or destination station id;
- * in general, the process id of the simulated station.
- * For PHY SCI messages, station id is the source station id or the Maximus pid.
- * For all other messages, station id is the destination station id. */
- uint16_t station_id;
- /* 6th field is msg id (16 bits): unique message id for each
- * station – simulator transaction.
- * 0x0001-0x7fff: request created by simulator
- * 0x8000-0xffff: request created by a station */
- uint16_t msg_id;
- /* 7th field is netclock high: high part of 64 bits NetClock value */
- uint32_t netclock_high;
- /* 8th field is netclock low: low part of 64 bits NetClock value */
- uint32_t netclock_low;
- /* 9th and last field is flags (16 bits): Sci_Msg_Flag */
- uint16_t flags;
- /* 10th field is reserved (16 bits) */
- uint16_t reserved;
+ /* 1st field is magic id (32 bits): always “MAXI”. */
+ uint32_t magic_id;
+ /* 2nd field is version (8 bits): message protocol version. */
+ uint8_t version;
+ /* 3rd field is type (8): message type; Sci_Msg_Type. */
+ uint8_t type;
+ /* 4th field is length (32 bits): message length without header. */
+ uint32_t length;
+ /* 5th field is station id (16 bits): source or destination station id;
+ * in general, the process id of the simulated station.
+ * For PHY SCI messages, station id is the source station id or the Maximus pid.
+ * For all other messages, station id is the destination station id. */
+ uint16_t station_id;
+ /* 6th field is msg id (16 bits): unique message id for each
+ * station – simulator transaction.
+ * 0x0001-0x7fff: request created by simulator
+ * 0x8000-0xffff: request created by a station */
+ uint16_t msg_id;
+ /* 7th field is netclock high: high part of 64 bits NetClock value */
+ uint32_t netclock_high;
+ /* 8th field is netclock low: low part of 64 bits NetClock value */
+ uint32_t netclock_low;
+ /* 9th and last field is flags (16 bits): Sci_Msg_Flag */
+ uint16_t flags;
+ /* 10th field is reserved (16 bits) */
+ uint16_t reserved;
} __attribute__ ((__packed__));
/* Sci_Msg_Header.type */
enum Sci_Msg_Type
{
- SCI_MSG_TYPE_NONE = 0x00,
- SCI_MSG_TYPE_NETWORK_CLOCK = 0x01,
- SCI_MSG_TYPE_FUNCTION_CALL = 0x02,
- SCI_MSG_TYPE_PHY = 0x03,
- SCI_MSG_TYPE_SYSTEM = 0x04,
- SCI_MSG_TYPE_ETHERNET = 0x05,
- SCI_MSG_TYPE_NB
+ SCI_MSG_TYPE_NONE = 0x00,
+ SCI_MSG_TYPE_NETWORK_CLOCK = 0x01,
+ SCI_MSG_TYPE_FUNCTION_CALL = 0x02,
+ SCI_MSG_TYPE_PHY = 0x03,
+ SCI_MSG_TYPE_SYSTEM = 0x04,
+ SCI_MSG_TYPE_ETHERNET = 0x05,
+ SCI_MSG_TYPE_NB
};
/* Sci_Msg_Header.station_id */
@@ -112,16 +104,16 @@ typedef uint16_t Sci_Msg_Id;
/* Sci_Msg_Header.flags */
enum Sci_Msg_Flag
{
- SCI_MSG_FLAG_NONE = 0x0000,
- /* If set, message is a response to a request;
- * else, it is a request. */
- SCI_MSG_FLAG_RESP = 0x0001,
- /* If set, message is an acknowledge to a request or a response. */
- SCI_MSG_FLAG_ACK = 0x0002,
- /* If set, an ack is requested from remote receiver. */
- SCI_MSG_FLAG_NEEDACK = 0x0004,
- /* If set, a synchronous response is required. */
- SCI_MSG_FLAG_SYNC = 0x0008
+ SCI_MSG_FLAG_NONE = 0x0000,
+ /* If set, message is a response to a request;
+ * else, it is a request. */
+ SCI_MSG_FLAG_RESP = 0x0001,
+ /* If set, message is an acknowledge to a request or a response. */
+ SCI_MSG_FLAG_ACK = 0x0002,
+ /* If set, an ack is requested from remote receiver. */
+ SCI_MSG_FLAG_NEEDACK = 0x0004,
+ /* If set, a synchronous response is required. */
+ SCI_MSG_FLAG_SYNC = 0x0008
};
-#endif /* SCI_TYPES_H */
+#endif /* maximus_common_types_sci_types_h */
diff --git a/cesar/maximus/common/types/system_types.h b/cesar/maximus/common/types/system_types.h
index d3877760d7..c3b23ea278 100644
--- a/cesar/maximus/common/types/system_types.h
+++ b/cesar/maximus/common/types/system_types.h
@@ -1,35 +1,17 @@
-/************************************************************************
- system_types.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/types/system_types.h
-**************************************************************************/
-
-#ifndef SYSTEM_TYPES_H
-#define SYSTEM_TYPES_H
+#ifndef maximus_common_types_system_types_h
+#define maximus_common_types_system_types_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/common/types/system_types.h
+ * \ingroup maximus_common_types
+ *
+ */
#include <stdint.h> // for 'uint8_t', 'uint16_t' and 'uint32_t' types
@@ -38,11 +20,11 @@ The original location of this file is /home/buret/eclipse/maximus/common/types/s
enum Station_Status
{
- MAXIMUS_STATION_STATUS_NONE = 0,
- MAXIMUS_STATION_STATUS_IDLE = 1,
- MAXIMUS_STATION_STATUS_BUSY = 2,
- MAXIMUS_STATION_STATUS_DEACTIVATED = 3,
- MAXIMUS_STATION_STATUS_NB
+ MAXIMUS_STATION_STATUS_NONE = 0,
+ MAXIMUS_STATION_STATUS_IDLE = 1,
+ MAXIMUS_STATION_STATUS_BUSY = 2,
+ MAXIMUS_STATION_STATUS_DEACTIVATED = 3,
+ MAXIMUS_STATION_STATUS_NB
};
typedef int File_Descriptor;
@@ -51,19 +33,19 @@ typedef int Error_Id;
struct System_Header
{
- uint8_t version;
- uint8_t type;
- uint16_t flags;
+ uint8_t version;
+ uint8_t type;
+ uint16_t flags;
} __attribute__ ((__packed__));
// System_Header.type
//
enum System_Type
{
- SYSTEM_TYPE_NONE = 0x00,
- SYSTEM_TYPE_IDLE = 0x01,
- SYSTEM_TYPE_STATION_NAME = 0x02, // System SCI msg data contain 'char station_name[SYSTEM_STATION_NAME_MAX_SIZE]'
- SYSTEM_TYPE_NB
+ SYSTEM_TYPE_NONE = 0x00,
+ SYSTEM_TYPE_IDLE = 0x01,
+ SYSTEM_TYPE_STATION_NAME = 0x02, // System SCI msg data contain 'char station_name[SYSTEM_STATION_NAME_MAX_SIZE]'
+ SYSTEM_TYPE_NB
};
-#endif // SYSTEM_TYPES_H
+#endif // maximus_common_types_system_types_h
diff --git a/cesar/maximus/coreengine/Module b/cesar/maximus/coreengine/Module
deleted file mode 100644
index 6a5c0c304e..0000000000
--- a/cesar/maximus/coreengine/Module
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES := CoreEngine.cpp Maximus.cpp Sta.cpp Msg.cpp
-ifdef UNITTEST
-SOURCES += CoreEngineTest.cpp MaximusTest.cpp StaTest.cpp MsgTest.cpp
-endif
-HOST_INCLUDES += maximus/coreengine/inc
diff --git a/cesar/maximus/coreengine/inc/CoreEngine.h b/cesar/maximus/coreengine/inc/CoreEngine.h
deleted file mode 100644
index 5d2440ddb4..0000000000
--- a/cesar/maximus/coreengine/inc/CoreEngine.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/************************************************************************
- CoreEngine.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/coreengine/inc/CoreEngine.h
-**************************************************************************/
-
-#ifndef COREENGINE_H
-#define COREENGINE_H
-
-#include "networkclock_types.h" // for Network_Clock_Tick
-
-#include <string>
-
-class IPhy;
-class IFunctionCall;
-class INetworkClock;
-class ISystem;
-class ISci;
-class IChannel;
-class IEthernet;
-
-
-/**
- * class CoreEngine
- * Main simulator part which is managing the overall working of PHY interface,
- * Network Clock and other AV stations.
- */
-
-class CoreEngine
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- IFunctionCall * mpFunctionCall;
- ISystem * mpSystem;
- INetworkClock * mpNetworkClock;
- IPhy * mpPhy;
- ISci * mpSci;
- IChannel * mpChannel;
- IEthernet * mpEthernet;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- CoreEngine ( );
-
- /**
- * Empty Destructor
- */
- virtual ~CoreEngine ( );
-
- // public methods
- //
-
- /**
- * Initializes the Core Engine.
- * @return bool
- */
- bool init ( const std::string station_executable,
- const std::string station_log,
- const std::string debugger,
- const float frequency );
-
- /**
- * Processes the next event in the Network Clock event list.
- * Then, processes messages coming from pipe.
- * @return bool
- */
- bool process ( const Network_Clock_Tick max_tick_value = 0 );
-
- /**
- * Creates, enables or disables Channel.
- */
- bool disturbChannel ( const bool enable );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Gets Function Call.
- * @return IFunctionCall *
- */
- IFunctionCall * getFunctionCall ( ) const;
-
- /**
- * Gets System.
- * @return ISystem *
- */
- ISystem * getSystem ( ) const;
-
- /**
- * Gets Network Clock.
- * @return INetworkClock *
- */
- INetworkClock * getNetworkClock ( ) const;
-
- /**
- * Gets PHY.
- * @return IPhy *
- */
- IPhy * getPhy ( ) const;
-
- /**
- * Gets SCI.
- * @return ISci *
- */
- ISci * getSci ( ) const;
-
- /**
- * Gets a pointer to Channel.
- * @return mpChannel
- */
- IChannel * getChannel ( ) const;
-
- /**
- * Gets a pointer to Ethernet.
- * @return mpEthernet
- */
- IEthernet * getEthernet ( ) const;
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the Core Engine class attributes.
- */
- void initAttributes ( );
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // COREENGINE_H
diff --git a/cesar/maximus/coreengine/inc/CoreEngineTest.h b/cesar/maximus/coreengine/inc/CoreEngineTest.h
deleted file mode 100644
index 35b8e8021a..0000000000
--- a/cesar/maximus/coreengine/inc/CoreEngineTest.h
+++ /dev/null
@@ -1,36 +0,0 @@
-
-#ifndef COREENGINETEST_H
-#define COREENGINETEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class CoreEngine;
-
-
-class CoreEngineTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (CoreEngineTest);
- CPPUNIT_TEST (initTest);
- CPPUNIT_TEST (disturbChannelTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void initTest (void);
- void disturbChannelTest (void);
-
-private:
-
- CoreEngine * mpCoreEngine;
-
-};
-
-
-#endif // COREENGINETEST_H
diff --git a/cesar/maximus/coreengine/inc/MaximusTest.h b/cesar/maximus/coreengine/inc/MaximusTest.h
deleted file mode 100644
index 7833dad157..0000000000
--- a/cesar/maximus/coreengine/inc/MaximusTest.h
+++ /dev/null
@@ -1,72 +0,0 @@
-
-#ifndef MAXIMUSTEST_H
-#define MAXIMUSTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class CoreEngine;
-class Maximus;
-
-
-class MaximusTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (MaximusTest);
- CPPUNIT_TEST (init_test);
- CPPUNIT_TEST (init_phy_test);
- CPPUNIT_TEST (init_ether_test);
- CPPUNIT_TEST (process_test);
- CPPUNIT_TEST (create_sta_test);
- CPPUNIT_TEST (create_fc_test);
- CPPUNIT_TEST (create_probe_test);
- CPPUNIT_TEST (create_mpdu_test);
- CPPUNIT_TEST (send_mpdu_test);
- CPPUNIT_TEST (create_ether_test);
- CPPUNIT_TEST (send_ether_test);
- CPPUNIT_TEST (wait_test);
- CPPUNIT_TEST (disturb_channel_test);
- CPPUNIT_TEST (get_date_test);
- CPPUNIT_TEST (set_freq_test);
- CPPUNIT_TEST (activate_false_alarm_test);
- CPPUNIT_TEST (deactivate_false_alarm_test);
- CPPUNIT_TEST (is_station_idle_test);
- CPPUNIT_TEST (hide_sta_test);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void init_test (void);
- void init_phy_test (void);
- void init_ether_test (void);
- void process_test (void);
- void create_sta_test (void);
- void create_fc_test (void);
- void create_probe_test (void);
- void create_mpdu_test (void);
- void send_mpdu_test (void);
- void create_ether_test (void);
- void send_ether_test (void);
- void wait_test (void);
- void disturb_channel_test (void);
- void get_date_test (void);
- void set_freq_test (void);
- void activate_false_alarm_test (void);
- void deactivate_false_alarm_test (void);
- void is_station_idle_test (void);
- void hide_sta_test (void);
-
-private:
-
- CoreEngine *mpCoreEngine;
- Maximus *mpMaximus;
-
-};
-
-
-#endif // MAXIMUSTEST_H
diff --git a/cesar/maximus/coreengine/inc/Msg.tpp b/cesar/maximus/coreengine/inc/Msg.tpp
deleted file mode 100644
index 7e5e76d23d..0000000000
--- a/cesar/maximus/coreengine/inc/Msg.tpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/************************************************************************
- Msg.tpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/coreengine/src/Msg.tpp
-**************************************************************************/
-
-#ifndef MSG_TPP
-#define MSG_TPP
-
-#include "Msg.h"
-#include "Maximus.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <netinet/in.h> // for 'htonl()', 'htons()', 'ntohl()' and 'ntohs()'
-using namespace std;
-
-
-template <typename T> Msg & Msg::add_param ( const string & name, T const & value )
-{
- logFunction();
-
- try
- {
- T param;
- if ( FUNCTION_CALL_PARAM_MAX_SIZE >= sizeof(value))
- {
- if (sizeof(long) == sizeof(value))
- {
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "htonl" << endl;
-#endif /* CONFIG_LOG */
- param = htonl(value);
- }
- else if (sizeof(short) == sizeof(value))
- {
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "htons" << endl;
-#endif /* CONFIG_LOG */
- param = htons(value);
- }
- else if (sizeof(long long) == sizeof(value))
- {
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "htonll" << endl;
-#endif /* CONFIG_LOG */
- uint32_t high = 0, low = 0;
- high = (uint32_t)((uint64_t)value >> 32);
- low = (uint32_t)((uint64_t)value & 0x00000000ffffffffL);
- param = (((uint64_t)(htonl(high))) << 32) | (uint64_t)(htonl(low));
- }
- else
- {
- param = value;
- }
- add_param(name, sizeof(value), (unsigned char *)&param);
- }
- else
- {
- errno = EMSGSIZE;
- throw Error(__PRETTY_FUNCTION__, "Length of parameter value exceeds max size", errno);
- }
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-template <typename T> T & Msg::bind_param ( const string & name ) const
-{
- logFunction();
- static T param = 0; // parameter not found => return 0
-
- try
- {
- unsigned long length = sizeof(T);
- unsigned char * pData = new unsigned char [length];
- if ( (NULL != bind_param(name, length, pData)) && (NULL != pData) )
- {
- param = *((T*)pData);
- if (sizeof(long) == sizeof(param))
- {
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "ntohl" << endl;
-#endif /* CONFIG_LOG */
- param = ntohl(param);
- }
- else if (sizeof(short) == sizeof(param))
- {
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "ntohs" << endl;
-#endif /* CONFIG_LOG */
- param = ntohs(param);
- }
- else if (sizeof(long long) == sizeof(param))
- {
-#if CONFIG_LOG
- clog << logger(LOG_DEBUG) << "ntohll" << endl;
-#endif /* CONFIG_LOG */
- u32 high = 0, low = 0;
- high = (uint32_t)((uint64_t)param >> 32);
- low = (uint32_t)((uint64_t)param & 0x00000000ffffffffL);
- param = (((uint64_t)(ntohl(high))) << 32) | (uint64_t)(ntohl(low));
- }
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "bind param = " << param << endl;
-#endif /* CONFIG_LOG */
- }
- if (NULL != pData)
- {
- delete [] pData;
- pData = NULL;
- }
- }
- catchFunction(getMaximus());
-
- return param;
-}
-
-
-#endif // MSG_TPP
diff --git a/cesar/maximus/coreengine/inc/MsgTest.h b/cesar/maximus/coreengine/inc/MsgTest.h
deleted file mode 100644
index 63091e16c9..0000000000
--- a/cesar/maximus/coreengine/inc/MsgTest.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-#ifndef MSGTEST_H
-#define MSGTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class Msg;
-class Maximus;
-class CoreEngine;
-
-
-class MsgTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (MsgTest);
- CPPUNIT_TEST (add_param_test);
- CPPUNIT_TEST (remove_param_test);
- CPPUNIT_TEST (set_cb_test);
- CPPUNIT_TEST (remove_cb_test);
- CPPUNIT_TEST (set_sta_test);
- CPPUNIT_TEST (send_async_test);
- CPPUNIT_TEST (send_test);
- CPPUNIT_TEST (is_param_test);
- CPPUNIT_TEST (bind_param_test);
- CPPUNIT_TEST (receiveResponseTest);
- CPPUNIT_TEST (receiveAsynchronousResponseTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void add_param_test (void);
- void remove_param_test (void);
- void set_cb_test (void);
- void remove_cb_test (void);
- void set_sta_test (void);
- void send_async_test (void);
- void send_test (void);
- void is_param_test (void);
- void bind_param_test (void);
- void receiveResponseTest (void);
- void receiveAsynchronousResponseTest (void);
-
-private:
-
- Msg * mpMsg;
- Maximus * mpMaximus;
- CoreEngine * mpCoreEngine;
-
-};
-
-
-#endif // MSGTEST_H
diff --git a/cesar/maximus/coreengine/inc/StaTest.h b/cesar/maximus/coreengine/inc/StaTest.h
deleted file mode 100644
index 10ac4e75a3..0000000000
--- a/cesar/maximus/coreengine/inc/StaTest.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-#ifndef STATEST_H
-#define STATEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class Maximus;
-class ISci;
-class SystemManager;
-class INetworkClock;
-class Sta;
-
-
-class StaTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (StaTest);
- CPPUNIT_TEST (remove_test);
- CPPUNIT_TEST (deactivate_test);
- CPPUNIT_TEST (activate_test);
- CPPUNIT_TEST (debug_test);
- CPPUNIT_TEST (is_idle_test);
- CPPUNIT_TEST (getStationIdTest);
- CPPUNIT_TEST (set_name_test);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void remove_test (void);
- void deactivate_test (void);
- void activate_test (void);
- void debug_test (void);
- void is_idle_test (void);
- void getStationIdTest (void);
- void set_name_test (void);
-
-private:
-
- Maximus * mpMaximus;
- ISci * mpSci;
- SystemManager * mpSystemManager;
- INetworkClock * mpNetworkClock;
- Sta * mpSta;
-
-};
-
-
-#endif // STATEST_H
diff --git a/cesar/maximus/coreengine/src/CoreEngine.cpp b/cesar/maximus/coreengine/src/CoreEngine.cpp
deleted file mode 100644
index f5ec159595..0000000000
--- a/cesar/maximus/coreengine/src/CoreEngine.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-/************************************************************************
- CoreEngine.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/coreengine/src/CoreEngine.cpp
-**************************************************************************/
-
-#include "CoreEngine.h"
-
-#include "PhyProcessor.h"
-#include "FunctionCallManager.h"
-#include "NetworkClockProcessor.h"
-#include "SystemManager.h"
-#include "SciServer.h"
-#include "ChannelComputer.h"
-#include "EthernetProcessor.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-CoreEngine::CoreEngine ( ):
-mpFunctionCall(NULL),
-mpSystem(NULL),
-mpNetworkClock(NULL),
-mpPhy(NULL),
-mpSci(NULL),
-mpChannel(NULL),
-mpEthernet(NULL)
-{
- logFunction();
-
- initAttributes();
-}
-
-
-void CoreEngine::initAttributes ( )
-{
- logFunction();
-
- // Create all packages: at first Sci; then FunctionCall, Phy, and System; and lastly NetworkClock
- //
- mpSci = new SciServer();
- mpFunctionCall = new FunctionCallManager(mpSci);
- mpSystem = new SystemManager(mpSci);
- mpPhy = new PhyProcessor(mpSci);
- mpEthernet = new EthernetProcessor(mpSci);
- mpNetworkClock = new NetworkClockProcessor(mpSci, mpSystem, mpFunctionCall, mpPhy, mpEthernet);
-}
-
-
-CoreEngine::~CoreEngine ( )
-{
- logFunction();
-
- if (NULL != mpNetworkClock)
- {
- delete (mpNetworkClock);
- mpNetworkClock = NULL;
- }
- if (NULL != mpFunctionCall)
- {
- delete (mpFunctionCall);
- mpFunctionCall = NULL;
- }
- if (NULL != mpSystem)
- {
- delete (mpSystem);
- mpSystem = NULL;
- }
- if (NULL != mpPhy)
- {
- delete (mpPhy);
- mpPhy = NULL;
- }
- if (NULL != mpSci)
- {
- delete (mpSci);
- mpSci = NULL;
- }
- if (NULL != mpChannel)
- {
- delete (mpChannel);
- mpChannel = NULL;
- }
- if (NULL != mpEthernet)
- {
- delete (mpEthernet);
- mpEthernet = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool CoreEngine::init ( const std::string station_executable,
- const std::string station_log,
- const std::string debugger,
- const float frequency )
-{
- logFunction();
- bool bInit = false;
-
- // station executable and debugger
- bInit = getSystem()->init(station_executable, debugger);
-
- // station log file
- bInit &= getSci()->init(station_log);
-
- // frequency
- bInit &= getPhy()->init(frequency);
-
- return bInit;
-}
-
-
-bool CoreEngine::process ( const Network_Clock_Tick max_tick_value )
-{
- logFunction();
- bool bProcess = false;
-
- if ( getNetworkClock()->processNextEvt(max_tick_value) )
- {
- bProcess = getSci()->process();
- }
-
- return bProcess;
-}
-
-
-bool CoreEngine::disturbChannel ( const bool enable )
-{
- logFunction();
-
- if (enable)
- {
- if (NULL == mpChannel)
- {
- mpChannel = new ChannelComputer(getPhy(), getSystem());
- }
-
- // Set beacon period to Channel
- getChannel()->setBeaconPeriod(getPhy()->getFrequency());
- }
- if (NULL == mpChannel)
- {
- throw Error(__PRETTY_FUNCTION__, "Channel pointer is NULL");
- }
-
- return getPhy()->setIsChannelEnabled(enable);
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-IFunctionCall * CoreEngine::getFunctionCall ( ) const
-{
- if (NULL == mpFunctionCall)
- {
- throw Error(__PRETTY_FUNCTION__, "Function Call pointer is NULL");
- }
-
- return mpFunctionCall;
-}
-
-
-ISystem * CoreEngine::getSystem ( ) const
-{
- if (NULL == mpSystem)
- {
- throw Error(__PRETTY_FUNCTION__, "System pointer is NULL");
- }
-
- return mpSystem;
-}
-
-
-INetworkClock * CoreEngine::getNetworkClock ( ) const
-{
- if (NULL == mpNetworkClock)
- {
- throw Error(__PRETTY_FUNCTION__, "Network Clock pointer is NULL");
- }
-
- return mpNetworkClock;
-}
-
-
-IPhy * CoreEngine::getPhy ( ) const
-{
- if (NULL == mpPhy)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY pointer is NULL");
- }
-
- return mpPhy;
-}
-
-
-ISci * CoreEngine::getSci ( ) const
-{
- if (NULL == mpSci)
- {
- throw Error(__PRETTY_FUNCTION__, "SCI pointer is NULL");
- }
-
- return mpSci;
-}
-
-
-IChannel * CoreEngine::getChannel ( ) const
-{
- if (NULL == mpChannel)
- {
- throw Error(__PRETTY_FUNCTION__, "Channel pointer is NULL");
- }
-
- return mpChannel;
-}
-
-
-IEthernet * CoreEngine::getEthernet ( ) const
-{
- if (NULL == mpEthernet)
- {
- throw Error(__PRETTY_FUNCTION__, "Ethernet pointer is NULL");
- }
-
- return mpEthernet;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/coreengine/src/CoreEngineTest.cpp b/cesar/maximus/coreengine/src/CoreEngineTest.cpp
deleted file mode 100644
index 16193e8b6f..0000000000
--- a/cesar/maximus/coreengine/src/CoreEngineTest.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-
-#include "CoreEngineTest.h"
-
-#include "CoreEngine.h"
-
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (CoreEngineTest);
-
-
-void CoreEngineTest::setUp (void)
-{
- logTest();
-
- mpCoreEngine = new CoreEngine ();
-}
-
-
-void CoreEngineTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpCoreEngine)
- {
- delete (mpCoreEngine);
- mpCoreEngine = NULL;
- }
-}
-
-
-void CoreEngineTest::initTest (void)
-{
- logTest();
-
- if (NULL != mpCoreEngine)
- {
- string stationExecutable("../stationtest/obj/stationtest.elf");
- string stationLog("station_log");
- string debugger("false");
- unsigned short int frequency = 50;
-
- CPPUNIT_ASSERT_MESSAGE("init failed",
- (mpCoreEngine->init(stationExecutable, stationLog, debugger, frequency)));
- }
- else
- {
- CPPUNIT_FAIL ("Core engine pointer is NULL");
- }
-}
-
-
-void CoreEngineTest::disturbChannelTest (void)
-{
- logTest();
-
- if (NULL != mpCoreEngine)
- {
- mpCoreEngine->init("station_executable", "station_log", "debugger", 50);
- CPPUNIT_ASSERT_MESSAGE("disturbChannel failed",
- (mpCoreEngine->disturbChannel(true))
- && (NULL != mpCoreEngine->getChannel()));
- }
- else
- {
- CPPUNIT_FAIL ("Core engine pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/coreengine/src/Maximus.cpp b/cesar/maximus/coreengine/src/Maximus.cpp
deleted file mode 100644
index 316439ba00..0000000000
--- a/cesar/maximus/coreengine/src/Maximus.cpp
+++ /dev/null
@@ -1,1348 +0,0 @@
-/************************************************************************
- Maximus.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/coreengine/src/Maximus.cpp
-**************************************************************************/
-
-#include "Maximus.h"
-
-#include "Sta.h"
-#include "Msg.h"
-#include "CoreEngine.h"
-#include "ISystem.h"
-#include "IFunctionCall.h"
-#include "INetworkClock.h"
-#include "ISci.h"
-#include "IChannel.h"
-#include "PhySciMsgMpdu.h"
-#include "ChannelSettings.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <stdio.h> // for 'remove()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-#include <fstream> // for 'ifstream'
-#include <getopt.h> // for 'getopt_long()'
-#include <signal.h> // for 'signal()', 'SIGINT', 'raise()', 'SIGTERM'
-#include <algorithm> // for 'min()'
-using namespace std;
-
-// For unitary tests
-bool UNITTEST = false;
-string stationTest;
-
-#if CONFIG_LOG
-// For Maximus log
-Logger logger(LOG_WARNING);
-#endif /* CONFIG_LOG */
-
-// To catch signals
-Maximus * pMaximus;
-
-
-// Constructors/Destructors
-//
-
-
-Maximus::Maximus ( ):
-mpCoreEngine(NULL),
-mMaxTickValue(0),
-mWaitTickValue(0),
-mIsWireshark(false),
-mEtherLogFileDescriptor(-1)
-{
- logFunction();
-
- try
- {
- if (UNITTEST)
- {
-#if CONFIG_LOG
- // For unitary tests log
- logger.setLogLevel(LOG_DEBUG);
-#endif /* CONFIG_LOG */
- }
-
- mpCoreEngine = new CoreEngine();
- }
- catchFunction(this);
-}
-
-
-Maximus::Maximus ( CoreEngine * p_core_engine ):
-mpCoreEngine(NULL),
-mMaxTickValue(0),
-mWaitTickValue(0)
-{
- logFunction();
-
- try
- {
- if (UNITTEST)
- {
-#if CONFIG_LOG
- // For unitary tests log
- logger.setLogLevel(LOG_DEBUG);
-#endif /* CONFIG_LOG */
-
- mpCoreEngine = p_core_engine;
- }
- else
- {
- errno = EBADRQC;
- throw Error(__PRETTY_FUNCTION__, "FOR UNITARY TESTS ONLY", errno);
- }
- }
- catchFunction(this);
-}
-
-
-Maximus::~Maximus ( )
-{
- logFunction();
-
- stop();
-}
-
-
-//
-// Methods
-//
-
-
-// public methods
-
-
-void Maximus::init ( int argc, char * argv[] )
-{
- logFunction();
-
- try
- {
- // To catch signals
- pMaximus = this;
- signal(SIGINT, Maximus::wrapper);
-
- struct option longOptions[] = {
- {"station-executable", required_argument, 0, 'e'},
- {"station-log", required_argument, 0, 's'},
- {"maximus-log", required_argument, 0, 'm'},
- {"log-level", required_argument, 0, 'l'},
- {"max-tick-value", required_argument, 0, 't'},
- {"debugger", required_argument, 0, 'd'},
- {"frequency", required_argument, 0, 'f'},
- {"wireshark", required_argument, 0, 'w'}
- };
- int optionIndex = 0;
- int optionChar = 0;
- optind = 0;
-
- // Station executable
- string stationExecutable;
- bool isStationExecutableSet = false;
-
- // Station log
- string stationLog("-");
-
-#if CONFIG_LOG
- // Maximus log
- string maximusLog("maximus_log");
-
- // Log level
- int logLevel = LOG_WARNING;
-#endif /* CONFIG_LOG */
-
- // Debugger
- string debugger("xterm -title '\"%n\" debug' -e gdb %e %p & sleep 1");
-
- // Frequency
- float frequency = 50; // in Hz
-
- // Wireshark
- string wireshark;
-
- while (EOF != optionChar)
- {
- optionChar = getopt_long(argc, argv, "e:s:m:l:t:d:f:w:", longOptions, &optionIndex);
-
- switch (optionChar)
- {
- case 'e':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "station executable = " << optarg << endl;
-#endif /* CONFIG_LOG */
- stationExecutable = optarg;
- isStationExecutableSet = true;
- break;
- case 's':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "station log = " << optarg << endl;
-#endif /* CONFIG_LOG */
- stationLog = optarg;
- break;
- case 'm':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "maximus log = " << optarg << endl;
- maximusLog = optarg;
-#endif /* CONFIG_LOG */
- break;
- case 'l':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "log level = " << optarg << endl;
- if ((LOG_DEBUG <= atoi(optarg)) && (LOG_NONE >= atoi(optarg)))
- {
- logLevel = atoi(optarg);
- }
- else
- {
- clog << logger(LOG_ERROR) << "usage: -l log_level with log_level in range from 0 to 6!" << endl;
- clog << logger(LOG_ERROR) << "user value is not taken into account => apply default value!" << endl;
- }
-#endif /* CONFIG_LOG */
- break;
- case 't':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "max tick value = " << optarg << endl;
-#endif /* CONFIG_LOG */
- setMaxTickValue(strtoull(optarg, NULL, 0));
- break;
- case 'd':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "debugger = " << optarg << endl;
-#endif /* CONFIG_LOG */
- debugger = optarg;
- break;
- case 'f':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "frequency = " << optarg << endl;
-#endif /* CONFIG_LOG */
- if ((50 == atof(optarg)) || (60 == atof(optarg)) || (0 == atof(optarg)))
- {
- frequency = atof(optarg);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "usage: -f frequency with frequency 50 or 60 Hz, or 0!" << endl;
- clog << logger(LOG_ERROR) << "user value is not taken into account => apply default value (50 Hz)!" << endl;
-#endif /* CONFIG_LOG */
- }
- break;
- case 'w':
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "wireshark = " << optarg << endl;
-#endif /* CONFIG_LOG */
- wireshark = optarg;
- if ( (0 == wireshark.compare("on"))
- || (0 == wireshark.compare("On"))
- || (0 == wireshark.compare("ON")) )
- {
- mIsWireshark = true;
- }
- else if ( (0 == wireshark.compare("off"))
- || (0 == wireshark.compare("Off"))
- || (0 == wireshark.compare("OFF")) )
- {
- mIsWireshark = false;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "usage: -w wireshark with wireshark on or off!" << endl;
- clog << logger(LOG_ERROR) << "user value is not taken into account => apply default value (off)!" << endl;
-#endif /* CONFIG_LOG */
- }
- break;
- case '?':
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Usage: -e station_executable [-s station_log -m maximus_log -l log_level -t max_tick_value -d debugger -f frequency -w wireshark]", errno);
- break;
- }
- }
-
- if (!isStationExecutableSet)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Usage: -e station_executable [-s station_log -m maximus_log -l log_level -t max_tick_value -d debugger -f frequency -w wireshark]", errno);
- }
-
-#if CONFIG_LOG
- // Maximus log
- if ( (!maximusLog.empty()) && (maximusLog.compare("-")) )
- {
- // In case of the file already exists, delete it
- remove(maximusLog.c_str());
-
- mMaximusLogFile.open(maximusLog.c_str(), ios_base::app | ios_base::out);
- if (mMaximusLogFile.is_open())
- {
- clog << logger(LOG_INFO) << "Maximus logs will be output into " << maximusLog << endl;
- logger.setLogFile(mMaximusLogFile);
- }
- else
- {
- clog << logger(LOG_ERROR) << "error while opening Maximus log file!" << endl;
- clog << logger(LOG_ERROR) << "Maximus logs will be output on standard output!" << endl;
- }
- }
- else
- {
- clog << logger(LOG_ERROR) << "Maximus logs will be output on standard output!" << endl;
- }
-
- // Log level
- logger.setLogLevel(logLevel);
-#endif /* CONFIG_LOG */
-
- mpCoreEngine->init(stationExecutable, stationLog, debugger, frequency);
- }
- catchFunction(this);
-}
-
-
-void Maximus::init_phy ( PhyMpduCb interface_cb )
-{
- logFunction();
-
- try
- {
- if (!getPhyProcessor()->init(interface_cb))
- {
- throw Error(__PRETTY_FUNCTION__, "PHY initialization failed");
- }
- }
- catchFunction(this);
-}
-
-
-File_Descriptor Maximus::init_ether ( EtherCb interface_cb )
-{
- logFunction();
-
- try
- {
- if (!getEthernet()->init(interface_cb))
- {
- throw Error(__PRETTY_FUNCTION__, "Ethernet initialization failed");
- }
- if (isWireshark())
- {
- char dev[] = "tap10\0";
- if (0 > (mEtherLogFileDescriptor = getEthernet()->allocTap(dev)))
- {
- throw Error(__PRETTY_FUNCTION__, "Bad Ether log file descriptor", errno);
- }
- }
- }
- catchFunction(this);
-
- return mEtherLogFileDescriptor;
-}
-
-
-void Maximus::process ( )
-{
- logFunction();
-
- try
- {
- Network_Clock_Tick tickValue = 0; // tick value until which to process
-
- if (0 == getMaxTickValue())
- {
- tickValue = getWaitTickValue();
- }
- else if (0 != getWaitTickValue())
- {
- tickValue = min(getMaxTickValue(), getWaitTickValue());
- }
-
- getCoreEngine()->process(tickValue);
-
- if (0 != getMaxTickValue())
- {
- if (getMaxTickValue() <= getNetworkClockProcessor()->getCurrentTickValue())
- {
-#if CONFIG_LOG
- clog << logger(LOG_FATAL) << "Max tick value is reached!" << endl;
-#endif /* CONFIG_LOG */
- stop();
- exit(1);
- }
- }
- }
- catchFunction(this);
-}
-
-
-Sta & Maximus::create_sta ( const string & station_executable, uint32_t seed )
-{
- logFunction();
- Sta * pSta = NULL;
-
- try
- {
- if (!station_executable.empty())
- {
- pSta = new Sta(this, getSystemManager(), station_executable, seed);
- }
- else
- {
- pSta = new Sta(this, getSystemManager(), getSystemManager()->getDefaultStationExecutable(), seed);
- }
- if (NULL == pSta)
- {
- throw Error(__PRETTY_FUNCTION__, "Station pointer is NULL");
- }
- mListOfStas.push_back(pSta);
-
- // If channel perturbation is enabled,
- // inform the channel package that a new station has been created
- if (getPhyProcessor()->isChannelEnabled())
- {
- getChannel()->addChannelSettings(pSta->getStationId());
- }
- }
- catchFunction(this);
-
- return *pSta;
-}
-
-
-Msg & Maximus::create_fc ( const string & name )
-{
- logFunction();
- Msg * pMsg = NULL;
-
- try
- {
- pMsg = new Msg(this, getFunctionCallManager(), getSystemManager(), name);
- if (NULL == pMsg)
- {
- throw Error(__PRETTY_FUNCTION__, "Message pointer is NULL");
- }
- mListOfMsgs.push_back(pMsg);
- }
- catchFunction(this);
-
- return *pMsg;
-}
-
-
-Msg & Maximus::create_probe ( )
-{
- logFunction();
- Msg * pMsg = NULL;
-
- try
- {
- pMsg = new Msg(this, getFunctionCallManager(), getSystemManager());
- if (NULL == pMsg)
- {
- throw Error(__PRETTY_FUNCTION__, "Message pointer is NULL");
- }
- mListOfMsgs.push_back(pMsg);
- }
- catchFunction(this);
-
- return *pMsg;
-}
-
-
-PhySciMsgMpdu * Maximus::create_mpdu ( )
-{
- logFunction();
-
- return getPhyProcessor()->createMpdu();
-}
-
-
-void Maximus::send_mpdu ( PhySciMsgMpdu * p_mpdu )
-{
- logFunction();
-
- try
- {
- if (NULL == p_mpdu)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message MPDU pointer is NULL", errno);
- }
- if (!getPhyProcessor()->sendMpdu(p_mpdu))
- {
- throw Error(__PRETTY_FUNCTION__, "MPDU has not been sent correctly", errno);
- }
- }
- catchFunction(this);
-}
-
-
-EtherSciMsg * Maximus::create_ether ( )
-{
- logFunction();
-
- return getEthernet()->createEther();
-}
-
-
-void Maximus::send_ether ( EtherSciMsg & ether )
-{
- logFunction();
-
- try
- {
- if (!getEthernet()->sendEther(ether))
- {
- throw Error(__PRETTY_FUNCTION__, "Ethernet SCI message has not been sent correctly", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::wait ( const tick_t value )
-{
- logFunction();
-
- try
- {
- setWaitTickValue(getNetworkClockProcessor()->getCurrentTickValue() + value);
- while (getWaitTickValue() > getNetworkClockProcessor()->getCurrentTickValue())
- {
- process();
- }
- setWaitTickValue(0);
- }
- catchFunction(this);
-}
-
-
-void Maximus::wait ( )
-{
- logFunction();
-
- try
- {
- while ( (NULL != getFunctionCallManager()->getListOfCallbacks())
- && (!getFunctionCallManager()->getListOfCallbacks()->empty()) )
- {
- process();
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::disturb_channel ( const bool enable )
-{
- logFunction();
-
- try
- {
- getCoreEngine()->disturbChannel(enable);
- }
- catchFunction(this);
-}
-
-
-tick_t Maximus::get_date ( )
-{
- logFunction();
- tick_t date = 0;
-
- try
- {
- date = getNetworkClockProcessor()->getCurrentTickValue();
- }
- catchFunction(this);
-
- return date;
-}
-
-
-void Maximus::set_freq ( const float frequency )
-{
- logFunction();
-
- try
- {
- getPhyProcessor()->setFrequency(frequency);
- }
- catchFunction(this);
-}
-
-
-float Maximus::get_freq ( )
-{
- logFunction();
- float frequency = 0;
-
- try
- {
- frequency = getPhyProcessor()->getFrequency();
- }
- catchFunction(this);
-
- return frequency;
-}
-
-
-void Maximus::set_snr ( const float snr_value )
-{
- logFunction();
-
- try
- {
- // If channel perturbation is enabled, set the SNR value
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(0 /* tx_station_id */, 0 /* rx_station_id */, false);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snr_value);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::set_snr ( const string & snr_file )
-{
- logFunction();
-
- try
- {
- // Read the user SNR file
- float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
- if (!readSnrFile(snr_file, snrArray))
- {
- for (int j=0; j<= PHY_CARRIER_NB; j++)
- {
- for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
- {
- cerr << snrArray[i][j] << " ";
- }
- cerr << endl;
- }
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
- }
-
- // If channel perturbation is enabled, set the SNR values
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(0 /* tx_station_id */, 0 /* rx_station_id */, false);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snrArray);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::set_snr_from_src ( const float snr_value, const Sta & src, const bool both_directions )
-{
- logFunction();
-
- try
- {
- // If channel perturbation is enabled, set the SNR value
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(src.getStationId() /* tx_station_id */, 0 /* rx_station_id */, both_directions);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snr_value);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::set_snr_from_src ( const string & snr_file, const Sta & src, const bool both_directions )
-{
- logFunction();
-
- try
- {
- // Read the user SNR file
- float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
- if (!readSnrFile(snr_file, snrArray))
- {
- for (int j=0; j<= PHY_CARRIER_NB; j++)
- {
- for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
- {
- cerr << snrArray[i][j] << " ";
- }
- cerr << endl;
- }
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
- }
-
- // If channel perturbation is enabled, set the SNR values
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(src.getStationId() /* tx_station_id */, 0 /* rx_station_id */, both_directions);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snrArray);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::set_snr_to_dst ( const float snr_value, const Sta & dst, const bool both_directions )
-{
- logFunction();
-
- try
- {
- // If channel perturbation is enabled, set the SNR value
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(0 /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snr_value);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::set_snr_to_dst ( const string & snr_file, const Sta & dst, const bool both_directions )
-{
- logFunction();
-
- try
- {
- // Read the user SNR file
- float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
- if (!readSnrFile(snr_file, snrArray))
- {
- for (int j=0; j<= PHY_CARRIER_NB; j++)
- {
- for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
- {
- cerr << snrArray[i][j] << " ";
- }
- cerr << endl;
- }
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
- }
-
- // If channel perturbation is enabled, set the SNR values
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(0 /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snrArray);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::set_snr_from_src_to_dst ( const float snr_value, const Sta & src, const Sta & dst, const bool both_directions )
-{
- logFunction();
-
- try
- {
- // If channel perturbation is enabled, set the SNR value
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(src.getStationId() /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snr_value);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::set_snr_from_src_to_dst ( const string & snr_file, const Sta & src, const Sta & dst, const bool both_directions )
-{
- logFunction();
-
- try
- {
- float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
- if (!readSnrFile(snr_file, snrArray))
- {
- for (int j=0; j<= PHY_CARRIER_NB; j++)
- {
- for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
- {
- cerr << snrArray[i][j] << " ";
- }
- cerr << endl;
- }
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
- }
-
- // If channel perturbation is enabled, set the SNR values
- if (getPhyProcessor()->isChannelEnabled())
- {
- std::vector<ChannelSettings *> listOfChannelSettings = getChannel()->findChannelSettings(src.getStationId() /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
- std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
- for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
- {
- if (NULL == listOfChannelSettings.back())
- {
- throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
- }
- else
- {
- listOfChannelSettings.back()->setSnr(snrArray);
- }
- listOfChannelSettings.pop_back();
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::activate_false_alarm ( const Network_Clock_Tick average_duration,
- const float std_deviation )
-{
- logFunction();
-
- try
- {
- if (!getPhyProcessor()->activateFalseAlarm(average_duration, std_deviation))
- {
- throw Error(__PRETTY_FUNCTION__, "Cannot activate false alarm");
- }
- }
- catchFunction(this);
-}
-
-
-void Maximus::deactivate_false_alarm ( )
-{
- logFunction();
-
- try
- {
- if (!getPhyProcessor()->deactivateFalseAlarm())
- {
- throw Error(__PRETTY_FUNCTION__, "Cannot deactivate false alarm");
- }
- }
- catchFunction(this);
-}
-
-
-bool Maximus::is_station_idle ( Sci_Msg_Station_Id station_id )
-{
- logFunction();
- bool isIdle = false;
-
- try
- {
- isIdle = getSystemManager()->isStationIdle(station_id);
- }
- catchFunction(this);
-
- return isIdle;
-}
-
-
-void Maximus::hide_sta (const Sta & sta1, const Sta & sta2, bool hidden)
-{
- logFunction();
-
- try
- {
- if (!getSystemManager()->hideStation (sta1.getStationId (),
- sta2.getStationId (),
- hidden))
- {
- throw Error (__PRETTY_FUNCTION__, "Cannot hide station", errno);
- }
- }
- catchFunction(this);
-}
-
-
-// private methods
-//
-
-
-CoreEngine * Maximus::getCoreEngine ( )
-{
- try
- {
- if (NULL == mpCoreEngine)
- {
- throw Error(__PRETTY_FUNCTION__, "Core engine pointer is NULL");
- }
- }
- catchFunction(this);
-
- return mpCoreEngine;
-}
-
-
-ISystem * Maximus::getSystemManager ( )
-{
- ISystem * pSystemManager = NULL;
-
- try
- {
- if ( NULL == (pSystemManager = getCoreEngine()->getSystem()) )
- {
- throw Error(__PRETTY_FUNCTION__, "System manager pointer is NULL");
- }
- }
- catchFunction(this);
-
- return pSystemManager;
-}
-
-
-IFunctionCall * Maximus::getFunctionCallManager ( )
-{
- IFunctionCall * pFunctionCallManager = NULL;
-
- try
- {
- if ( NULL == (pFunctionCallManager = getCoreEngine()->getFunctionCall()) )
- {
- throw Error(__PRETTY_FUNCTION__, "Function call manager pointer is NULL");
- }
- }
- catchFunction(this);
-
- return pFunctionCallManager;
-}
-
-
-INetworkClock * Maximus::getNetworkClockProcessor ( )
-{
- INetworkClock * pNetworkClockProcessor = NULL;
-
- try
- {
- if ( NULL == (pNetworkClockProcessor = getCoreEngine()->getNetworkClock()) )
- {
- throw Error(__PRETTY_FUNCTION__, "Network clock processor pointer is NULL");
- }
- }
- catchFunction(this);
-
- return pNetworkClockProcessor;
-}
-
-
-IPhy * Maximus::getPhyProcessor ( )
-{
- IPhy * pPhyProcessor = NULL;
-
- try
- {
- if ( NULL == (pPhyProcessor = getCoreEngine()->getPhy()) )
- {
- throw Error(__PRETTY_FUNCTION__, "Phy processor pointer is NULL");
- }
- }
- catchFunction(this);
-
- return pPhyProcessor;
-}
-
-
-ISci * Maximus::getSciServer ( )
-{
- ISci * pSciServer = NULL;
-
- try
- {
- if ( NULL == (pSciServer = getCoreEngine()->getSci()) )
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
- }
- catchFunction(this);
-
- return pSciServer;
-}
-
-
-IChannel * Maximus::getChannel ( )
-{
- IChannel * pChannel = NULL;
-
- try
- {
- if ( NULL == (pChannel = getCoreEngine()->getChannel()) )
- {
- throw Error(__PRETTY_FUNCTION__, "Channel pointer is NULL");
- }
- }
- catchFunction(this);
-
- return pChannel;
-}
-
-
-IEthernet * Maximus::getEthernet ( )
-{
- IEthernet * pEthernet = NULL;
-
- try
- {
- if ( NULL == (pEthernet = getCoreEngine()->getEthernet()) )
- {
- throw Error(__PRETTY_FUNCTION__, "Ethernet pointer is NULL");
- }
- }
- catchFunction(this);
-
- return pEthernet;
-}
-
-
-Network_Clock_Tick Maximus::getMaxTickValue ( ) const
-{
- return mMaxTickValue;
-}
-
-
-bool Maximus::setMaxTickValue ( const Network_Clock_Tick max_tick_value )
-{
- mMaxTickValue = max_tick_value;
-
- return true;
-}
-
-
-Network_Clock_Tick Maximus::getWaitTickValue ( ) const
-{
- return mWaitTickValue;
-}
-
-
-bool Maximus::setWaitTickValue ( const Network_Clock_Tick wait_tick_value )
-{
- mWaitTickValue = wait_tick_value;
-
- return true;
-}
-
-
-bool Maximus::readSnrFile ( const string & snr_file, float snr_array[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1] )
-{
- logFunction();
- bool bRead = true;
-
- try
- {
- // Read file
- //
- memset(snr_array, '\0', MAXIMUS_CHANNEL_INTERVAL_MAX_NB * (PHY_CARRIER_NB + 1) * sizeof(float));
- ifstream snrFile(snr_file.c_str(), ifstream::in);
- if (snrFile.is_open())
- {
- /* Read end times (in ticks) of each interval of the beacon period. */
- char c;
- float tempEndTimeOfLastInterval = (2 * 1000000) / (getPhyProcessor()->getFrequency());
- unsigned short int endTimeOfLastInterval = (unsigned short int)tempEndTimeOfLastInterval;
- unsigned short int numberOfIntervals = MAXIMUS_CHANNEL_INTERVAL_MAX_NB;
- for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
- {
- snrFile >> snr_array[i][0];
- if (endTimeOfLastInterval <= snr_array[i][0])
- {
- snr_array[i][0] = endTimeOfLastInterval;
- numberOfIntervals = i + 1;
- break;
- }
- c = snrFile.peek();
- while ( ('\t' == c) || (' ' == c) || (EOF == c) )
- {
- snrFile.ignore();
- c = snrFile.peek();
- }
- if ('#' == c)
- {
- while ( ('\n' != c) && (EOF != c) )
- {
- snrFile.ignore();
- c = snrFile.peek();
- }
- }
- if ('\n' == c)
- {
- snrFile.ignore();
- numberOfIntervals = i + 1;
- if (endTimeOfLastInterval != snr_array[i][0])
- {
- if (MAXIMUS_CHANNEL_INTERVAL_MAX_NB > i+1)
- {
- snr_array[i+1][0] = endTimeOfLastInterval;
- numberOfIntervals++;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Too many time intervals in SNR file", errno);
- }
- }
- break;
- }
- }
-
- /* Read SNR values (in dB) for each carrier. */
- for (int j=1; j<=PHY_CARRIER_NB; j++)
- {
- for (int i=0; i<numberOfIntervals; i++)
- {
- snrFile >> snr_array[i][j];
- }
- c = snrFile.peek();
- while ( ('\n' != c) && (EOF != c) )
- {
- snrFile.ignore();
- c = snrFile.peek();
- }
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Error while opening SNR file", errno);
- }
- snrFile.close();
- }
- catchFunction(this);
-
- return bRead;
-}
-
-
-bool Maximus::isWireshark ( ) const
-{
- return mIsWireshark;
-}
-
-
-// public methods
-//
-
-
-void Maximus::wrapper ( int n )
-{
- logFunction();
-
- if (NULL != pMaximus)
- {
-#if CONFIG_LOG
- clog << logger(LOG_FATAL) << "Catch CTRL+C!" << endl;
-#endif /* CONFIG_LOG */
- pMaximus->stop();
- raise(SIGTERM);
- }
-}
-
-
-void Maximus::stop ( )
-{
- logFunction();
- unsigned int counter = 0;
-
-#if CONFIG_LOG
- clog << logger(LOG_FATAL) << "*** Exit Fulminata Maximus simulator ***" << endl;
-#endif /* CONFIG_LOG */
-
- for (unsigned int i=0; i<mListOfMsgs.size(); i++)
- {
- if (NULL != mListOfMsgs[i])
- {
- delete (mListOfMsgs[i]);
- counter ++;
- }
- }
- mListOfMsgs.clear();
-#if CONFIG_LOG
- clog << logger(LOG_FATAL) << "delete " << counter << " messages" << endl;
-#endif /* CONFIG_LOG */
- counter = 0;
-
- for (unsigned int i=0; i<mListOfStas.size(); i++)
- {
- if (NULL != mListOfStas[i])
- {
- delete (mListOfStas[i]);
- counter++;
- }
- }
- mListOfStas.clear();
-#if CONFIG_LOG
- clog << logger(LOG_FATAL) << "delete " << counter << " stations" << endl;
-
- if (mMaximusLogFile.is_open())
- {
- mMaximusLogFile.flush();
- mMaximusLogFile.close();
- }
-#endif /* CONFIG_LOG */
-
- if (0 <= mEtherLogFileDescriptor)
- {
- close(mEtherLogFileDescriptor);
- mEtherLogFileDescriptor = -1;
- }
-
- // Warning: delete the Core Engine is the last task to do!
- if (NULL != mpCoreEngine)
- {
- delete mpCoreEngine;
- mpCoreEngine = NULL;
- }
-}
-
diff --git a/cesar/maximus/coreengine/src/MaximusTest.cpp b/cesar/maximus/coreengine/src/MaximusTest.cpp
deleted file mode 100644
index 449c4a6d61..0000000000
--- a/cesar/maximus/coreengine/src/MaximusTest.cpp
+++ /dev/null
@@ -1,505 +0,0 @@
-
-#include "MaximusTest.h"
-
-#include "Maximus.h"
-#include "Msg.h"
-#include "Sta.h"
-#include "PhySciMsgPre.h"
-#include "PhySciMsgFc.h"
-#include "PhySciMsgMpdu.h"
-#include "EtherSciMsg.h"
-#include "Station.h"
-#include "ISystem.h"
-#include "CoreEngine.h"
-
-#include "Logger.h"
-
-#include "functioncall_types.h" // for 'PROBE_ID'
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (MaximusTest);
-
-void phyCb (PhySciMsg & phy_sci_msg)
-{
-
-}
-
-void etherCb (EtherSciMsg & ether_sci_msg)
-{
-
-}
-
-
-void MaximusTest::setUp (void)
-{
- logTest();
-
- mpCoreEngine = new CoreEngine ();
- mpMaximus = new Maximus (mpCoreEngine);
-}
-
-
-void MaximusTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- delete (mpMaximus);
- mpMaximus = NULL;
- }
-}
-
-
-void MaximusTest::init_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- //mpMaximus->init(argc, argv);
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::init_phy_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- mpMaximus->init_phy(&phyCb);
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::init_ether_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- CPPUNIT_ASSERT_MESSAGE ( "init_ether failed",
- -1 == mpMaximus->init_ether(&etherCb) );
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::process_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- mpMaximus->process();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::create_sta_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Sta sta = mpMaximus->create_sta();
-
- CPPUNIT_ASSERT_MESSAGE ( "create_sta failed",
- 0 != sta.getStationId() );
-
- sta.remove();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::create_fc_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Msg msg = mpMaximus->create_fc("function");
-
- CPPUNIT_ASSERT_MESSAGE ( "create_fc failed",
- 0 != msg.get_tx_msg_id() );
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::create_probe_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Msg msg = mpMaximus->create_probe();
-
- CPPUNIT_ASSERT_MESSAGE ( "create_probe failed",
- 0 != msg.get_tx_msg_id() );
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::create_mpdu_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- PhySciMsgMpdu * pMpdu = mpMaximus->create_mpdu();
-
- CPPUNIT_ASSERT_MESSAGE ( "create_mpdu failed",
- NULL != pMpdu );
-
- delete (pMpdu);
- pMpdu = NULL;
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::send_mpdu_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- // create MPDU
- PhySciMsgMpdu * pMpdu = mpMaximus->create_mpdu();
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message MPDU pointer is NULL", NULL != pMpdu );
-
- /* Configure MPDU. */
- unsigned long length = 5;
- unsigned char payload[length];
- memset(payload, 'P', length);
-
- pMpdu->setMpdu(length, payload);
-
- // create the transmitting station
- Sta staTx = mpMaximus->create_sta();
-
- // create the destination station
- Sta staRx = mpMaximus->create_sta();
-
- // set the destination station
- pMpdu->setSciMsgStationId(staRx.getStationId());
-
- // set FC
- uint32_t fc_av[4];
- memset(fc_av, 'A', 4*sizeof(uint32_t));
- uint32_t fc_10 = 10;
- pMpdu->setFc10(fc_10);
- pMpdu->setFcAv(fc_av);
-
- // set FC mode
- pMpdu->setFcMode(PHY_FC_MODE_HYBRID_1);
-
- // set short PPDU
- pMpdu->setShortPpdu(1);
-
- mpMaximus->send_mpdu(pMpdu);
-
- while (!pMpdu->isSent() && !pMpdu->getFc()->isSent())
- {
- mpMaximus->process();
- }
-
- if (NULL != pMpdu)
- {
- delete (pMpdu);
- pMpdu = NULL;
- }
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::create_ether_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- EtherSciMsg * pEther = mpMaximus->create_ether();
-
- CPPUNIT_ASSERT_MESSAGE ( "create_ether failed", NULL != pEther );
-
- delete (pEther);
- pEther = NULL;
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::send_ether_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- // create Ether SCI message
- EtherSciMsg * pEtherSciMsg = mpMaximus->create_ether();
-
- // create the destination station
- Sta staRx = mpMaximus->create_sta();
- mpMaximus->wait(5);
-
- /* Configure Ether SCI message. */
- pEtherSciMsg->setSpecializedSciMsgType(ETHERNET_TYPE_DATA);
- unsigned long length = 5;
- unsigned char payload[length];
- memset(payload, 'E', length);
- pEtherSciMsg->setSpecializedSciMsgDataLength(length);
- pEtherSciMsg->setSpecializedSciMsgData(payload);
- pEtherSciMsg->setSciMsgStationId(staRx.getStationId());
-
- // send Ether SCI message
- mpMaximus->send_ether(*pEtherSciMsg);
-
- // remove the destination station
- staRx.remove();
-
- if (NULL != pEtherSciMsg)
- {
- delete (pEtherSciMsg);
- pEtherSciMsg = NULL;
- }
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::wait_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Sta sta = mpMaximus->create_sta();
- mpMaximus->wait(10);
- mpMaximus->wait();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::disturb_channel_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- //mpMaximus->disturb_channel();
- //mpMaximus->disturb_channel(false);
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::get_date_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- tick_t date = mpMaximus->get_date();
- tick_t offset = 100;
- Sta sta = mpMaximus->create_sta();
- mpMaximus->wait(offset);
- CPPUNIT_ASSERT_MESSAGE ( "get_date failed", date + offset == mpMaximus->get_date() );
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::set_freq_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Sta sta = mpMaximus->create_sta();
-
- float freq = 0;
- mpMaximus->set_freq(freq);
- CPPUNIT_ASSERT_MESSAGE ( "set_freq failed", freq == mpMaximus->get_freq() );
- mpMaximus->wait(100000);
-
- sta.remove();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::activate_false_alarm_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Sta sta = mpMaximus->create_sta();
-
- Network_Clock_Tick averageDuration = 10;
- float stdDeviation = 0.1;
- mpMaximus->activate_false_alarm(averageDuration, stdDeviation);
- mpMaximus->wait(2*averageDuration);
-
- sta.remove();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::deactivate_false_alarm_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Sta sta = mpMaximus->create_sta();
-
- mpMaximus->deactivate_false_alarm();
- mpMaximus->wait(1000);
-
- sta.remove();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::is_station_idle_test (void)
-{
- logTest();
-
- if (NULL != mpMaximus)
- {
- Sta sta = mpMaximus->create_sta();
-
- CPPUNIT_ASSERT_MESSAGE ( "is_station_idle failed", !mpMaximus->is_station_idle(sta.getStationId()) );
- mpMaximus->wait(1);
- CPPUNIT_ASSERT_MESSAGE ( "is_station_idle failed", mpMaximus->is_station_idle(sta.getStationId()) );
-
- sta.remove();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
-
-void MaximusTest::hide_sta_test (void)
-{
- logTest ();
-
- if (NULL != mpMaximus)
- {
- Sta sta1 = mpMaximus->create_sta ();
- Sta sta2 = mpMaximus->create_sta ();
-
- mpMaximus->hide_sta (sta1, sta2, true);
-
- /* retrieve stations 1 and 2 */
- Station *pStation1 = NULL, *pStation2 = NULL;
- for (StationsList::const_iterator it = mpCoreEngine->getSystem ()->getListOfStations ()->begin ();
- it != mpCoreEngine->getSystem ()->getListOfStations ()->end (); ++it)
- {
- if (NULL != *it)
- {
- Sci_Msg_Station_Id id = (*it)->getStationId ();
- if (sta1.getStationId () == id)
- pStation1 = *it;
- else if (sta2.getStationId () == id)
- pStation2 = *it;
- }
- }
- CPPUNIT_ASSERT_MESSAGE ("Cannot retrieve stations",
- (pStation1 != NULL)
- && (pStation2 != NULL));
-
- set<Sci_Msg_Station_Id>::iterator it1, it2;
- /* check that station 2 is hidden from station 1 */
- it2 = pStation1->getHiddenStationsList ().find (sta2.getStationId ());
- CPPUNIT_ASSERT_MESSAGE ("hide_sta 2 from 1 failed", *it2 == sta2.getStationId ());
- /* check that station 1 is hidden from station 2 */
- it1 = pStation2->getHiddenStationsList ().find (sta1.getStationId ());
- CPPUNIT_ASSERT_MESSAGE ("hide_sta 1 from 2 failed", *it1 == sta1.getStationId ());
-
- mpMaximus->hide_sta (sta1, sta2, false);
- /* check that stations are visible from each other */
- it2 = pStation1->getHiddenStationsList ().find (sta2.getStationId ());
- CPPUNIT_ASSERT_MESSAGE ("hide_sta FALSE failed", it2 == pStation1->getHiddenStationsList ().end ());
- /* check that station 1 is hidden from station 2 */
- it1 = pStation2->getHiddenStationsList ().find (sta1.getStationId ());
- CPPUNIT_ASSERT_MESSAGE ("hide_sta FALSE failed", it1 == pStation2->getHiddenStationsList ().end ());
-
- /* clean */
- sta1.remove ();
- sta2.remove ();
- }
- else
- {
- CPPUNIT_FAIL ("Maximus pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/coreengine/src/Msg.cpp b/cesar/maximus/coreengine/src/Msg.cpp
deleted file mode 100644
index 6af40f8bf0..0000000000
--- a/cesar/maximus/coreengine/src/Msg.cpp
+++ /dev/null
@@ -1,544 +0,0 @@
-/************************************************************************
- Msg.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/coreengine/src/Msg.cpp
-**************************************************************************/
-
-#include "Msg.h"
-
-#include "Sta.h"
-#include "IFunctionCall.h"
-#include "Maximus.h"
-#include "ISystem.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <boost/bind.hpp> // for 'boost::bind()'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-Msg::Msg ( Maximus * p_maximus,
- IFunctionCall * p_function_call_manager,
- ISystem * p_system_manager,
- const string & name ):
-mpMaximus(NULL),
-mpFunctionCallManager(NULL),
-mpSystemManager(NULL),
-mCallback(NULL),
-mpFunctionSciMsg(NULL),
-mResponseReceived(false)
-{
- logFunction();
-
- if ( (NULL != p_maximus)
- && (NULL != p_function_call_manager)
- && (NULL != p_system_manager) )
- {
- mpMaximus = p_maximus;
- mpFunctionCallManager = p_function_call_manager;
- mpSystemManager = p_system_manager;
- mpFunctionSciMsg = getFunctionCallManager()->createMsg();
- getFunctionSciMsg()->incrementSpecializedSciMsgId(); // to have an updated msg id
- getFunctionSciMsg()->setFunctionName(name);
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Maximus, function call manager and/or system manager pointer(s) is/are NULL", errno);
- }
-}
-
-
-Msg::Msg ( const Msg & msg ):
-mpMaximus(NULL),
-mpFunctionCallManager(NULL),
-mpSystemManager(NULL),
-mCallback(NULL),
-mpFunctionSciMsg(NULL),
-mResponseReceived(false)
-{
- logFunction();
-
- mpMaximus = msg.getMaximus();
- mpFunctionCallManager = msg.getFunctionCallManager();
- mpSystemManager = msg.getSystemManager();
- mpFunctionSciMsg = getFunctionCallManager()->createMsg();
- getFunctionSciMsg()->setFunctionName(msg.getFunctionSciMsg()->getFunctionName());
- getFunctionSciMsg()->setListOfParameters(msg.getFunctionSciMsg()->getListOfParameters());
- getFunctionSciMsg()->setSciMsgStationId(msg.getFunctionSciMsg()->getSciMsgStationId());
- setCallback(msg.getCallback());
- setResponseReceived(msg.isResponseReceived());
-}
-
-
-Msg::~Msg ( )
-{
- logFunction();
-
- if (NULL != mpMaximus)
- {
- mpMaximus = NULL;
- }
- if (NULL != mpFunctionCallManager)
- {
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpSystemManager)
- {
- mpSystemManager = NULL;
- }
- if (NULL != mpFunctionSciMsg)
- {
- delete(mpFunctionSciMsg);
- mpFunctionSciMsg = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// public methods
-//
-
-
-Msg & Msg::operator= ( const Msg & msg )
-{
- logFunction();
-
- try
- {
- mpMaximus = msg.getMaximus();
- mpFunctionCallManager = msg.getFunctionCallManager();
- mpSystemManager = msg.getSystemManager();
- mpFunctionSciMsg = getFunctionCallManager()->createMsg();
- getFunctionSciMsg()->setFunctionName(msg.getFunctionSciMsg()->getFunctionName());
- getFunctionSciMsg()->setListOfParameters(msg.getFunctionSciMsg()->getListOfParameters());
- getFunctionSciMsg()->setSciMsgStationId(msg.getFunctionSciMsg()->getSciMsgStationId());
- setCallback(msg.getCallback());
- setResponseReceived(msg.isResponseReceived());
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::add_param ( const string & name )
-{
- logFunction();
-
- try
- {
- getFunctionSciMsg()->addParameter(FunctionCallParameter(name, 0, NULL));
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::add_param ( const string & name, const unsigned long length, const unsigned char * p_value )
-{
- logFunction();
-
- try
- {
- if ( FUNCTION_CALL_PARAM_MAX_SIZE >= length)
- {
- getFunctionSciMsg()->addParameter(FunctionCallParameter(name, length, const_cast<unsigned char *>(p_value)));
- }
- else
- {
- errno = EMSGSIZE;
- throw Error(__PRETTY_FUNCTION__, "Length of parameter value exceeds max size", errno);
- }
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::add_param ( const string & name, const string & value )
-{
- logFunction();
-
- try
- {
- if ( FUNCTION_CALL_PARAM_MAX_SIZE >= value.length()+1)
- {
- getFunctionSciMsg()->addParameter(FunctionCallParameter(name, value.length()+1, (unsigned char *)value.c_str()));
- }
- else
- {
- errno = EMSGSIZE;
- throw Error(__PRETTY_FUNCTION__, "Length of parameter value exceeds max size", errno);
- }
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::remove_param ( const string & name )
-{
- logFunction();
-
- try
- {
- getFunctionSciMsg()->removeParameter(name);
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::set_cb ( const cb_t & user_cb )
-{
- logFunction();
-
- try
- {
- mCallback = user_cb;
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::remove_cb ( )
-{
- logFunction();
-
- try
- {
- mCallback = NULL;
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::set_sta ( Sta & sta )
-{
- logFunction();
-
- try
- {
- getFunctionSciMsg()->setSciMsgStationId(sta.getStationId());
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-void Msg::send_async ( )
-{
- logFunction();
-
- try
- {
- // Register callback and send message
- getFunctionCallManager()->registerCallback( getFunctionSciMsg()->getSpecializedSciMsgId(),
- (boost::bind(&Msg::receiveAsynchronousResponse, this, _1)) );
- while(!getSystemManager()->isStationIdle(getFunctionSciMsg()->getSciMsgStationId()))
- {
- getMaximus()->process();
- }
- getFunctionCallManager()->sendMsg(getFunctionSciMsg());
- }
- catchFunction(getMaximus());
-}
-
-
-void Msg::send_async ( Sta & sta )
-{
- logFunction();
-
- try
- {
- set_sta(sta);
- send_async();
- }
- catchFunction(getMaximus());
-}
-
-
-Msg & Msg::send ( )
-{
- logFunction();
-
- try
- {
- // Register callback and send message
- getFunctionCallManager()->registerCallback( getFunctionSciMsg()->getSpecializedSciMsgId(),
- (boost::bind(&Msg::receiveResponse, this, _1)) );
- while(!getSystemManager()->isStationIdle(getFunctionSciMsg()->getSciMsgStationId()))
- {
- getMaximus()->process();
- }
- getFunctionCallManager()->sendMsg(getFunctionSciMsg());
-
- // Wait for response
- while(!isResponseReceived())
- {
- getMaximus()->process();
- }
- setResponseReceived(false);
- if (NULL != getCallback())
- {
- getCallback()(*this);
- }
- }
- catchFunction(getMaximus());
-
- return *this;
-}
-
-
-Msg & Msg::send ( Sta & sta )
-{
- logFunction();
-
- try
- {
- set_sta(sta);
- }
- catchFunction(getMaximus());
-
- return send();
-}
-
-
-bool Msg::is_param ( const string & name ) const
-{
- logFunction();
- bool bIsParam;
-
- try
- {
- unsigned long length = FUNCTION_CALL_PARAM_MAX_SIZE; /* max size of 1 parameter */
- unsigned char * pParam = new unsigned char [length];
- bIsParam = (NULL != bind_param(name, length, pParam));
- if (NULL != pParam)
- {
- delete [] pParam;
- pParam = NULL;
- }
- }
- catchFunction(getMaximus());
-
- return bIsParam;
-}
-
-
-unsigned char * Msg::bind_param ( const string & name, unsigned long & length, unsigned char * p_data ) const
-{
- logFunction();
- unsigned char * pData = NULL; // parameter not found => return NULL
-
- try
- {
- if (getFunctionSciMsg()->bindParameter(name, length, p_data))
- {
- // Parameter found => return p_data
- pData = p_data;
- }
- }
- catchFunction(getMaximus());
-
- return pData;
-}
-
-
-Function_Call_Msg_Id Msg::get_tx_msg_id ( ) const
-{
- return getFunctionSciMsg()->getSpecializedSciMsgId();
-}
-
-
-Function_Call_Msg_Id Msg::get_rx_msg_id ( ) const
-{
- return getFunctionSciMsg()->getSpecializedSciMsgHeader().msg_id;
-}
-
-
-// private methods
-//
-
-
-// private attributes accessor methods
-//
-
-
-Maximus * Msg::getMaximus ( ) const
-{
- if (NULL == mpMaximus)
- {
- throw Error(__PRETTY_FUNCTION__, "Maximus pointer is NULL");
- }
-
- return mpMaximus;
-}
-
-
-IFunctionCall * Msg::getFunctionCallManager ( ) const
-{
- try
- {
- if (NULL == mpFunctionCallManager)
- {
- throw Error(__PRETTY_FUNCTION__, "Function call manager pointer is NULL");
- }
- }
- catchFunction(getMaximus());
-
- return mpFunctionCallManager;
-}
-
-
-ISystem * Msg::getSystemManager ( ) const
-{
- try
- {
- if (NULL == mpSystemManager)
- {
- throw Error(__PRETTY_FUNCTION__, "System manager pointer is NULL");
- }
- }
- catchFunction(getMaximus());
-
- return mpSystemManager;
-}
-
-
-cb_t Msg::getCallback ( ) const
-{
- return mCallback;
-}
-
-
-bool Msg::setCallback ( const cb_t callback )
-{
- mCallback = callback;
-
- return true;
-}
-
-
-FunctionSciMsg * Msg::getFunctionSciMsg ( ) const
-{
- try
- {
- if (NULL == mpFunctionSciMsg)
- {
- throw Error(__PRETTY_FUNCTION__, "Function SCI message pointer is NULL");
- }
- }
- catchFunction(getMaximus());
-
- return mpFunctionSciMsg;
-}
-
-
-bool Msg::setFunctionSciMsg ( const FunctionSciMsg & function_sci_msg )
-{
- try
- {
- // If a function message had already been created, delete it before setting the new one
- if (NULL != mpFunctionSciMsg)
- {
- delete (mpFunctionSciMsg);
- mpFunctionSciMsg = NULL;
- }
- mpFunctionSciMsg = new FunctionSciMsg(function_sci_msg);
- }
- catchFunction(getMaximus());
-
- return true;
-}
-
-
-bool Msg::isResponseReceived ( ) const
-{
- return mResponseReceived;
-}
-
-
-bool Msg::setResponseReceived ( const bool response_received )
-{
- mResponseReceived = response_received;
-
- return true;
-}
-
-
-// public methods
-//
-
-
-void Msg::receiveResponse ( const FunctionSciMsg & function_sci_msg )
-{
- logFunction();
-
- try
- {
- setFunctionSciMsg(function_sci_msg);
- setResponseReceived(true);
- }
- catchFunction(getMaximus());
-}
-
-
-void Msg::receiveAsynchronousResponse ( const FunctionSciMsg & function_sci_msg )
-{
- logFunction();
-
- try
- {
- setFunctionSciMsg(function_sci_msg);
- if (NULL != getCallback())
- {
- getCallback()(*this);
- }
- }
- catchFunction(getMaximus());
-}
-
diff --git a/cesar/maximus/coreengine/src/MsgTest.cpp b/cesar/maximus/coreengine/src/MsgTest.cpp
deleted file mode 100644
index 9b5cc048f6..0000000000
--- a/cesar/maximus/coreengine/src/MsgTest.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-
-#include "MsgTest.h"
-
-#include "Msg.h"
-#include "Maximus.h"
-#include "FunctionSciMsg.h"
-#include "FunctionCallParameter.h"
-#include "Sta.h"
-#include "CoreEngine.h"
-
-#include "system_types.h" // for 'MAXIMUS_STATION_STATUS_IDLE'
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (MsgTest);
-
-void callback1 (Msg & msg)
-{
- logTest();
-}
-
-void callback2 (Msg & msg)
-{
- logTest();
-}
-
-
-void MsgTest::setUp (void)
-{
- logTest();
-
- mpCoreEngine = new CoreEngine();
- mpMaximus = new Maximus(mpCoreEngine);
- mpMsg = new Msg(mpMaximus, mpCoreEngine->getFunctionCall(), mpCoreEngine->getSystem());
-}
-
-
-void MsgTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- delete (mpMsg);
- mpMsg = NULL;
- }
- if (NULL != mpMaximus)
- {
- delete (mpMaximus);
- mpMaximus = NULL;
- }
- mpCoreEngine = NULL;
-}
-
-
-void MsgTest::add_param_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- mpMsg->add_param("name");
- mpMsg->add_param("unsigned char *", 6, (unsigned char *)"hello\0");
- string str("hello");
- mpMsg->add_param("string", str);
- mpMsg->add_param<int>("<int>", 123);
- unsigned int i = 456;
- mpMsg->add_param("<unsigned int>", i);
- mpMsg->add_param<bool>("<bool>", true);
-
- CPPUNIT_ASSERT_MESSAGE ( "add_param failed",
- (mpMsg->is_param("name"))
- && (mpMsg->is_param("unsigned char *"))
- && (mpMsg->is_param("string"))
- && (mpMsg->is_param("<int>"))
- && (mpMsg->is_param("<unsigned int>"))
- && (mpMsg->is_param("<bool>")) );
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::remove_param_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- mpMsg->add_param("name");
- mpMsg->remove_param("name");
-
- CPPUNIT_ASSERT_MESSAGE ( "remove_param failed",
- !mpMsg->is_param("name") );
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::set_cb_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- mpMsg->set_cb(&callback1);
- mpMsg->set_cb(&callback2);
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::remove_cb_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- mpMsg->set_cb(&callback1);
- mpMsg->remove_cb();
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::set_sta_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- Sta sta1 = mpMaximus->create_sta();
- Sta sta2 = mpMaximus->create_sta();
- mpMsg->set_sta(sta1);
- mpMsg->set_sta(sta2);
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::send_async_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- Sta sta = mpMaximus->create_sta();
- mpMsg->send_async(sta);
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::send_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- Sta sta = mpMaximus->create_sta();
- mpMsg->send(sta);
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::is_param_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- mpMsg->add_param("name");
-
- CPPUNIT_ASSERT_MESSAGE ( "is_param failed",
- mpMsg->is_param("name") );
-
- mpMsg->remove_param("name");
-
- CPPUNIT_ASSERT_MESSAGE ( "is_param failed",
- !mpMsg->is_param("name") );
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::bind_param_test (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- string str("hello");
- mpMsg->add_param("string", str);
- mpMsg->add_param<int>("int", 123);
- mpMsg->add_param<bool>("false", false);
- mpMsg->add_param<bool>("true", true);
-
- unsigned long length = str.length();
- unsigned char * pParam = new unsigned char [length];
- int i = mpMsg->bind_param<int>("int");
- bool bFalse = mpMsg->bind_param<bool>("false");
- bool bTrue = mpMsg->bind_param<bool>("true");
-
- CPPUNIT_ASSERT_MESSAGE ( "bind_param failed",
- (NULL != mpMsg->bind_param("string", length, pParam))
- && (0 == memcmp(pParam, str.c_str(), str.length()))
- && (mpMsg->is_param("int"))
- && (123 == i)
- && (mpMsg->is_param("false"))
- && !bFalse
- && (mpMsg->is_param("true"))
- && bTrue );
-
- if (NULL != pParam)
- {
- delete [] pParam;
- pParam = NULL;
- }
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::receiveResponseTest (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- FunctionSciMsg * pFunctionSciMsg = new FunctionSciMsg(mpCoreEngine->getFunctionCall());
- pFunctionSciMsg->addParameter(FunctionCallParameter("name", 6, (unsigned char *)"hello\0"));
- mpMsg->receiveResponse(*pFunctionSciMsg);
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveResponse failed",
- mpMsg->is_param("name") );
-
- if (NULL != pFunctionSciMsg)
- {
- delete(pFunctionSciMsg);
- pFunctionSciMsg = NULL;
- }
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
-
-void MsgTest::receiveAsynchronousResponseTest (void)
-{
- logTest();
-
- if (NULL != mpMsg)
- {
- FunctionSciMsg * pFunctionSciMsg = new FunctionSciMsg(mpCoreEngine->getFunctionCall());
- pFunctionSciMsg->addParameter(FunctionCallParameter("name", 6, (unsigned char *)"hello\0"));
- mpMsg->receiveAsynchronousResponse(*pFunctionSciMsg);
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveAsynchronousResponse failed",
- mpMsg->is_param("name") );
-
- if (NULL != pFunctionSciMsg)
- {
- delete(pFunctionSciMsg);
- pFunctionSciMsg = NULL;
- }
- }
- else
- {
- CPPUNIT_FAIL ("Msg pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/coreengine/src/Sta.cpp b/cesar/maximus/coreengine/src/Sta.cpp
deleted file mode 100644
index 35f2bbf163..0000000000
--- a/cesar/maximus/coreengine/src/Sta.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/************************************************************************
- Sta.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/coreengine/src/Sta.cpp
-**************************************************************************/
-
-#include "Sta.h"
-
-#include "Maximus.h"
-#include "ISystem.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-StaCounter Sta::mStaCounter;
-
-
-Sta::Sta ( Maximus * p_maximus, ISystem * p_system_manager, const string & station_executable, uint32_t seed ):
-mpMaximus(NULL),
-mpSystemManager(NULL),
-mStationId(0)
-{
- logFunction();
-
- if ( (NULL != p_maximus) && (NULL != p_system_manager) )
- {
- mpMaximus = p_maximus;
- mpSystemManager = p_system_manager;
- mStationId = mpSystemManager->createStation(station_executable, seed);
- mStaCounter[getStationId()] = 1;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Maximus and/or System manager pointers are NULL", errno);
- }
-}
-
-
-Sta::Sta ( const Sta & sta ):
-mpSystemManager(NULL),
-mStationId(0)
-{
- logFunction();
-
- mpMaximus = sta.getMaximus();
- mpSystemManager = sta.getSystemManager();
- mStationId = sta.getStationId();
- mStaCounter[getStationId()] += 1;
-}
-
-
-Sta::~Sta ( )
-{
- logFunction();
-
- remove();
- if (NULL != mpMaximus)
- {
- mpMaximus = NULL;
- }
- if (NULL != mpSystemManager)
- {
- mpSystemManager = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// public methods
-//
-
-
-void Sta::remove ( )
-{
- logFunction();
-
- try
- {
- if (0 == mStaCounter[getStationId()])
- {
- if (0 == getStationId())
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "station already removed" << endl;
-#endif /* CONFIG_LOG */
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Problem while deleting station");
- }
- }
- else if (1 == mStaCounter[getStationId()])
- {
- getSystemManager()->removeStation(getStationId());
- resetStationId();
- }
- else
- {
- mStaCounter[getStationId()] -= 1;
- }
- }
- catchFunction(getMaximus());
-}
-
-
-void Sta::deactivate ( )
-{
- logFunction();
-
- try
- {
- getSystemManager()->deactivateStation(getStationId());
- }
- catchFunction(getMaximus());
-}
-
-
-void Sta::activate ( )
-{
- logFunction();
-
- try
- {
- getSystemManager()->activateStation(getStationId());
- }
- catchFunction(getMaximus());
-}
-
-
-void Sta::debug ( )
-{
- logFunction();
-
- try
- {
- getSystemManager()->debugStation(getStationId());
- }
- catchFunction(getMaximus());
-}
-
-
-bool Sta::is_idle ( ) const
-{
- logFunction();
- bool isIdle = false;
-
- try
- {
- isIdle = getSystemManager()->isStationIdle(getStationId());
- }
- catchFunction(getMaximus());
-
- return isIdle;
-}
-
-
-void Sta::set_name ( const std::string & station_name )
-{
- logFunction();
-
- try
- {
- while (!is_idle())
- {
- getMaximus()->process();
- }
- getSystemManager()->setStationName(getStationId(), station_name);
- }
- catchFunction(getMaximus());
-}
-
-
-// private methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-Maximus * Sta::getMaximus ( ) const
-{
- if (NULL == mpMaximus)
- {
- throw Error(__PRETTY_FUNCTION__, "Maximus pointer is NULL");
- }
-
- return mpMaximus;
-}
-
-
-ISystem * Sta::getSystemManager ( ) const
-{
- try
- {
- if (NULL == mpSystemManager)
- {
- throw Error(__PRETTY_FUNCTION__, "System manager pointer is NULL");
- }
- }
- catchFunction(getMaximus());
-
- return mpSystemManager;
-}
-
-
-bool Sta::resetStationId ( )
-{
- mStationId = 0;
-
- return true;
-}
-
-
-// public methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-Sci_Msg_Station_Id Sta::getStationId ( ) const
-{
- return mStationId;
-}
-
diff --git a/cesar/maximus/coreengine/src/StaTest.cpp b/cesar/maximus/coreengine/src/StaTest.cpp
deleted file mode 100644
index 1af29a5430..0000000000
--- a/cesar/maximus/coreengine/src/StaTest.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-
-#include "StaTest.h"
-
-#include "Sta.h"
-#include "Maximus.h"
-#include "SystemManager.h"
-#include "SciServer.h"
-#include "NetworkClockProcessor.h"
-
-#include "Logger.h"
-
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (StaTest);
-
-
-void StaTest::setUp (void)
-{
- logTest();
-
- mpMaximus = new Maximus();
- mpSci = new SciServer();
- mpSystemManager = new SystemManager(mpSci);
- mpNetworkClock = new NetworkClockProcessor();
- mpSystemManager->setNetworkClock(mpNetworkClock);
- mpSta = new Sta (mpMaximus, mpSystemManager, mpSystemManager->getDefaultStationExecutable());
-}
-
-
-void StaTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- delete (mpSta);
- mpSta = NULL;
- }
- if (NULL != mpMaximus)
- {
- delete (mpMaximus);
- mpMaximus = NULL;
- }
- if (NULL != mpSystemManager)
- {
- delete (mpSystemManager);
- mpSystemManager = NULL;
- }
- if (NULL != mpNetworkClock)
- {
- delete (mpNetworkClock);
- mpNetworkClock = NULL;
- }
- if (NULL != mpSci)
- {
- delete (mpSci);
- mpSci = NULL;
- }
-}
-
-
-void StaTest::remove_test (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- mpSta->remove();
-
- CPPUNIT_ASSERT_MESSAGE ( "remove failed",
- (mpSystemManager->getListOfStations()->empty())
- && (0 == mpSta->getStationId()) );
- }
- else
- {
- CPPUNIT_FAIL ("Sta pointer is NULL");
- }
-}
-
-
-void StaTest::deactivate_test (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- mpSta->deactivate();
-
- CPPUNIT_ASSERT_MESSAGE ( "deactivate failed",
- MAXIMUS_STATION_STATUS_DEACTIVATED == mpSystemManager->getStationStatus(mpSta->getStationId()) );
- }
- else
- {
- CPPUNIT_FAIL ("Sta pointer is NULL");
- }
-}
-
-
-void StaTest::activate_test (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- mpSta->deactivate();
- mpSta->activate();
-
- CPPUNIT_ASSERT_MESSAGE ( "activate failed",
- MAXIMUS_STATION_STATUS_DEACTIVATED != mpSystemManager->getStationStatus(mpSta->getStationId()) );
- }
- else
- {
- CPPUNIT_FAIL ("Sta pointer is NULL");
- }
-}
-
-
-void StaTest::debug_test (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- mpSta->debug();
- }
- else
- {
- CPPUNIT_FAIL ("Sta pointer is NULL");
- }
-}
-
-
-void StaTest::is_idle_test (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- // Set the station status and test the function
- mpSystemManager->updateStationStatus(mpSta->getStationId(), MAXIMUS_STATION_STATUS_IDLE);
- CPPUNIT_ASSERT_MESSAGE ( "is_idle failed", mpSta->is_idle() );
-
- // Set the station status and test the function
- mpSystemManager->updateStationStatus(mpSta->getStationId(), MAXIMUS_STATION_STATUS_BUSY);
- CPPUNIT_ASSERT_MESSAGE ( "is_idle failed", !mpSta->is_idle() );
- }
- else
- {
- CPPUNIT_FAIL ("Sta pointer is NULL");
- }
-}
-
-
-void StaTest::getStationIdTest (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- CPPUNIT_ASSERT_MESSAGE ( "getStationId failed",
- 0 != mpSta->getStationId() );
- }
- else
- {
- CPPUNIT_FAIL ("Sta pointer is NULL");
- }
-}
-
-
-void StaTest::set_name_test (void)
-{
- logTest();
-
- if (NULL != mpSta)
- {
- mpSystemManager->updateStationStatus(mpSta->getStationId(), MAXIMUS_STATION_STATUS_IDLE);
- mpSta->set_name("station name");
- }
- else
- {
- CPPUNIT_FAIL ("Sta pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/doc/fulminata_maximus_architecture.xmi b/cesar/maximus/doc/fulminata_maximus_architecture.xmi
deleted file mode 100644
index 960e8a513d..0000000000
--- a/cesar/maximus/doc/fulminata_maximus_architecture.xmi
+++ /dev/null
@@ -1,6863 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<XMI verified="false" xmi.version="1.2" timestamp="2012-01-30T15:37:24" xmlns:UML="http://schema.omg.org/spec/UML/1.3">
- <XMI.header>
- <XMI.documentation>
- <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
- <XMI.exporterVersion>1.5.8</XMI.exporterVersion>
- <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
- </XMI.documentation>
- <XMI.metamodel xmi.version="1.3" href="UML.xml" xmi.name="UML"/>
- </XMI.header>
- <XMI.content>
- <UML:Model isSpecification="false" isAbstract="false" isLeaf="false" xmi.id="m1" isRoot="false" name="UML Model">
- <UML:Namespace.ownedElement>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="folder" name="folder"/>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="datatype" name="datatype"/>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="interface" name="interface"/>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="constructor" name="constructor"/>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="enum" name="enum"/>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="struct" name="struct"/>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="typedef" name="typedef"/>
- <UML:Stereotype visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="friend" name="friend"/>
- <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Logical View" name="Logical View">
- <UML:Namespace.ownedElement>
- <UML:Package stereotype="folder" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Datatypes" name="Datatypes">
- <UML:Namespace.ownedElement>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UOc7OI8LRuFv" name="int"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ctnUq2PsE48l" name="char"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4Kduenu6BUBZ" name="bool"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nJsED87p1vHp" name="float"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vfi9josl6Tfk" name="double"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HXoQ2zynGq1U" name="short"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="w7Hw0ZjtEP2v" name="long"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DshIKK2Zspzs" name="unsigned int"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ovf5keXejoaj" name="unsigned short"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LIcXhcTtT8Bn" name="unsigned long"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QBMG0J8pDlsx" name="string"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="ctnUq2PsE48l" isRoot="false" xmi.id="66nkQj7RUTGt" name="char*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="QBMG0J8pDlsx" isRoot="false" xmi.id="trv86yL4jfeS" name="const std::string&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="XlAIxWJ0t2q4" isRoot="false" xmi.id="Hfgxfxm85LAR" name="const tick_t"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="9uUW4XZ5t7nP" isRoot="false" xmi.id="nHLqdVHOsxNM" name="CoreEngine*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bBWfkvMSUBzc" isRoot="false" xmi.id="8HFYeCh1V2Tr" name="SystemManager*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Szlq4RFfiqZ0" isRoot="false" xmi.id="FM9MFyrLE5ts" name="FunctionCallManager*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="l6c6ZbY9k4oU" isRoot="false" xmi.id="dxoHI48VOHpd" name="NetworkClockProcessor*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="SU7oJl8r1vpC" isRoot="false" xmi.id="QR5iQfL4cAJs" name="PhyProcessor*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="ElUvZ3tKAVPh" isRoot="false" xmi.id="xXbKcOH2nKjB" name="SciServer*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="PDzFlxMB73D7" isRoot="false" xmi.id="Fls26ZE3bRdo" name="const Network_Clock_Tick"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="IZRHkhpzqhMU" isRoot="false" xmi.id="E5x9L9RNrd6t" name="Maximus*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="3PksAGjP1DIY" isRoot="false" xmi.id="WKXaz2THzK1G" name="const Msg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="3PksAGjP1DIY" isRoot="false" xmi.id="g55iEgjQlzYA" name="Msg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="LIcXhcTtT8Bn" isRoot="false" xmi.id="qtOabrV06r8H" name="const unsigned long"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Ny9n9LLzEhXo" isRoot="false" xmi.id="Z3mduvueNb9d" name="const unsigned char*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="MuLM2exc7eeX" isRoot="false" xmi.id="44n6UGK0XgsS" name="T const&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="K1iCj3mMQwQL" isRoot="false" xmi.id="eptOVybOJnpM" name="const cb_t&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4xqo1eJwmBM3" isRoot="false" xmi.id="lNFLPGC5GcjE" name="Sta&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="LIcXhcTtT8Bn" isRoot="false" xmi.id="iB4yZDFSik45" name="unsigned long&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Ny9n9LLzEhXo" isRoot="false" xmi.id="ObMobD4JO6Fx" name="unsigned char*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="0xotfbj8uz9G" isRoot="false" xmi.id="bQxm3RYu0b9f" name="T&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FBsPeH4gEvUD" isRoot="false" xmi.id="JCIhsw1mHbC2" name="FunctionSciMsg*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="QBMG0J8pDlsx" isRoot="false" xmi.id="9U1uI8HJT0Jf" name="const std::string"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Ny9n9LLzEhXo" isRoot="false" xmi.id="2UqTU88CwGoW" name="unsigned char*&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="CxVwuGjKYPlO" isRoot="false" xmi.id="Ks2QuFd1iYTQ" name="const ParametersList&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="uNcSkNqyAxHb" isRoot="false" xmi.id="dsRw8nRMsxE8" name="const Sci_Msg_Station_Id"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FBsPeH4gEvUD" isRoot="false" xmi.id="58Cx3O5oNLy7" name="const FunctionSciMsg*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FBsPeH4gEvUD" isRoot="false" xmi.id="Q7aANH0SNANP" name="const FunctionSciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4Kduenu6BUBZ" isRoot="false" xmi.id="3lgc1KcaMAny" name="const bool"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4xqo1eJwmBM3" isRoot="false" xmi.id="GgjUKN39BDXg" name="const Sta&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="uvuzFPfmVe3t" isRoot="false" xmi.id="O0Y4e7L2YuKE" name="const CallbackFunction&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FBsPeH4gEvUD" isRoot="false" xmi.id="taPZHCs4KBPK" name="FunctionSciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="SRkFry3tOtYS" isRoot="false" xmi.id="Dk5pczPnz6Yr" name="CallbacksList*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="JEjtehSNwhqe" isRoot="false" xmi.id="qj7xSczKuwTq" name="const FunctionCallParameter&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="JEjtehSNwhqe" isRoot="false" xmi.id="AtFJ5jDgvMWr" name="FunctionCallParameter&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="ctnUq2PsE48l" isRoot="false" xmi.id="xdn6dFqV85mT" name="const char*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bEeZdY0xhVQw" isRoot="false" xmi.id="1PQGjZx0iexb" name="Function_Call_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="dBvvR3kpanaF" isRoot="false" xmi.id="hHn4fFvgbLYX" name="SciMsg*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="60clcAU0xnx5" isRoot="false" xmi.id="VwQtQ1TIoAvq" name="const Function_Call_Type"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="iYfdxrJ7viR4" isRoot="false" xmi.id="WqvJ0Bi64K7w" name="const Function_Call_Parameters_Number"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="yfv0x3wqUorr" isRoot="false" xmi.id="TYfZTukOB7DK" name="void*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bEeZdY0xhVQw" isRoot="false" xmi.id="bHSmNf4TkzTc" name="const Function_Call_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="hCCozGYEQBhw" isRoot="false" xmi.id="10N6r5hp62ve" name="Network_Clock_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="acFbRvXTEMIs" isRoot="false" xmi.id="G9Fc21bZFJYw" name="const Network_Clock_Type"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="2OUKpDmUU6Tg" isRoot="false" xmi.id="nNX5UmpiITKY" name="const Network_Clock_Id"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="hCCozGYEQBhw" isRoot="false" xmi.id="cSRv6d9bhfgi" name="const Network_Clock_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="HaP8ZCy8plaL" isRoot="false" xmi.id="VcPcOcsgjQbo" name="const NetworkClockEvt&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="HaP8ZCy8plaL" isRoot="false" xmi.id="j0sNksMuhVaF" name="NetworkClockEvt&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="PDzFlxMB73D7" isRoot="false" xmi.id="u6I3QBCIKjNh" name="Network_Clock_Tick&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bxyfX2FkfHc6" isRoot="false" xmi.id="HrAPc4wZ9mox" name="EvtsList&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="khBqlcIjqaYa" isRoot="false" xmi.id="U4mQnNTnRzFr" name="NetworkClockEvtList*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="nMqHFdX6fOJd" isRoot="false" xmi.id="CVhnimyi5KYN" name="ClockSciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="1Ey5TfpDf9m6" isRoot="false" xmi.id="iP4BuKaU6MFG" name="PhySciMsg*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="6EgMC1YWquF9" isRoot="false" xmi.id="02OHgpv6iwv9" name="const Phy_Type"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="R7NTfdMjVLA2" isRoot="false" xmi.id="QYpsIm6ImSYT" name="const Phy_Mpdu_Format"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="YkJeSfDyIVQI" isRoot="false" xmi.id="U3HSI0riWfYo" name="const Phy_Nb_Of_Pbs"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="axOd2PMcsqyz" isRoot="false" xmi.id="eOTt0WSUZhur" name="const Phy_Tonemap_Index"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="E4ek4y1U3HLE" isRoot="false" xmi.id="ee5ipO9TkcLk" name="const Phy_Flags"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4F2mG2WvecbT" isRoot="false" xmi.id="ylvhNGRUzc7S" name="const uint32_t"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="1Ey5TfpDf9m6" isRoot="false" xmi.id="w18nsvnfKlCn" name="PhySciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="YFYivL7lKsyo" isRoot="false" xmi.id="i2UaJmLAA6SB" name="Phy_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="YFYivL7lKsyo" isRoot="false" xmi.id="O12pIiPVGutd" name="const Phy_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4F2mG2WvecbT" isRoot="false" xmi.id="t2asNnHh8wsl" name="const uint32_t*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="qzlFUs4gsJKl" isRoot="false" xmi.id="qZLXuibBNXID" name="const unsigned short int"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FGkVafnZOxkd" isRoot="false" xmi.id="1p2XZLYDDR9J" name="Sci_Msg_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="dBvvR3kpanaF" isRoot="false" xmi.id="xSzXJBSHo8yn" name="const SciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="dBvvR3kpanaF" isRoot="false" xmi.id="KLj6UftWOUuW" name="const SciMsg*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4ptGPmSL1mv9" isRoot="false" xmi.id="lvIXi2Pxh0fK" name="const Sci_Msg_Status"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="B8d1TM24GHiB" isRoot="false" xmi.id="EknMLJBAPpgo" name="const Sci_Msg_Type"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bicD6yqnVUa7" isRoot="false" xmi.id="pX24l2l5CrBj" name="const Sci_Msg_Flag"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FGkVafnZOxkd" isRoot="false" xmi.id="erAlIci9mSIq" name="const Sci_Msg_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Ny9n9LLzEhXo" isRoot="false" xmi.id="LrX6DxQMEnp2" name="unsigned char**"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="dBvvR3kpanaF" isRoot="false" xmi.id="s715so7RcDV9" name="SciMsg**"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="0vcc95kxWWVn" isRoot="false" xmi.id="cKqCpL4vHbUA" name="StationsList*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="ElUvZ3tKAVPh" isRoot="false" xmi.id="KaWkbzz0V7eb" name="const SciServer&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="dBvvR3kpanaF" isRoot="false" xmi.id="3McdnqE6JCta" name="SciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4LgRjEB5I6jc" isRoot="false" xmi.id="Kevzvq2lEsL7" name="std::list&lt; Station * >"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="tn89GJwm2DQU" isRoot="false" xmi.id="w1WmyaR6BJwY" name="const Cco_Capability"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="XmVg46uC4n8q" isRoot="false" xmi.id="VewgxsCIjx8s" name="const Bridge_Capability"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="BEIun6kQm0UQ" isRoot="false" xmi.id="W4aE1i6TfajT" name="const Homeplug_Version"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bJtzCEyKnKFK" isRoot="false" xmi.id="0gZfFH6nfJoC" name="const Device_Access_Key"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="OvNqoCObl8CH" isRoot="false" xmi.id="jIKxm4xqfB4z" name="StationConfiguration*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="G1jpotlnS9ne" isRoot="false" xmi.id="7jGBwdRbnPDW" name="const Station&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="G1jpotlnS9ne" isRoot="false" xmi.id="nBSGMFfRdnbK" name="Station&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="TTjyPYhZVm6n" isRoot="false" xmi.id="wZnZ9lZYcork" name="const pid_t"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="WO0VJglkKJD1" isRoot="false" xmi.id="TrV97VV12IZA" name="const File_Descriptor"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="zczAjgq81yYh" isRoot="false" xmi.id="nMhUhBvBqw4A" name="const Station_Status"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="kNRjwgcIhcX0" isRoot="false" xmi.id="VBixqziBqrhe" name="const SystemSciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="G1jpotlnS9ne" isRoot="false" xmi.id="INoSbjQmME1a" name="Station*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="idECE5nt0Vr7" isRoot="false" xmi.id="II4tXBwM3i4V" name="System_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="yD8lVM51i3U1" isRoot="false" xmi.id="8Eb0NWUsBQSJ" name="const System_Type"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="idECE5nt0Vr7" isRoot="false" xmi.id="ZZfK0mQuNQ1O" name="const System_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="QBMG0J8pDlsx" isRoot="false" xmi.id="vQ1S2XzSPBqN" name="const string&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="fuM43CRtzagH" isRoot="false" xmi.id="pJsfgcYj7OSg" name="const error_t"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="SAh1zCEmUab7" isRoot="false" xmi.id="C9cGTLSO5pln" name="std::ofstream&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="kzdjBd3ATyt6" isRoot="false" xmi.id="r4r1RcqCQswh" name="Logger&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="BBlq3c2ugtt6" isRoot="false" xmi.id="ViIuaCbFO4Rh" name="std::ostream&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="kzdjBd3ATyt6" isRoot="false" xmi.id="vTwaNogqWwk6" name="const Logger&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="PKaM1HoCDbbs" isRoot="false" xmi.id="T3wGzLaOdJRi" name="ISci*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Ab0NMXybAfZU" isRoot="false" xmi.id="DEOmV9sHIiVw" name="IPhy*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DhQX2rY6wPDZ" isRoot="false" xmi.id="8JusFMjAgM0v" name="const Phy_Fc_Mode"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="UgPIutO5ambc" isRoot="false" xmi.id="nLEyCkrlHPQw" name="const Phy_Short_Ppdu"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="6Qx7AaWcHvu9" isRoot="false" xmi.id="UxIGEVkWi0NJ" name="const Phy_Mod"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="TJe4s63xXy2f" isRoot="false" xmi.id="pwe3pKqZPxkb" name="const Phy_Fecrate"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="tWAq6KHaeveU" isRoot="false" xmi.id="0cEqYhKKEcTV" name="const Phy_Gil"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="2yOeu36ujWRN" isRoot="false" xmi.id="ASmFlCHQXF31" name="const Phy_Tx_Id"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="eKZEv9oVXM34" isRoot="false" xmi.id="s0nXwm2aK1kb" name="const Phy_Nb_Of_Symbols"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="2j8N30UlnykR" isRoot="false" xmi.id="qcb8l3xv8TRt" name="IFunctionCall*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="0dybVkdpO4Ya" isRoot="false" xmi.id="TXhtlZjMAp7C" name="ISystem*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="pdUJAVtJe39T" isRoot="false" xmi.id="Dc4onmiEKP73" name="INetworkClock*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="nJsED87p1vHp" isRoot="false" xmi.id="EQrcJtA2vC7c" name="const float"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="gjYrACSC9BuB" isRoot="false" xmi.id="ihg5BF2ckirV" name="PhySciMsgMpdu*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="mKTfuY7pgyOI" isRoot="false" xmi.id="h0fjFQ6XJMWi" name="IChannel*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="8RfL5UmYopms" isRoot="false" xmi.id="S02STVfDWPXk" name="const uint8_t*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="c6nC8sEdaTgi" isRoot="false" xmi.id="vl7nx6lzHKbw" name="const Expected_Tx"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="8RfL5UmYopms" isRoot="false" xmi.id="FYDrFS8mDoaL" name="uint8_t*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DshIKK2Zspzs" isRoot="false" xmi.id="O74yXfkidyrR" name="const unsigned int"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="gjYrACSC9BuB" isRoot="false" xmi.id="XNEzxlV9pJ9M" name="PhySciMsgMpdu&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="YFYivL7lKsyo" isRoot="false" xmi.id="iJSN8ewspTX1" name="const Phy_Header&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="emjq7Xks8DWW" isRoot="false" xmi.id="vFBbZkjwm4Vx" name="PhySciMsgPre*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="uHdgUvjiSZG6" isRoot="false" xmi.id="4XSkb7G7HX8a" name="PhySciMsgFc*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="vpDXE2tS2kJL" isRoot="false" xmi.id="xqe85s2v3X76" name="IEthernet*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Tf9yq5dCbZ1m" isRoot="false" xmi.id="HYl1HlhGNnFB" name="std::vector&lt; Msg * >"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Tf9yq5dCbZ1m" isRoot="false" xmi.id="rRJOS4Ahavgr" name="std::vector&lt; Sta * >"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="K1iCj3mMQwQL" isRoot="false" xmi.id="vteoFJru7xrN" name="const cb_t"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bErx1XNsRKIs" isRoot="false" xmi.id="8DcrWo7HU0iD" name="const Ethernet_Header&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="HTUXG3XFPxuK" isRoot="false" xmi.id="pE9AJY0D36ZX" name="const Ethernet_Type"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="hCCozGYEQBhw" isRoot="false" xmi.id="bB3bDXILtLrz" name="const Network_Clock_Header&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="yfv0x3wqUorr" isRoot="false" xmi.id="rHbXHZa03W4n" name="const void*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="2JrrgMpWtl6M" isRoot="false" xmi.id="gFFNUwPz4TDC" name="const Function_Call_Msg_Id"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="sWYhCThWlDFP" isRoot="false" xmi.id="QXEg7cwSFt0l" name="const uint16_t"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="bEeZdY0xhVQw" isRoot="false" xmi.id="IdrZNJ0YPvUj" name="const Function_Call_Header&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="QBMG0J8pDlsx" isRoot="false" xmi.id="drESmKOpFHzv" name="std::string&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="idECE5nt0Vr7" isRoot="false" xmi.id="MvpHChZ2rJOW" name="const System_Header&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="CWGE8DVJYvei" isRoot="false" xmi.id="eqNqcEputAw7" name="DestStationsList&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="4F2mG2WvecbT" isRoot="false" xmi.id="fL9t737j70re" name="uint32_t*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="vSu5lsg0a7WJ" isRoot="false" xmi.id="j5EvHIixdpql" name="PhySciMsgNoise&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="gjYrACSC9BuB" isRoot="false" xmi.id="FVFtK4cB028u" name="const PhySciMsgMpdu&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="Tf9yq5dCbZ1m" isRoot="false" xmi.id="SuGBQogD9iYR" name="std::vector&lt; ChannelSettings * >&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FNAWFo5m56XX" isRoot="false" xmi.id="2A0kHciAJN94" name="const Channel_Settings_Key&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="F1TYNacxByRT" isRoot="false" xmi.id="yHm6ssfdnOOK" name="std::map&lt; const Channel_Settings_Key, ChannelSettings *, ltkey >"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="QfHGrZecvJNh" isRoot="false" xmi.id="MbP7gzMpbiS8" name="const Channel_Mod"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="vfi9josl6Tfk" isRoot="false" xmi.id="PFhzx975rDDm" name="const double"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="7WkpCVeuHxVw" isRoot="false" xmi.id="t8K2eKmlJWeX" name="const ChannelPoint&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="7WkpCVeuHxVw" isRoot="false" xmi.id="GvaXRE3v0jhy" name="const ChannelPoint"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="7WkpCVeuHxVw" isRoot="false" xmi.id="Egoy0uRTnPKa" name="ChannelPoint&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DshIKK2Zspzs" isRoot="false" xmi.id="BlnbH3oVPPjZ" name="unsigned int&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="FGkVafnZOxkd" isRoot="false" xmi.id="7YtOMToL1Xs9" name="const Sci_Msg_Header&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="HaP8ZCy8plaL" isRoot="false" xmi.id="eFtlt57PInXt" name="NetworkClockEvt*&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="ZWryYSGDRuyu" isRoot="false" xmi.id="ZcxOLFwJIm1Z" name="const Ethernet_Sniffer_Type"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="cQhYUO60E2We" isRoot="false" xmi.id="LmSODUAk50Mh" name="const Ethernet_Flags"/>
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Package visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MCSt8TslaFsB" name="std">
- <UML:Namespace.ownedElement>
- <UML:Class visibility="public" isSpecification="false" namespace="MCSt8TslaFsB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SAh1zCEmUab7" name="ofstream"/>
- <UML:Class visibility="public" isSpecification="false" namespace="MCSt8TslaFsB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4LgRjEB5I6jc" name="list"/>
- <UML:Class visibility="public" isSpecification="false" namespace="MCSt8TslaFsB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BBlq3c2ugtt6" name="ostream"/>
- <UML:Class visibility="public" isSpecification="false" namespace="MCSt8TslaFsB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Tf9yq5dCbZ1m" name="vector"/>
- <UML:Class visibility="public" isSpecification="false" namespace="MCSt8TslaFsB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="F1TYNacxByRT" name="map"/>
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Ny9n9LLzEhXo" name="unsigned char"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MuLM2exc7eeX" name="T const"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0xotfbj8uz9G" name="T"/>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="60clcAU0xnx5" comment="// Function_Call_Header.type//" name="Function_Call_Type">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="60clcAU0xnx5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qw0upkshD7Ws" name="FUNCTION_CALL_TYPE_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="60clcAU0xnx5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="08eZuDdvpOX0" name="FUNCTION_CALL_TYPE_REQ"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="60clcAU0xnx5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qXvcVzRJvRDi" name="FUNCTION_CALL_TYPE_RSP"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="60clcAU0xnx5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="94PMBtCB1riw" name="FUNCTION_CALL_TYPE_NB"/>
- </UML:Enumeration>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2JrrgMpWtl6M" name="Function_Call_Msg_Id"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" elementReference="DshIKK2Zspzs" isRoot="false" xmi.id="iYfdxrJ7viR4" name="Function_Call_Parameters_Number"/>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="acFbRvXTEMIs" comment="// Network_Clock_Header.type//" name="Network_Clock_Type">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="acFbRvXTEMIs" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="i8ParVwZ1aAz" name="NETWORK_CLOCK_TYPE_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="acFbRvXTEMIs" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RT4K9VOj5bLU" name="NETWORK_CLOCK_TYPE_REMOVE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="acFbRvXTEMIs" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UqxgBEZrKwRB" name="NETWORK_CLOCK_TYPE_STATION"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="acFbRvXTEMIs" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PMiRwsQLJUdS" name="NETWORK_CLOCK_TYPE_FUNCTION_CALL"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="acFbRvXTEMIs" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="x1A1aTV4JTiS" name="NETWORK_CLOCK_TYPE_PHY"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="acFbRvXTEMIs" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hHK1DjAd5s2z" name="NETWORK_CLOCK_TYPE_SYSTEM"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="acFbRvXTEMIs" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iSIzuvPruZsS" name="NETWORK_CLOCK_TYPE_NB"/>
- </UML:Enumeration>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2OUKpDmUU6Tg" name="Network_Clock_Id"/>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PDzFlxMB73D7" name="Network_Clock_Tick"/>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="obHtTJr9l96f" comment="sci_types.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/common/types/sci_types.h&#xa;" name="Sci_Server_Status">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="obHtTJr9l96f" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3VUv5LO7hsRU" name="MAXIMUS_SCI_SERVER_STATUS_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="obHtTJr9l96f" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5CyYIPE40VyR" name="MAXIMUS_SCI_SERVER_STATUS_RUNNING"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="obHtTJr9l96f" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mnaVwg8xBctE" name="MAXIMUS_SCI_SERVER_STATUS_STOP"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="obHtTJr9l96f" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vHMc9l6Dx2lE" name="MAXIMUS_SCI_SERVER_STATUS_STOPPED"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="obHtTJr9l96f" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RxIRQEsC1Qhw" name="MAXIMUS_SCI_SERVER_STATUS_NB"/>
- </UML:Enumeration>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4ptGPmSL1mv9" comment="// Used by SciMsg//" name="Sci_Msg_Status">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="4ptGPmSL1mv9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Y0MT25hU2ytQ" name="MAXIMUS_SCI_MSG_STATUS_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="4ptGPmSL1mv9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CmcECHAH43VT" name="MAXIMUS_SCI_MSG_STATUS_TO_SEND"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="4ptGPmSL1mv9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oxmpiiwGiIji" name="MAXIMUS_SCI_MSG_STATUS_SENT"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="4ptGPmSL1mv9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LPCLN6lZqLl2" name="MAXIMUS_SCI_MSG_STATUS_RECEIVED"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="4ptGPmSL1mv9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ctHevk8jgsWO" name="MAXIMUS_SCI_MSG_STATUS_PROCESSED"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="4ptGPmSL1mv9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YTeEjLx3i7O5" name="MAXIMUS_SCI_MSG_STATUS_NB"/>
- </UML:Enumeration>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="B8d1TM24GHiB" comment="// Sci_Msg_Header.type//" name="Sci_Msg_Type">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="B8d1TM24GHiB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2qsihO6FpiUX" name="SCI_MSG_TYPE_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="B8d1TM24GHiB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3RamYwpi4QjY" name="SCI_MSG_TYPE_NETWORK_CLOCK"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="B8d1TM24GHiB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nja31IE374lo" name="SCI_MSG_TYPE_FUNCTION_CALL"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="B8d1TM24GHiB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Sp3GXXlawJKT" name="SCI_MSG_TYPE_PHY"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="B8d1TM24GHiB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="F8BKYuqLcQMd" name="SCI_MSG_TYPE_SYSTEM"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="B8d1TM24GHiB" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iYgncPb3EfJl" name="SCI_MSG_TYPE_NB"/>
- </UML:Enumeration>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uNcSkNqyAxHb" name="Sci_Msg_Station_Id"/>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="A2J7LcYakjsI" name="Sci_Msg_Id"/>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bicD6yqnVUa7" comment="// Sci_Msg_Header.flags//" name="Sci_Msg_Flag">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="bicD6yqnVUa7" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="rCA5pRoxT62m" name="SCI_MSG_FLAG_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="bicD6yqnVUa7" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iaNQJFitwI60" name="SCI_MSG_FLAG_RESP"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="bicD6yqnVUa7" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FvnkPMrHW0KJ" name="SCI_MSG_FLAG_ACK"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="bicD6yqnVUa7" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="P7GtDHftr0J9" name="SCI_MSG_FLAG_NEEDACK"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="bicD6yqnVUa7" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Ez28I68X1uFP" name="SCI_MSG_FLAG_SYNC"/>
- </UML:Enumeration>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="E4ek4y1U3HLE" name="Phy_Flags"/>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6EgMC1YWquF9" comment="// Phy_Header.type//" name="Phy_Type">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Yb1b7UtyzhI6" name="PHY_TYPE_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="h7pvvBbzNHKX" name="PHY_TYPE_PREAMBLE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Is37kIGIsFrx" name="PHY_TYPE_FC_HYBRID_MODE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jlviQEm7JZ0D" name="PHY_TYPE_FC_AV_ONLY_MODE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kbC7rWe7MgE7" name="PHY_TYPE_PRS"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wSNohFlQ0h6O" name="PHY_TYPE_MPDU_PAYLOAD"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tsUCSUNA4aGt" name="PHY_TYPE_TONEMAP"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4s0RYFWVhtHP" name="PHY_TYPE_NOISE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="6EgMC1YWquF9" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="63n4iuTZmxjC" name="PHY_TYPE_NB"/>
- </UML:Enumeration>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="R7NTfdMjVLA2" comment="// Phy_Header.mpdu_format//" name="Phy_Mpdu_Format">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="aeXFWoccpQhV" name="PHY_MPDU_FORMAT_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="IA247mFWrcyW" name="PHY_MPDU_FORMAT_BEACON"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DKFidOkD2FRW" name="PHY_MPDU_FORMAT_SOF"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="239pRqLjyLo3" name="PHY_MPDU_FORMAT_SACK"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="71ZwdVSqogWR" name="PHY_MPDU_FORMAT_RTS_CTS"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2Hf2U6ZW7iMZ" name="PHY_MPDU_FORMAT_SOUND"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WfIU04X6542i" name="PHY_MPDU_FORMAT_RSOF"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="R7NTfdMjVLA2" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="aTWO73p9ISBm" name="PHY_MPDU_FORMAT_NB"/>
- </UML:Enumeration>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YkJeSfDyIVQI" name="Phy_Nb_Of_Pbs"/>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="axOd2PMcsqyz" name="Phy_Tonemap_Index"/>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tn89GJwm2DQU" comment="system_types.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/common/types/system_types.h" name="Cco_Capability">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="tn89GJwm2DQU" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sdR87rQfnnIn" name="MAXIMUS_NOT_CCO_CAPABLE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="tn89GJwm2DQU" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CcN2TL1K87UM" name="MAXIMUS_CCO_CAPABLE_WITHOUT_QOS_SUPPORT"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="tn89GJwm2DQU" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OQ9QdXtT9KbG" name="MAXIMUS_PREFERRED_CCO_CAPABILITY"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="tn89GJwm2DQU" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9zvwmBjyo60H" name="MAXIMUS_NEXT_GENERATION_CCO_CAPABILITY"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="tn89GJwm2DQU" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PzbW43sTTzt4" name="MAXIMUS_CCO_CAPABILITY_NB"/>
- </UML:Enumeration>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="XmVg46uC4n8q" name="Bridge_Capability">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="XmVg46uC4n8q" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yqnkun1Klbqp" name="MAXIMUS_NOT_BRIDGE_CAPABLE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="XmVg46uC4n8q" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cgI6gA8Duerx" name="MAXIMUS_BRIDGE_CAPABLE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="XmVg46uC4n8q" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="il9mWHdU5OFy" name="MAXIMUS_BRIDGE_CAPABILITY_NB"/>
- </UML:Enumeration>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BEIun6kQm0UQ" name="Homeplug_Version">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="BEIun6kQm0UQ" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8cd3ES0xB9jh" name="MAXIMUS_HOMEPLUG_AV"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="BEIun6kQm0UQ" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OKASiNQsZgmN" name="MAXIMUS_HOMEPLUG_101"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="BEIun6kQm0UQ" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mUlWTFxbpYe4" name="MAXIMUS_HOMEPLUG_VERSION_NB"/>
- </UML:Enumeration>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zczAjgq81yYh" name="Station_Status">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="zczAjgq81yYh" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JyXscIDMmysF" name="MAXIMUS_STATION_STATUS_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="zczAjgq81yYh" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BnrzKT1J60Rn" name="MAXIMUS_STATION_STATUS_IDLE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="zczAjgq81yYh" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gFvfBRLUNsNz" name="MAXIMUS_STATION_STATUS_BUSY"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="zczAjgq81yYh" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AaLvXE8gzxfH" name="MAXIMUS_STATION_STATUS_DEACTIVATED"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="zczAjgq81yYh" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RgYVg0ILDC0P" name="MAXIMUS_STATION_STATUS_NB"/>
- </UML:Enumeration>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" elementReference="LIcXhcTtT8Bn" isRoot="false" xmi.id="bJtzCEyKnKFK" name="Device_Access_Key"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" elementReference="UOc7OI8LRuFv" isRoot="false" xmi.id="WO0VJglkKJD1" name="File_Descriptor"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" elementReference="UOc7OI8LRuFv" isRoot="false" xmi.id="JUKVeIsFclEo" name="Error_Id"/>
- <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yD8lVM51i3U1" comment="// System_Header.type//" name="System_Type">
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="yD8lVM51i3U1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jFk2Zv1qPLL1" name="SYSTEM_TYPE_NONE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="yD8lVM51i3U1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dDHFxT1vgAg9" name="SYSTEM_TYPE_IDLE"/>
- <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="yD8lVM51i3U1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UjACmfDUsvWR" name="SYSTEM_TYPE_NB"/>
- </UML:Enumeration>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uvuzFPfmVe3t" name="CallbackFunction"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Szlq4RFfiqZ0" xmi.id="FFjd7SEcLuGj" parent="2j8N30UlnykR" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="FBsPeH4gEvUD" xmi.id="UmoLPXdZOnAp" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bEeZdY0xhVQw" name="Function_Call_Header"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yfv0x3wqUorr" name="void"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="nMqHFdX6fOJd" xmi.id="E1EkeKXGrlqW" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hCCozGYEQBhw" name="Network_Clock_Header"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="l6c6ZbY9k4oU" xmi.id="isrV4NWwNe9f" parent="pdUJAVtJe39T" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4F2mG2WvecbT" name="uint32_t"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="SU7oJl8r1vpC" xmi.id="cCYiC0P09ms7" parent="97JXVDPWi2XZ" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="1Ey5TfpDf9m6" xmi.id="7PxcRil5PsG3" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qzlFUs4gsJKl" name="unsigned short int"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YFYivL7lKsyo" name="Phy_Header"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FGkVafnZOxkd" name="Sci_Msg_Header"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8RfL5UmYopms" name="uint8_t"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TTjyPYhZVm6n" name="pid_t"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="bBWfkvMSUBzc" xmi.id="4QEmSahd4YcC" parent="0dybVkdpO4Ya" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kNRjwgcIhcX0" xmi.id="qpo9SZnjuaBV" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="idECE5nt0Vr7" name="System_Header"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Awyu6tX5fqlW" xmi.id="oHaNwpXsoPxf" parent="pkwx1nQd15WY" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fuM43CRtzagH" name="error_t"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="SU7oJl8r1vpC" xmi.id="H8aJ4nCJ2vwd" parent="97JXVDPWi2XZ" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1Ey5TfpDf9m6" name="IoZujw7YP8ON">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="7PxcRil5PsG3"/>
- </UML:GeneralizableElement.generalization>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="97JXVDPWi2XZ" name="NegQ4Jb1bsXM"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="3DGvGCGP6it9" xmi.id="w3A8Aoem0rz9" parent="Ab0NMXybAfZU" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="CFHqNaZGkqY1" xmi.id="vHrlTmC4TCgk" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="3DGvGCGP6it9" xmi.id="PmhWbSfkhcsw" parent="Ab0NMXybAfZU" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="DQE4VzTfZR3v" xmi.id="ZqxQgPtEQ5Pf" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SU7oJl8r1vpC" name="x8uSJr2jpnXr">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="cCYiC0P09ms7"/>
- <UML:Generalization xmi.idref="H8aJ4nCJ2vwd"/>
- </UML:GeneralizableElement.generalization>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CFHqNaZGkqY1" name="gSdgqQLeJTBZ">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="vHrlTmC4TCgk"/>
- </UML:GeneralizableElement.generalization>
- </UML:Class>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="rNYhJGFqdJWf" name="SciMsg *"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="812hl7Twm80d" name="EtherSciMsg*"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3Q4QiXaDv1Kh" name="EtherSciMsg&amp;"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PwWdyuRfg8qc" name="Ethernet_Header*"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6PMoYeoBvXGW" name="EthernetProcessor*"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TCtwHZhr7lwx" name="Ether_Type"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EXCTf5VmCpZP" name="const Ethernet_Header*"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="CpGnr2lIA5kk" xmi.id="knNFU41hWrYt" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="3DGvGCGP6it9" xmi.id="1uNWjzNZmvRK" parent="Ab0NMXybAfZU" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="DQE4VzTfZR3v" xmi.id="EyMIfoIzY4LJ" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DhQX2rY6wPDZ" name="Phy_Fc_Mode"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UgPIutO5ambc" name="Phy_Short_Ppdu"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6Qx7AaWcHvu9" name="Phy_Mod"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TJe4s63xXy2f" name="Phy_Fecrate"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tWAq6KHaeveU" name="Phy_Gil"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2yOeu36ujWRN" name="Phy_Tx_Id"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eKZEv9oVXM34" name="Phy_Nb_Of_Symbols"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kooC0I8IkF1k" xmi.id="wqho3l7CAaCs" parent="KqJ8bZTEut0O" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Kd2vdgexbsmt" xmi.id="kW8FuRBYKjoB" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4mmdfk3zM4Cq" name="maximus"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="l6c6ZbY9k4oU" xmi.id="bF4M7ruT7PG9" parent="pdUJAVtJe39T" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="O8DTzb5kluKg" name="Python script"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Kd2vdgexbsmt" xmi.id="2uCdtjrgLfpr" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="gjYrACSC9BuB" xmi.id="D8KuNhepKAPe" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="uHdgUvjiSZG6" xmi.id="XhEs3csvqUn6" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="emjq7Xks8DWW" xmi.id="78n0YovcPcSY" parent="Kd2vdgexbsmt" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="C6sJEmNl1TfP" name="interface"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9uUW4XZ5t7nP" name="RdHavJxZcLT1"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Ab0NMXybAfZU" name="T6S74K0HDK2p"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3DGvGCGP6it9" name="YElIyHEIHrrU">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="w3A8Aoem0rz9"/>
- <UML:Generalization xmi.idref="PmhWbSfkhcsw"/>
- <UML:Generalization xmi.idref="1uNWjzNZmvRK"/>
- </UML:GeneralizableElement.generalization>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DQE4VzTfZR3v" name="EoA21qthFyQa">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="ZqxQgPtEQ5Pf"/>
- <UML:Generalization xmi.idref="EyMIfoIzY4LJ"/>
- </UML:GeneralizableElement.generalization>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kooC0I8IkF1k" xmi.id="mPpaajecotJ6" parent="KqJ8bZTEut0O" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Kd2vdgexbsmt" xmi.id="bbEXkRwwAMUd" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="uHdgUvjiSZG6" xmi.id="2HEQAGupXJCO" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="gjYrACSC9BuB" xmi.id="mRseT4TBFAfy" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="vSu5lsg0a7WJ" xmi.id="5oSJ5pfRXEKM" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="emjq7Xks8DWW" xmi.id="osPEzRTtgtfK" parent="Kd2vdgexbsmt" name=""/>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="K1iCj3mMQwQL" name="cb_t"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="RYfxHmW7DMwU" xmi.id="lfdP22D7S0Ta" parent="vpDXE2tS2kJL" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="CpGnr2lIA5kk" xmi.id="OKhFhtT3InZ0" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HTUXG3XFPxuK" name="Ethernet_Type"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bErx1XNsRKIs" name="Ethernet_Header"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kooC0I8IkF1k" xmi.id="qMFrrMkplbDq" parent="KqJ8bZTEut0O" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Kd2vdgexbsmt" xmi.id="Y9t3iv153eXZ" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="uHdgUvjiSZG6" xmi.id="NkEF2MRQX3KN" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="gjYrACSC9BuB" xmi.id="I5POjRXvITtd" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="vSu5lsg0a7WJ" xmi.id="GpnnjAimICRg" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="emjq7Xks8DWW" xmi.id="t2VHdgaE0EUP" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="nMqHFdX6fOJd" xmi.id="tAhKmf7IFJ6T" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="l6c6ZbY9k4oU" xmi.id="UjcieFEY4Y2B" parent="pdUJAVtJe39T" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Szlq4RFfiqZ0" xmi.id="kc9Nze8S0Bjw" parent="2j8N30UlnykR" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="FBsPeH4gEvUD" xmi.id="w86S4WF4jxpo" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sWYhCThWlDFP" name="uint16_t"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="bBWfkvMSUBzc" xmi.id="SqtM7IeD47EL" parent="0dybVkdpO4Ya" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kNRjwgcIhcX0" xmi.id="kZodzZdOFIKk" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="ElUvZ3tKAVPh" xmi.id="XIEfe2iXktPm" parent="PKaM1HoCDbbs" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FNAWFo5m56XX" name="Channel_Settings_Key">
- <UML:Classifier.feature>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="ZlFJOJZWpHJ0" type="uNcSkNqyAxHb" name="tx_station_id"/>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="lvs2tNy8i7cx" type="uNcSkNqyAxHb" name="rx_station_id"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vhhynCUKwjdK" name="ltkey">
- <UML:Classifier.feature>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0BooQ7oB3gBu" name="operator ( )">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SL9hyA785w7e" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="adOWKzqKAd8Z" type="2A0kHciAJN94" value="" name="key1"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="kuklZwfb4fLJ" type="2A0kHciAJN94" value="" name="key2"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" elementReference="yHm6ssfdnOOK" isRoot="false" xmi.id="I2tMfCdvE4TZ" name="ChannelSettingsList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="f4Wo0xIyC255" comment="class ChannelComputer" name="ChannelComputer">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="uigf62zM4sii"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="2bn9FjKszVLx" type="bfhvSo8YsYdy" comment="// private attributes//// for random" name="mEngine"/>
- <UML:Attribute visibility="private" isSpecification="false" ownerScope="classifier" xmi.id="PsDvdrWFWC8z" type="qzlFUs4gsJKl" name="mNumberOfCopiesArray"/>
- <UML:Attribute visibility="private" isSpecification="false" ownerScope="classifier" xmi.id="yHVop6npiayx" type="nJsED87p1vHp" name="mPowerScaleArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="HGnEk8A9yN4c" type="FYDrFS8mDoaL" name="mpTonemask"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="FZrjjxihEBW1" type="cKqCpL4vHbUA" name="mpListOfStations"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="IHpypnt72gLm" type="I2tMfCdvE4TZ" name="mListOfChannelSettings"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="oVvnrxP4WEnF" type="DshIKK2Zspzs" name="mBeaconPeriod"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BUvOfPNvgCtV" comment="// Constructors/Destructors// /**&#xa;Constructor" name="ChannelComputer">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="yma0SukFNf0E" type="DEOmV9sHIiVw" value="" name="p_phy"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="cNI7b6KkYD6B" type="TXhtlZjMAp7C" value="" name="p_system"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cS7Ge0kalIaB" comment="Empty Destructor" name="~ ChannelComputer"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CIQaxQoYn5dM" comment="// public methods// /**&#xa;Duplicate the MPDU payload.&#xa;@param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload&#xa;@return bool" name="duplicateMpduPayload">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CdfOwVbouVjB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9v5h99sjbz0G" type="XNEzxlV9pJ9M" value="" name="mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yioj0NsDfJnd" comment="Compute PB measurement and NOISE.&#xa;@param pb_measurement_array the PB measurement to fill in (for all PBs composing the MPDU)&#xa;@param noise the PHY SCI message NOISE to fill in&#xa;@param pb_header_array the PB header of each PB composing the MPDU&#xa;@param mpdu a PHY SCI message MPDU that contains the duplicated MPDU payload&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param rx_station_id the ID of the destination station&#xa;@param current_tick the current Network Clock tick&#xa;@return bool" name="addPerturbation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XMKz3j6T4F93" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="hZ9TeknnfsSo" type="fL9t737j70re" value="" name="pb_measurement_array"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2LYdIWrEEgvE" type="j5EvHIixdpql" value="" name="noise"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3oPg7AHmkQFM" type="t2asNnHh8wsl" value="" name="pb_header_array"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="A3AqtactvAVC" type="FVFtK4cB028u" value="" name="mpdu"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="eKQsyM5zAUgF" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="fx1NMFjUGrI7" type="dsRw8nRMsxE8" value="" name="rx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Sv1N3UXioyYn" type="Fls26ZE3bRdo" value="" name="current_tick"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KdmS6QflOg8i" comment="Add Channel Settings to the list.&#xa;Called when a station is created => create its associated Channel Settings.&#xa;@return bool" name="addChannelSettings">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NG9SCF4Mshlm" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="trC9hVH9QGUR" type="dsRw8nRMsxE8" value="" name="created_station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="k29W0gJIJ4iP" comment="Find Channel Settings.&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param rx_station_id the ID of the destination station&#xa;@return a list of Channel Settings" name="findChannelSettings">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CKb5nIELeWIf" type="SuGBQogD9iYR"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="UN8q1EYv4l2l" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="GHueXO5FQDmO" type="dsRw8nRMsxE8" value="" name="rx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="t3eA7MYajgOl" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vxezggkuycWT" comment="Called when the PHY processor receives a preamble.&#xa;@param current_tick the current Network Clock tick&#xa;@param tx_station_id the ID of the transmitting station&#xa;@return bool" name="receivePre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="FO9IbGJyWQPg" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="0bhPmRndUSoa" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mM8W0WFvRts7" type="Fls26ZE3bRdo" value="" name="current_tick"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZazVCVxD5car" comment="Called when the PHY processor receives a frame control.&#xa;@param current_tick the current Network Clock tick&#xa;@param tx_station_id the ID of the transmitting station&#xa;@return bool" name="receiveFc">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fT1WBkGL4pQs" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3LVVlH5YbD2b" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="iHV9ANFhyCB8" type="Fls26ZE3bRdo" value="" name="current_tick"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="i6JlitclF5Gy" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Sets the tonemask.&#xa;@param p_tonemask the new value of mpTonemask&#xa;@return bool" name="setTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="7dBk9RPPqWfP" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="KKWvVYVDn0Lx" type="S02STVfDWPXk" value="" name="p_tonemask"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LYdHkoQQujBa" comment="Sets the tonemap of the current transmission.&#xa;@return bool&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param length the tonemap length in octets&#xa;@param p_tonemap the tonemap" name="setTonemap">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="myOGMnx0EwWP" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="bmJorXmArH3N" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="nYYbWrWqP75A" type="qtOabrV06r8H" value="" name="length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="tVYlDkLmWeaL" type="Z3mduvueNb9d" value="" name="p_tonemap"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CKV1ZXML5tua" comment="Sets the beacon period in ticks 25 MHz.&#xa;@return bool&#xa;@param frequency the power-line frequency" name="setBeaconPeriod">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gmlic9ahmjRw" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="kQQAWVIPzqBA" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="aUw49UQJmtIM" comment="// private methods// /**&#xa;Initializes the Channel Computer class attributes." name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QfhUYb4IzSQV" comment="Gets a tonemask value.&#xa;@param carrier_index&#xa;@return a boolean value indicating if the requested carrier is enabled or not" name="getTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BrJzNyO8umOG" type="3lgc1KcaMAny"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vgtuX225WwAd" type="qZLXuibBNXID" value="" name="carrier_index"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QYwDRDXqsCKO" comment="Update the list of Channel Settings.&#xa;Called when channel perturbation has to be added.&#xa;Check if stations have been removed => remove their associated Channel Settings." name="updateListOfChannelSettings"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nMeko5Ejl7cG" comment="Gets the beacon period in ticks 25 MHz.&#xa;@return mBeaconPeriod" name="getBeaconPeriod">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XJGmFk9tVuc5" type="O74yXfkidyrR"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9cMfZUJx2D8R" comment="// protected methods// All following protected methods could be declared as private methods,// but they are declared as protected methods to be unitarly tested.///**&#xa;Gets the sigma factor.&#xa;@param modulation the tonemap modulation&#xa;@param snr_in_db the SNR value in dB&#xa;@return the sigma factor" name="getSigma">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="2AmouEi5514Q" type="PFhzx975rDDm"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Aj6AvEZJspah" type="MbP7gzMpbiS8" value="" name="modulation"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OCKKTf1nEQvu" type="EQrcJtA2vC7c" value="" name="snr_in_db"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Qm5Ibdz0oHIF" comment="Gets the PowerScale.&#xa;@param modulation the tonemap modulation&#xa;@return 1 / (PowerScale^2)" name="getPowerScale">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xSYrDv6kEKUS" type="EQrcJtA2vC7c"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="wH3Aiw45Bj26" type="MbP7gzMpbiS8" value="" name="modulation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tABiLOUlAX1k" comment="Gets the linear SNR.&#xa;@param snr_in_db the SNR value in dB&#xa;@return the linear SNR value" name="getLinearSnr">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3eLYWvdY6NN0" type="PFhzx975rDDm"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9zkvG2ABJBLz" type="EQrcJtA2vC7c" value="" name="snr_in_db"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7O3I75OyFXgZ" comment="Add noise.&#xa;@param point the original point coordinates&#xa;@param sigma the sigma factor&#xa;@return the noise point coordinates" name="addNoise">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="b55e5732XZsk" type="GvaXRE3v0jhy"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Wminy2l5OmMV" type="t8K2eKmlJWeX" value="" name="point"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="riS5G6e9DwBr" type="PFhzx975rDDm" value="" name="sigma"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jQ27COb3636K" comment="Compute the BER.&#xa;@param codeA / codeB the 2 codes to compare&#xa;@return the BER" name="computeBer">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="UwThEx9HZSn6" type="qZLXuibBNXID"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9kSMfbBtXjPw" type="qZLXuibBNXID" value="" name="codeA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vSsu9Xqtxs09" type="qZLXuibBNXID" value="" name="codeB"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EbAJeHbmz36e" comment="Compute the noise.&#xa;@param pointA / pointB the 2 points coordinates&#xa;@return the (distance)^2 between the 2 points" name="computeNoise">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OQcUmzUN3X06" type="O74yXfkidyrR"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="fGWAzv6tLwnU" type="t8K2eKmlJWeX" value="" name="pointA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TdNQWMXixi1a" type="t8K2eKmlJWeX" value="" name="pointB"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xdKweQZHg5Re" comment="Compute the FER.&#xa;@param ber the BER of the current PB&#xa;@param n the average number of bits coded per carrier on the current PB&#xa;@param modulation the tonemap modulation&#xa;@return the FER" name="computeFer">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="c389cyu7uLo9" type="EQrcJtA2vC7c"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="yYXJUIlwv9MP" type="qZLXuibBNXID" value="" name="ber"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Vs8QY7yViIRN" type="O74yXfkidyrR" value="" name="n"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jycN34zzcUI4" type="MbP7gzMpbiS8" value="" name="modulation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="m40iBL7eDD2l" comment="Compute the CRC error.&#xa;@param fer the FER of the current PB&#xa;@return the CRC error" name="computeCrcError">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="GvQqNEulcWDM" type="3lgc1KcaMAny"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="L1E3JdO0c1Od" type="EQrcJtA2vC7c" value="" name="fer"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="f4Wo0xIyC255" xmi.id="uigf62zM4sii" parent="mKTfuY7pgyOI" name=""/>
- <UML:Package visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dIDTyvYIWngb" name="boost">
- <UML:Namespace.ownedElement>
- <UML:Class visibility="public" isSpecification="false" namespace="dIDTyvYIWngb" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bfhvSo8YsYdy" name="mt19937"/>
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QfHGrZecvJNh" name="Channel_Mod"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7WkpCVeuHxVw" comment="ChannelPoint.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelPoint.h&#xa;//**&#xa;class ChannelPoint" name="ChannelPoint">
- <UML:Classifier.feature>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="5LdfotjaxiG6" type="nJsED87p1vHp" comment="// public attributes// // abscissa" name="I"/>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="3MiEZlxumBw5" type="nJsED87p1vHp" comment="// ordinate" name="Q"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oI6OJS2MlfzZ" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="ChannelPoint"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Wh8SPOYQkHeK" comment="Constructor" name="ChannelPoint">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="0bCmk8pWRtvi" type="nJsED87p1vHp" value="" name="i"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Jx55a2c6jkY8" type="EQrcJtA2vC7c" value="" name="q"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="95YrMA9MlM6T" comment="Empty Destructor" name="~ ChannelPoint"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Sv0rpva8sdBQ" comment="// public methods// /**&#xa;Operator =&#xa;@param channel_point&#xa;@return ChannelPoint &amp;" name="operator =">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WhkXCkdoljyN" type="Egoy0uRTnPKa"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="foWPY5VfA4XU" type="t8K2eKmlJWeX" value="" name="channel_point"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KsjAVsa9g7WF" comment="Operator ==&#xa;@param channel_point&#xa;@return bool" name="operator ==">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iqSc9GjP9AFX" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="A1sI3PmG4YC4" type="t8K2eKmlJWeX" value="" name="channel_point"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SbXD1qoLiVUC" comment="Checks Channel Point values ranges,&#xa;i.e. checks I and Q coordinates validity.&#xa;@return bool" name="checkValidity">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="M9GweUJ891fK" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="N4J4BnHJo9bq" comment="ChannelMapping.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelMapping.h&#xa;//**&#xa;class ChannelMapping" name="ChannelMapping">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="XL4btGdJr9Xs" type="7WkpCVeuHxVw" comment="// private attributes//" name="mPoint"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="zLCfqgpBk8Fu" type="qzlFUs4gsJKl" name="mCode"/>
- <UML:Attribute visibility="private" isSpecification="false" ownerScope="classifier" xmi.id="tUBicnW98ai2" type="qzlFUs4gsJKl" name="mNbOfBitsArray"/>
- <UML:Attribute visibility="private" isSpecification="false" ownerScope="classifier" xmi.id="MsB4zOwsr8YT" type="oJLfSqWPBi3z" name="mMappingArray"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="v2a1cG1OZN40" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="ChannelMapping"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BaNNGQKaHTeE" comment="Constructors" name="ChannelMapping">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qb6hhd8cfibG" type="qZLXuibBNXID" value="" name="code"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ydeVygT9GrUU" name="ChannelMapping">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Hp4WGjk6Ipnz" type="t8K2eKmlJWeX" value="" name="point"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SvZ5b8LXly3h" comment="Empty Destructor" name="~ ChannelMapping"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eWptLJLb6Q7N" comment="// public methods// /**&#xa;Computes the code from the already set I and Q coordinates.&#xa;@param modulation the used modulation&#xa;@return bool" name="computeCode">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="jG8Uz4rfsKI1" type="qZLXuibBNXID"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="7sTNhFM9AtCk" type="MbP7gzMpbiS8" value="" name="modulation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1WHlUKS6pHxA" comment="Computes the I and Q coordinates from an already set code.&#xa;@param modulation the used modulation&#xa;@return bool" name="computePoint">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YzPg7eBRmROQ" type="t8K2eKmlJWeX"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZJjdhr0ojS9O" type="MbP7gzMpbiS8" value="" name="modulation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hTVpMhZNDp8f" comment="Retrieve the integer (except for QAM8) I and Q coordinates from the already set I and Q coordinates.&#xa;@param modulation the used modulation&#xa;@return bool" name="retrievePoint">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tfY1gBLNPRrM" type="GvaXRE3v0jhy"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9Zmwoj5L0ozh" type="MbP7gzMpbiS8" value="" name="modulation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fxTMPci45DsR" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Sets the code.&#xa;@param modulation the used modulation&#xa;@param mpdu_payload_length the length of the MPDU payload&#xa;@param p_mpdu_payload pointer to the MPDU payload&#xa;@param mpdu_index indicates the current index of the MPDU payload (in bits)&#xa;@return bool (and update mpdu_index)" name="setCode">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Ug2KyIKVHjBP" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="tPn6EtmMSWIF" type="MbP7gzMpbiS8" value="" name="modulation"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="DLaEAXvnVP8u" type="qtOabrV06r8H" value="" name="mpdu_payload_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1qx54pWxEH1R" type="Z3mduvueNb9d" value="" name="p_mpdu_payload"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="wcKR1SK1JH6N" type="BlnbH3oVPPjZ" value="" name="mpdu_index"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4aIGsJh15UcK" comment="Sets the code.&#xa;@param code the new value of mCode&#xa;@return bool" name="setCode">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LMq7lCVdr1eV" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="WRpvoWSi9m88" type="qZLXuibBNXID" value="" name="code"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FS7YhDtlmB1e" comment="Gets the code.&#xa;@return mCode" name="getCode">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AxqZOhwqMwBK" type="qzlFUs4gsJKl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ShdX9FsfefaQ" comment="Sets the coordinates.&#xa;@param point the new value of mPoint&#xa;@return bool" name="setPoint">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EVnVEysZIhf4" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="C29JnHP2hXYO" type="t8K2eKmlJWeX" value="" name="point"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iR7Ua662njYv" comment="Gets the Channel Point.&#xa;@return mPoint" name="getPoint">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="t8hj8JEIG5qe" type="Egoy0uRTnPKa"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xOab392D99Uw" comment="Sets the I coordinate.&#xa;@param i the new value of mPoint.I&#xa;@return bool" name="setI">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kkV6gePu9CNL" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Quw5PUT7tYcR" type="EQrcJtA2vC7c" value="" name="i"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="egUQQ0JNOrwP" comment="Gets the I coordinate.&#xa;@return mPoint.I" name="getI">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9EuRvXTogAXo" type="EQrcJtA2vC7c"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0yd8752VzzaO" comment="Sets the Q coordinate.&#xa;@param q mPoint.Q&#xa;@return bool" name="setQ">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Rk4hnuKXencI" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="R1ULZ6mCmEaA" type="EQrcJtA2vC7c" value="" name="q"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CtXakU0jQbrW" comment="Gets the Q coordinate.&#xa;@return mPoint.Q" name="getQ">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="RzAY9WtIklif" type="EQrcJtA2vC7c"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oJLfSqWPBi3z" name="short int"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PJbHtdSeqfcR" comment="ChannelSettings.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelSettings.h&#xa;//**&#xa;class ChannelSettings" name="ChannelSettings">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="gt1eqa0GbUZ9" type="4Kduenu6BUBZ" comment="// private attributes//" name="mIsConfigured"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="YJLJYvTkozJW" type="nJsED87p1vHp" name="mSnrArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="RHFrs6NWyNAm" type="QfHGrZecvJNh" name="mTonemapArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="x92YdbfAv0TR" type="PDzFlxMB73D7" name="mPreDetectionDate"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="tu9hrSEIhRAZ" type="PDzFlxMB73D7" name="mFcReceptionDate"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WV4SsCEpLFMx" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="ChannelSettings"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="q15j0WAtQIZI" comment="Empty Destructor" name="~ ChannelSettings"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ilYQCixiE1A6" comment="// public methods// /**&#xa;Gets the first symbol start date (in ticks).&#xa;@return tick at which the first symbol has started" name="getFirstSymbolStartDate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JBRzKxllhpRU" type="Fls26ZE3bRdo"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CNuVcESQDVAD" comment="Gets the tonemap modulation.&#xa;@param carrier the current carrier number&#xa;@return the tonemap modulation" name="getModulation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="klzMYZfzYpVg" type="MbP7gzMpbiS8"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1I5QaegJPEjb" type="O74yXfkidyrR" value="" name="carrier"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vgI9gSDsn5NP" comment="Gets the SNR in dB.&#xa;@param interval the current interval number&#xa;@param carrier the current carrier number&#xa;@return the SNR in dB" name="getSnr">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LOw39eiSo8P6" type="EQrcJtA2vC7c"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="JoqVJ0gJIljr" type="Fls26ZE3bRdo" value="" name="beacon_period"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="PNAobrQWVgdB" type="Fls26ZE3bRdo" value="" name="symbol_start_date"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="6p1uuNJCB7hS" type="O74yXfkidyrR" value="" name="carrier"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5NjM9QDWnLLN" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Gets if the channel has been configured.&#xa;@return mIsConfigured" name="isConfigured">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5Apm0GEi1B4X" type="3lgc1KcaMAny"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CjrhPVrVIqNC" comment="Sets the SNR.&#xa;@param snr_value SNR value in dB&#xa;@return bool" name="setSnr">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="jhUFVzvqNssV" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="DfMMm3nsPWEW" type="EQrcJtA2vC7c" value="" name="snr_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="GYaf2m9zBAgt" comment="Sets the tonemap of the current transmission.&#xa;@return bool&#xa;@param tonemap_array the new value of mTonemapArray" name="setTonemap">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="UYxIgLOlVEVT" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="VlnYgMz4lsk0" type="MbP7gzMpbiS8" value="" name="tonemap_array[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BdQ6sBo8jMmm" comment="Sets the PRE detection date.&#xa;@param date tick at which the preamble has been received&#xa;@return bool" name="setPreDetectionDate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ShBStEzcvUrO" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="8tjH1PAX9v3n" type="Fls26ZE3bRdo" value="" name="date"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="G0s1tcz4DN85" comment="Sets the FC reception date.&#xa;@param date tick at which the frame control has been received&#xa;@return bool" name="setFcReceptionDate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TlFpd5K7dFOK" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZxCGJw0Qnihp" type="Fls26ZE3bRdo" value="" name="date"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5qKElN0zNq0G" comment="// private methods// /**&#xa;Initializes the Channel Settings class attributes." name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SxIeLPjsMt6d" comment="Sets if the channel is configured.&#xa;@param is_configured the new value of mIsConfigured&#xa;@return bool" name="setIsConfigured">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="am36yZXPEhr5" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="n73bnlOsZi5I" type="3lgc1KcaMAny" value="" name="is_configured"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="55IQvGhLExzX" comment="Gets the PRE detection date.&#xa;@return mPreDetectionDate tick at which the preamble has been received" name="getPreDetectionDate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vqfoIXDkGQZt" type="Fls26ZE3bRdo"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MhPgYTKMYNvL" comment="Gets the FC reception date.&#xa;@return mFcReceptionDate tick at which the frame control has been received" name="getFcReceptionDate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Vry86MQf7Uj3" type="Fls26ZE3bRdo"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6JEd1Jw4MEUF" comment="Gets the time interval.&#xa;@param symbol_start_date the current symbol start date in ticks&#xa;@return the interval number" name="getInterval">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3GSHxJNq82fQ" type="O74yXfkidyrR"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="S9ag7YDRDa8l" type="Fls26ZE3bRdo" value="" name="beacon_period"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2S5an0wsJAVI" type="Fls26ZE3bRdo" value="" name="symbol_start_date"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="RYfxHmW7DMwU" xmi.id="P1Cz8K6JKeJ1" parent="vpDXE2tS2kJL" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="CpGnr2lIA5kk" xmi.id="b5C38IYyUjh0" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="D3DUDdA4BXcR" name="compareMsgId">
- <UML:Classifier.feature>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jSV1dsLPmSGq" name="operator ( )">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XqAlEhcjYbpd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="4Rpg6OhHQuld" type="2JrrgMpWtl6M" value="" name="msg_id1"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="VtfgQH77ja6M" type="2JrrgMpWtl6M" value="" name="msg_id2"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SRkFry3tOtYS" name="CallbacksList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Szlq4RFfiqZ0" comment="class FunctionCallManager" name="FunctionCallManager">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="FFjd7SEcLuGj"/>
- <UML:Generalization xmi.idref="kc9Nze8S0Bjw"/>
- <UML:Generalization xmi.idref="uZl36d1qRclf"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="raWAUltd7jW1" type="SRkFry3tOtYS" comment="// private attributes// " name="mListOfCallbacks"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="dmOwhy7bcAr6" type="xXbKcOH2nKjB" name="mpSciServer"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iZoWyAQnivxA" comment="// Constructors/Destructors// /**&#xa;Constructor" name="FunctionCallManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="gqnlXKk8495l" type="xXbKcOH2nKjB" value="" name="sci_server"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7CLhKCo3kaZg" comment="Empty Destructor" name="~ FunctionCallManager"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kxUSsRaWGOFl" comment="// public methods// /**&#xa;@return FunctionSciMsg *" name="createMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vGI0k14lFU0D" type="JCIhsw1mHbC2"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="g0uk7zTE9muS" comment="@return bool&#xa;@param msg_id&#xa;@param callback_address" name="registerCallback">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="mL1uMeIrURdi" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ziVhG2N1xrRq" type="2JrrgMpWtl6M" value="" name="msg_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="H2KVOaG4aAmh" type="O0Y4e7L2YuKE" value="" name="callback_address"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7FtH2ljzRCgi" comment="@return bool&#xa;@param p_function_sci_msg" name="sendMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8DPfoDIiRYgB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="C1j9t8x88IbW" type="JCIhsw1mHbC2" value="" name="p_function_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qraO0M37auMa" comment="@return bool&#xa;@param function_sci_msg" name="sendMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XiumDsxxEzpY" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="g5X7FDpPCWZ3" type="taPZHCs4KBPK" value="" name="function_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fUBnkmKYcswc" comment="@return bool&#xa;@param function_sci_msg" name="receiveMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="d7P6Y0mfEAK0" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Dzhlu4La9shN" type="Q7aANH0SNANP" value="" name="function_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3VmF1JJgoSSW" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return pointer to mListOfCallbacks" name="getListOfCallbacks">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Nagm6Nvd3pNE" type="Dk5pczPnz6Yr"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AtPIj4fkZR0b" comment="// private methods// " name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jHFVhh1uR4h2" name="registerFunctionSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hJBtG0Pr8nve" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="44p1BOsJFHbz" name="displayListOfCallbacks"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZllXuTRZV4sC" comment="// Constructors/Destructors// /**&#xa;Constructor" name="FunctionCallManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="J3yww40I35qa" type="T3wGzLaOdJRi" value="" name="p_sci_server"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Szlq4RFfiqZ0" xmi.id="uZl36d1qRclf" parent="2j8N30UlnykR" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JEjtehSNwhqe" comment="FunctionCallParameter.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/functioncall/inc/FunctionCallParameter.h&#xa;//**&#xa;class FunctionCallParameter" name="FunctionCallParameter">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="NrWouCoyGezP" type="QBMG0J8pDlsx" comment="// private attributes// " name="mName"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="2phF4GENVwE7" type="LIcXhcTtT8Bn" name="mValueLength"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="dgUaMIEj9iV1" type="ObMobD4JO6Fx" name="mpValue"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uKz9wwYwlFBn" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="FunctionCallParameter"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WQBzMP6x4YXQ" comment="Copy Constructor" name="FunctionCallParameter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="t2mcFyQjMZig" type="qj7xSczKuwTq" value="" name="parameter"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wmd0KBO8sV6K" comment="Constructor" name="FunctionCallParameter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="63f0z6rq8bTM" type="QBMG0J8pDlsx" value="" name="name"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Xt5tQoXMYBNt" type="LIcXhcTtT8Bn" value="" name="value_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Kl1CF5VL88L8" type="ObMobD4JO6Fx" value="" name="p_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EAyLkPhHGm9g" comment="Empty Destructor" name="~ FunctionCallParameter"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Yg37rQy99xMM" comment="// public methods// " name="operator ==">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="niJzqbyBBcxH" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3ph9x1FBBCWt" type="qj7xSczKuwTq" value="" name="parameter"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bBBsyKWU0ZZq" name="operator =">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xss1hEFMXREl" type="AtFJ5jDgvMWr"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xXz5TJRW89f5" type="qj7xSczKuwTq" value="" name="parameter"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="g3LectUYOSdr" name="displayParameter"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="l4LuDzzLsCdx" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Get the value of mName&#xa;@return the value of mName" name="getName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PdcXQYACET94" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wobrA8io91Sl" comment="Set the value of mName&#xa;@return bool&#xa;@param name the new value of mName" name="setName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="55FEiCUf4Kej" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="svHHNu86zS0A" type="9U1uI8HJT0Jf" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RyUJA5E6tpx1" comment="Set the value of mName&#xa;@return bool&#xa;@param name the new value of mName" name="setName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Yu33JFmitPEH" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="0taxLa7kWZ3h" type="xdn6dFqV85mT" value="" name="p_name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eHnV4jU2KH6x" comment="Get the value of mValue Length&#xa;@return the value of mValueLength" name="getValueLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vOR7pZBseO7K" type="LIcXhcTtT8Bn"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VuTb0D5y4fvN" comment="Set the value of mValueLength&#xa;@return bool&#xa;@param value_length the new value of mValueLength" name="setValueLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YZyatcHQUKRn" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="D07ka8PCNAgS" type="qtOabrV06r8H" value="" name="value_length"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tASCSY9vRaWP" comment="@return mpValue" name="getValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="aEWRbkgU86bv" type="ObMobD4JO6Fx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mbNoEICQIH8q" comment="@return bool&#xa;@param p_value the new value of mpValue" name="setValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fkoH6vaeSWEL" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="QX3lhjDZrdlH" type="Z3mduvueNb9d" value="" name="p_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AsCbRh0BINzV" comment="// private methods// " name="initAttributes"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CxVwuGjKYPlO" name="ParametersList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FBsPeH4gEvUD" comment="class FunctionSciMsg" name="FunctionSciMsg">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="UmoLPXdZOnAp"/>
- <UML:Generalization xmi.idref="w86S4WF4jxpo"/>
- <UML:Generalization xmi.idref="bBGWS2FbowsE"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="HtgfhrS9xQuR" type="60clcAU0xnx5" comment="// private attributes// // Get from specialized SCI message header//" name="mSpecializedSciMsgType"/>
- <UML:Attribute visibility="private" isSpecification="false" ownerScope="classifier" xmi.id="M8XTHVzTFMBi" type="2JrrgMpWtl6M" comment="// to send to station" name="mSpecializedSciMsgId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="H9hzty6ArmoW" type="iYfdxrJ7viR4" name="mSpecializedSciMsgParametersNumber"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="a3kQqWuPiYyL" type="1PQGjZx0iexb" comment="// Specialized SCI msg header//" name="mpSpecializedSciMsgHeader"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="7yImSgiT36hm" type="QBMG0J8pDlsx" comment="// Unique string identifier for function call//" name="mFunctionName"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="genMHiwrmeFa" type="CxVwuGjKYPlO" comment="// Function parameters//" name="mListOfParameters"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="AAzsiwCnuSXK" type="FM9MFyrLE5ts" name="mpFunctionCallManager"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Q9L84AutwWTs" type="bEeZdY0xhVQw" comment="// Specialized SCI msg header//" name="mSpecializedSciMsgHeader"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7GnAKVxy9iJO" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="FunctionSciMsg"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QFGAtTk1dirM" comment="Constructor" name="FunctionSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="e17WUfrbtejB" type="FM9MFyrLE5ts" value="" name="p_function_call_manager"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7gAFMRdlgrvX" comment="Copy Constructors" name="FunctionSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LgWyMNI0POUr" type="Q7aANH0SNANP" value="" name="function_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1LQuy933oBI8" comment="Empty Destructor" name="~ FunctionSciMsg"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cutGlpn4TJ1p" comment="// public methods// /**&#xa;@return SciMsg *" name="create">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8TjbnBOLPsk0" type="hHn4fFvgbLYX"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SaaGlrPOlGeU" comment="return bool" name="dispatchMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="cPSiV3e8nSNt" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5QZWjaJOr6QV" comment="@return bool" name="identifySpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LxVnTh6aAqBv" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ML9vegQ5G0J1" comment="@return bool" name="checkCompatibility">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1XHOQzM2Oojt" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pgNax052QcX7" comment="@return bool&#xa;@param function_argument_to_add" name="addParameter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rNzcnNT6Kytm" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="CqU1xuWHEeAq" type="qj7xSczKuwTq" value="" name="function_argument_to_add"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KavaYFZOvxws" comment="@return bool&#xa;@param name_of_parameter_to_get&#xa;@param p_data" name="bindParameter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fxKnnVim2z8Q" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="x1tLbQQnGunB" type="9U1uI8HJT0Jf" value="" name="name_of_parameter_to_get"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="nHQ1vapF8lph" type="iB4yZDFSik45" value="" name="data_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="yP3tKzkFzbaa" type="ObMobD4JO6Fx" value="" name="p_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1yMFt9PeQpdM" comment="@return bool" name="identifyFunctionName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xUTLGAD7VChI" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OSZWBNB9mE14" comment="@return bool" name="identifyParameters">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Z8Os6FcjCwWy" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ClJBMrjLp5Yg" comment="@return bool" name="fillSpecializedSciMsgToSend">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PFkPCtq9LHTc" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EvKdlxx7OWdZ" name="displaySpecializedSciMsgHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tpjd1kfDTwMn" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Get the value of mSpecializedSciMsgType&#xa;@return the value of mSpecializedSciMsgType" name="getSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="RghwsNCQVaIa" type="60clcAU0xnx5"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="n66bBeFOYazJ" comment="Set the value of mSpecializedSciMsgType&#xa;@return bool&#xa;@param type the new value of mSpecializedSciMsgType" name="setSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nuJxoovD3ecD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="sZ1LVO6HUCsd" type="VwQtQ1TIoAvq" value="" name="type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="o71Mf0dBu32L" comment="Get the value of msg_id&#xa;@return the value of msg_id" name="getMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XSLqjoS8U84M" type="2JrrgMpWtl6M"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3TdrdWfV3hoZ" comment="Get the value of mSpecializedSciMsgId&#xa;@return the value of mSpecializedSciMsgId" name="getSpecializedSciMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VGm0o2aZuuXi" type="2JrrgMpWtl6M"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5uqX6gAvnAFR" comment="Increment the value of mSpecializedSciMsgId&#xa;@return bool" name="incrementSpecializedSciMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gSvh6WubwFSe" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8tc3ucMx6xnj" comment="Get the value of mSpecializedSciMsgParametersNumber&#xa;@return the value of mSpecializedSciMsgParametersNumber" name="getSpecializedSciMsgParametersNumber">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3smX0psV3cWs" type="iYfdxrJ7viR4"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RSDV712Awqh2" comment="Set the value of mSpecializedSciMsgParametersNumber&#xa;@return bool&#xa;@param number_of_parameters the new value of mSpecializedSciMsgParametersNumber" name="setSpecializedSciMsgParametersNumber">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="d4PXwwGcP9JT" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vRu1Ofio5vHD" type="WqvJ0Bi64K7w" value="" name="number_of_parameters"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xJNr93tftnwr" comment="Get the value of mpSpecializedSciMsgHeader&#xa;@return the value of mpSpecializedSciMsgHeader into a void pointer" name="returnSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fC5aPVETNyyO" type="TYfZTukOB7DK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="87xzsrqoUkoQ" comment="@return mpSpecializedSciMsgHeader" name="getSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="norrPLh2Q6ZK" type="1PQGjZx0iexb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="niGFX66yejX5" comment="@return bool&#xa;@param p_specialized_sci_msg_header the new value of mpSpecializedSciMsgHeader" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3pxQxEtaQwAq" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="rHQJ1Chovw4Q" type="bHSmNf4TkzTc" value="" name="p_specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="28MeqshR77EU" comment="Get the value of mFunctionName&#xa;@return the value of mFunctionName" name="getFunctionName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="RMHpLDB820xR" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="lIyVIR67iUQi" comment="Set the value of mFunctionName&#xa;@return bool&#xa;@param name the new value of mFunctionName" name="setFunctionName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="McTkj04koz8l" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="f6WY2Yy2fIeV" type="9U1uI8HJT0Jf" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AJwIR8kARidh" comment="Get the value of mListOfParameters&#xa;@return the value of mListOfParameters" name="getListOfParameters">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="E1LcyUSPqhCB" type="Ks2QuFd1iYTQ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7jooCCWrI0NI" comment="Set the value of mListOfParameters&#xa;@return bool&#xa;@param list_of_parameters the new value of mListOfParameters" name="setListOfParameters">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vLIvMDKgqlQX" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XJKCbwfmGZ4f" type="Ks2QuFd1iYTQ" value="" name="list_of_parameters"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iop7VSoaAaMM" comment="Get the value of mpFunctionCallManager&#xa;@return mpFunctionCallManager" name="getFunctionCallManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lSFZSNIgOcIK" type="FM9MFyrLE5ts"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mqB3rYLMreYQ" comment="Set the value of mpFunctionCallManager&#xa;@return bool&#xa;@param p_function_call_manager the new value of mpFunctionCallManager" name="setFunctionCallManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6jiwOs6HEOCY" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="aBCokETS3IZW" type="FM9MFyrLE5ts" value="" name="p_function_call_manager"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="lL6vvTFgJOj8" comment="// private methods// " name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="w2Ule0BF9O1u" name="displaySpecializedSciMsgType"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="aVKdns7WDEP7" name="displayFunctionName"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fenw2W3wWVfB" name="displayParameter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="UrOdDPXnusPg" type="DshIKK2Zspzs" value="" name="parameter_iterator"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kWAvia2LCpGD" name="displayListOfParameters"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zNLW6edynEwJ" comment="// Constructors/Destructors// /**&#xa;Constructor" name="FunctionSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Nllcddv4kGAp" type="qcb8l3xv8TRt" value="" name="p_function_call_manager"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uaklPv8vKcqs" comment="@return bool&#xa;@param name&#xa;Remove the parameter named name from the function SCI message." name="removeParameter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="bUEPDcwz4BWW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="V7by3cpHX7dc" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dTcbIRfWRszE" comment="Display the specialized SCI message type." name="displaySpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="b1E3Wr2Ck0jZ" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DXZgqHeyznqh" comment="Set the value of mSpecializedSciMsgHeader.msg_id&#xa;@return bool" name="setMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YpAvRRFVAvRW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Qlw9CrMhR0Vg" type="gFFNUwPz4TDC" value="" name="msg_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MexYW51gIxOy" comment="Set the value of mSpecializedSciMsgHeader.reserved&#xa;@return bool" name="setReserved">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="oVo0tyYTRmse" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xzPFwnDmHmTT" type="QXEg7cwSFt0l" value="" name="reserved"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3pTkKpWS9lpM" comment="@return bool&#xa;@param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OpdSy8xXv7QK" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vvV7QsAgT0Fq" type="IdrZNJ0YPvUj" value="" name="specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tttVk4P00qr6" comment="Set the value of mpFunctionCallManager&#xa;@return bool&#xa;@param p_function_call_manager the new value of mpFunctionCallManager" name="setFunctionCallManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YdpgZEDLkzLb" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YQ8uoljwth6v" type="qcb8l3xv8TRt" value="" name="p_function_call_manager"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="FBsPeH4gEvUD" xmi.id="bBGWS2FbowsE" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="nMqHFdX6fOJd" xmi.id="MJySUUa4fP54" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nMqHFdX6fOJd" comment="class ClockSciMsg" name="ClockSciMsg">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="E1EkeKXGrlqW"/>
- <UML:Generalization xmi.idref="tAhKmf7IFJ6T"/>
- <UML:Generalization xmi.idref="MJySUUa4fP54"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="rz2gkqCi9n3k" type="acFbRvXTEMIs" comment="// private attributes// // Get from specialized SCI msg header//" name="mSpecializedSciMsgType"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="FCfTYqKT5rid" type="2OUKpDmUU6Tg" name="mSpecializedSciMsgId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="01N7XprMor2W" type="PDzFlxMB73D7" name="mSpecializedSciMsgTick"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="rkydbz8GBI4B" type="10N6r5hp62ve" comment="// Specialized SCI message header//" name="mpSpecializedSciMsgHeader"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="YaNwl3ql1Drs" type="dxoHI48VOHpd" name="mpNetworkClockProcessor"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="he6wwAPcfneH" type="hCCozGYEQBhw" comment="// Specialized SCI message header//" name="mSpecializedSciMsgHeader"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JXgPZZ1RHy2s" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="ClockSciMsg"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="x866R8HxgdsP" comment="Constructor" name="ClockSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="eiAfw0VFX9c6" type="dxoHI48VOHpd" value="" name="p_network_clock_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ieVxaWnXetd3" comment="Empty Destructor" name="~ ClockSciMsg"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zt1fUt58ZDlV" comment="// public methods///**&#xa;@return SciMsg *" name="create">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vt2Mfv11icRe" type="hHn4fFvgbLYX"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DGiiOLp4xI2X" comment="@return bool" name="dispatchMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kOBdUbx0Dkhm" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="op2RhdUgUTKy" comment="@return bool" name="identifySpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xs7fpSGkJH7w" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MN4wapPm48SQ" comment="@return bool" name="checkCompatibility">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="A8xqkMUTjg6D" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RHUOYWtMMvl1" name="displaySpecializedSciMsgHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WGh1jzz4M2yv" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return mSpecializedSciMsgType" name="getSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="F2DQksChiHMX" type="acFbRvXTEMIs"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pNfrT7HuNmGv" comment="@return bool&#xa;@param type the new value of mSpecializedSciMsgType" name="setSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hbI0sPw2VrsD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="GX0dZwWNI9El" type="G9Fc21bZFJYw" value="" name="type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EWebIuUY2k92" comment="@return mSpecializedSciMsgId" name="getSpecializedSciMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EMev0j8ElJeV" type="2OUKpDmUU6Tg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jiZy17sIdrtA" comment="@return bool&#xa;@param id the new value of mSpecializedSciMsgId" name="setSpecializedSciMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ApBs6XQm8gmy" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Lm4LWBODuvBt" type="nNX5UmpiITKY" value="" name="id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="329et0ogLMkp" comment="@return mSpecializedSciMsgTick" name="getSpecializedSciMsgTick">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3h0YYqjkBOf9" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8XYOyquJcwd7" comment="@return bool&#xa;@param tick the new value of mSpecializedSciMsgTick" name="setSpecializedSciMsgTick">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="7lNq30JDnU5r" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="81K0uUrvW1ZP" type="Fls26ZE3bRdo" value="" name="tick"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zO3LklAqIgCG" comment="Get the value of mpSpecializedSciMsgHeader&#xa;@return the value of mpSpecializedSciMsgHeader into a void pointer" name="returnSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0Td89Q5C55id" type="TYfZTukOB7DK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="U6Y72BC8AW64" comment="@return mpSpecializedSciMsgHeader" name="getSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="wQM5ozEtlahm" type="10N6r5hp62ve"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yy0UzZryvtHd" comment="@return bool&#xa;@param p_specialized_sci_msg_header" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="a0zLT2CTWqZd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="osoyOv1Lt1pq" type="cSRv6d9bhfgi" value="" name="p_specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YfoSW458WX1a" comment="// private methods//" name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ABBqopYdhMb4" name="displaySpecializedSciMsgType"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dUC2E0OFnGO9" comment="// Constructors/Destructors// /**&#xa;Constructor" name="ClockSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9iM9ktxRW1LS" type="Dc4onmiEKP73" value="" name="p_network_clock_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qbGpboWVV66k" comment="Display the specialized SCI message type." name="displaySpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="g4KBqpdjbERj" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xMZbd0yv7NcB" comment="Set the value of mSpecializedSciMsgHeader.id&#xa;@return bool" name="setId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EeoJiUucuEhi" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jJshKLgEQ3MU" type="nNX5UmpiITKY" value="" name="id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nPMurd6mzdNd" comment="Set the value of mSpecializedSciMsgHeader.tick_high&#xa;@return bool" name="setTickHigh">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EvZxTGj3FiOi" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="dMWkh7tQQl5l" type="ylvhNGRUzc7S" value="" name="tick_high"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5jxTmJyXgIRX" comment="Set the value of mSpecializedSciMsgHeader.tick_low&#xa;@return bool" name="setTickLow">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kZ9EPgsdJeuz" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vXKv8fWlz2Vh" type="ylvhNGRUzc7S" value="" name="tick_low"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8APIp4mPGvIs" comment="@return bool&#xa;@param specialized_sci_msg_header" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8ob33GjH9JCd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="b60XlI8wJj7o" type="bB3bDXILtLrz" value="" name="specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="l6c6ZbY9k4oU" comment="class NetworkClockProcessor" name="NetworkClockProcessor">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="isrV4NWwNe9f"/>
- <UML:Generalization xmi.idref="bF4M7ruT7PG9"/>
- <UML:Generalization xmi.idref="UjcieFEY4Y2B"/>
- <UML:Generalization xmi.idref="Bj3lrJ1e6Oct"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="b8rzl0c6gBqq" type="PDzFlxMB73D7" comment="// private attributes// " name="mCurrentTickValue"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="0cyrqanRieOR" type="U4mQnNTnRzFr" name="mpNetworkClockEvtList"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="dzYHAM8cQs2B" type="xXbKcOH2nKjB" name="mpSciServer"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="FTzfSCWSoSIc" type="8HFYeCh1V2Tr" name="mpSystemManager"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="252jhQAIPgaZ" type="FM9MFyrLE5ts" name="mpFunctionCallManager"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="2g9RY9cmdZP3" type="QR5iQfL4cAJs" name="mpPhyProcessor"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="NnWRJWdvFfV2" type="xqe85s2v3X76" name="mpEthernet"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mvUaOmBOpD7W" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="NetworkClockProcessor"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dIn1yNYz1iOX" comment="Constructor" name="NetworkClockProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="r0HSagWMcyuy" type="xXbKcOH2nKjB" value="" name="p_sci_server"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="k5MXIU1ukotg" type="8HFYeCh1V2Tr" value="" name="p_system_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9RdA71gx2xPa" type="FM9MFyrLE5ts" value="" name="p_function_call_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="etuErmAZsW68" type="QR5iQfL4cAJs" value="" name="p_phy_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="y60gutN2JyCQ" comment="Empty Destructor" name="~ NetworkClockProcessor"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0sL0ojaScSgS" comment="// public methods// /**&#xa;@param evt_to_send&#xa;@param tick_value" name="createEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Eqz6K4DHABv2" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="5G4MFFkF56Ft" type="VcPcOcsgjQbo" value="" name="evt_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pnLPFzpTppY8" comment="@return bool&#xa;@param evt_to_insert&#xa;@param tick_value" name="insertEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Xvemb1SJaZYz" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="tjN3uI5zZ8Jo" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="N41SAEMx1hME" type="VcPcOcsgjQbo" value="" name="evt_to_insert"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hChUzDaswxtr" comment="@return bool&#xa;@param evt_to_remove&#xa;@param tick_value" name="removeEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="GOaX2UWAI7DJ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Ewon48ZRCYuK" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mEFlvbzale3k" type="VcPcOcsgjQbo" value="" name="evt_to_remove"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sbamXTblQQWS" comment="@return bool" name="processNextEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LvYUEk7jfmWE" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="W5ugdmyN0D8t" type="Fls26ZE3bRdo" value="" name="max_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="m5SYjTGZ4rMb" comment="@return bool&#xa;@param evt_to_process" name="processEvtNone">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nyYNY4KmSsJS" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="IxKgLq9rv1XW" type="j0sNksMuhVaF" value="" name="evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="lTrjgzaT40zm" comment="@return bool&#xa;@param evt_to_process" name="processEvtRemove">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="MnccsowDjUhv" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TFLW4h5LdQ1y" type="j0sNksMuhVaF" value="" name="evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="G8oA9JesnUbT" comment="@return bool&#xa;@param evt_to_process" name="processEvtStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="DnesZ85K7dfd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="RAwUAtGc9b8B" type="j0sNksMuhVaF" value="" name="evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HBWsZYqoecwo" comment="@return bool&#xa;@param evt_to_process" name="processEvtFunctionCall">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hzN7rgZBRBnJ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="wYej2EAUO5yY" type="j0sNksMuhVaF" value="" name="evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yE85nGH2Qnuz" comment="@return bool&#xa;@param evt_to_process" name="processEvtPhy">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xhWeADXN0CDX" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="JjlyLhkFGMyI" type="j0sNksMuhVaF" value="" name="evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="a9myCiVAudGg" comment="@return bool&#xa;@param evt_to_process" name="processEvtSystem">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KIrPvW0aTNhK" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="sXiGIbDaIzWb" type="j0sNksMuhVaF" value="" name="evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gGrwanFBuz76" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return Network_Clock_Tick" name="getCurrentTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1GTSQHlLwH06" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iaHcEVG42zII" comment="@return bool" name="setCurrentTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TXTRhhz0zoNt" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YVsoUOPBcE7B" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0KMsIRzy2EYE" comment="@return the value of mpNetworkClockEvtList" name="getNetworkClockEvtList">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LOTmjB5jPYBn" type="U4mQnNTnRzFr"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jpGjoYzK3q8Y" comment="// private methods// /**&#xa;@return bool&#xa;@param clock_sci_msg_to_send" name="sendEvtMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pv9kA7qbeI3K" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jXLljtzQgD7U" type="CVhnimyi5KYN" value="" name="clock_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="l7mpxsL7M0u4" name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mskrAICuoXdX" name="registerClockSciMsg"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="k1SNpgCZzaNa" comment="Constructor" name="NetworkClockProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="IFkE9EFwcjoP" type="T3wGzLaOdJRi" value="" name="p_sci_server"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TpRpLfW3fyPU" type="TXhtlZjMAp7C" value="" name="p_system_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="fb4c9PAPesen" type="qcb8l3xv8TRt" value="" name="p_function_call_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="6rhibV64JVrc" type="DEOmV9sHIiVw" value="" name="p_phy_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4BuOJTKhEo6V" comment="Constructor" name="NetworkClockProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LhRYMwY1QEPV" type="T3wGzLaOdJRi" value="" name="p_sci_server"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="gFMKi2OmBI8V" type="TXhtlZjMAp7C" value="" name="p_system_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mQAyFGUYwv6I" type="qcb8l3xv8TRt" value="" name="p_function_call_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="reHGrhjXu5rc" type="DEOmV9sHIiVw" value="" name="p_phy_processor"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="7DNGWTjGurE9" type="xqe85s2v3X76" value="" name="p_ethernet"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ADkV7ZCp3CBi" comment="@return bool&#xa;@param station_id" name="removeEvts">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="x0Kwohn73Hun" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qbpjm36Rcm5I" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nQj9T8nxc6e2" comment="Processes an event of type ETHERNET.&#xa;@param evt_to_process&#xa;@return bool" name="processEvtEthernet">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="QxUnVfbJYk3j" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="GRO5b0lX0afE" type="j0sNksMuhVaF" value="" name="evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zbFi79sfdIB2" comment="Gets a pointer to the PHY processor.&#xa;@return IPhy *" name="getPhy">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="prKT9Ll6J516" type="DEOmV9sHIiVw"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NdFZJkiRSf4s" comment="Gets a pointer to Ethernet.&#xa;@return mpEthernet" name="getEthernet">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="loDm35XR21FW" type="xqe85s2v3X76"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="l6c6ZbY9k4oU" xmi.id="Bj3lrJ1e6Oct" parent="pdUJAVtJe39T" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kooC0I8IkF1k" xmi.id="QIT8Cyxljy5W" parent="KqJ8bZTEut0O" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Kd2vdgexbsmt" xmi.id="f7qcLRlLp3d5" parent="dBvvR3kpanaF" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="uHdgUvjiSZG6" xmi.id="hv5BD8rH260N" parent="Kd2vdgexbsmt" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uHdgUvjiSZG6" comment="PhySciMsgFc.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/phy/inc/PhySciMsgFc.h&#xa;//**&#xa;class PhySciMsgFc" name="PhySciMsgFc">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="XhEs3csvqUn6"/>
- <UML:Generalization xmi.idref="2HEQAGupXJCO"/>
- <UML:Generalization xmi.idref="NkEF2MRQX3KN"/>
- <UML:Generalization xmi.idref="hv5BD8rH260N"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Yyh5FtRuHHXU" type="4F2mG2WvecbT" comment="// private attributes// " name="mFc10"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="gMWpiyFzxNga" type="4F2mG2WvecbT" name="mFcAvArray"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qlEY5IQdG7gV" comment="// Constructors/Destructors// /**&#xa;Constructor&#xa;Creates a PHY message of type FC_HYBRID_MODE or FC_AV_ONLY_MODE.&#xa;@param p_phy_processor a pointer to the PHY interface" name="PhySciMsgFc">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="y6PENvi1HCqz" type="DEOmV9sHIiVw" value="" name="p_phy_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="83x5QdeEMsmS" comment="Empty Destructor" name="~ PhySciMsgFc"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AA3OFitDoHPB" comment="// public methods// /**&#xa;Sets the PHY SCI message class attributes before transmission,&#xa;and fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type FC_AV_ONLY_MODE or FC_HYBRID_MODE.&#xa;@param clock_id ID of the Network Clock event received message&#xa;@return bool" name="prepare">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fopDWsuLjDmr" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="C7CRJ0PQ3KVR" type="2OUKpDmUU6Tg" value="" name="clock_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="v7fHzPj7ZlVo" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Gets the Frame Control 1.0.&#xa;@return mFc10" name="getFc10">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YYxqbwwMl77m" type="ylvhNGRUzc7S"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TNzFePOoUYDm" comment="Sets the Frame Control 1.0.&#xa;@param fc_10 the new value of mFc10&#xa;@return bool" name="setFc10">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BeCBeRhJDWWj" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YcCZwfyrnb9k" type="ylvhNGRUzc7S" value="" name="fc_10"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0qsXZLJ0gGFK" comment="Gets the Frame Control AV.&#xa;@return mFcAvArray" name="getFcAv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OR46cqx8Msyy" type="t2asNnHh8wsl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fd68BKuhu4Er" comment="Sets the Frame Control AV.&#xa;@param fc_av the new value of mFcAvArray&#xa;@return bool" name="setFcAv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="puIY2PKD2WOg" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="hAgUlnFjc5GB" type="ylvhNGRUzc7S" value="" name="fc_av[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OXC5oPNR3SZC" comment="// private methods// /**&#xa;Initializes the PHY SCI message class attributes.&#xa;Fills PHY SCI message type." name="initAttributes"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="gjYrACSC9BuB" xmi.id="LDY16XoozXTL" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="vSu5lsg0a7WJ" xmi.id="8YLQXRKCCIRS" parent="Kd2vdgexbsmt" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="emjq7Xks8DWW" xmi.id="38CRTOHxlKYx" parent="Kd2vdgexbsmt" name=""/>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CWGE8DVJYvei" name="DestStationsList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ElUvZ3tKAVPh" comment="class SciServer" name="SciServer">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="XIEfe2iXktPm"/>
- <UML:Generalization xmi.idref="IAY38dzMqpYq"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="pVfTLcQeTxif" type="QBMG0J8pDlsx" comment="// private attributes// " name="mStationLog"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="qRmZG8r3bVXu" type="s715so7RcDV9" name="mpSpecializedSciMsgArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="7vWZtDEjIDoA" type="DshIKK2Zspzs" name="mArraySize"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="ogt6tgErZqSi" type="cKqCpL4vHbUA" name="mpListOfStations"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="vCeSg7DHR3TF" type="PDzFlxMB73D7" name="mNetworkClockTick"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PXAg6cosGfw7" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="SciServer"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JBzt1RZxbDNH" comment="Copy Constructor" name="SciServer">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="hQUx4Q2Nb1Gd" type="KaWkbzz0V7eb" value="" name=""/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QqY13tHMTn64" comment="Empty Destructor" name="~ SciServer"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="l33GAhrr6JmA" comment="// public methods// /**&#xa;@return bool&#xa;@param station_log_file " name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="v6z8aTpxsr3U" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="koVJomuEcSEd" type="9U1uI8HJT0Jf" value="" name="station_log"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LVxmG1r14uHE" comment="@return bool " name="process">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iyd4qb0fUJBW" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Z73dQnn8aHSO" comment="@return bool&#xa;@param sci_msg_to_send" name="fillSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iUhky3Qu7N0i" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="BiZGapS7wUlK" type="3McdnqE6JCta" value="" name="sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HWTpntDqDoR0" comment="@return bool&#xa;@param sci_msg_to_send" name="sendSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rofjfgELepOS" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="cg5wqwU1c3FC" type="xSzXJBSHo8yn" value="" name="sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="siJmA25RZYHK" comment="@return bool&#xa;@param sci_msg_to_send" name="sendSciMsgToAllActiveStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OO6shHMQl38k" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="PS9cGabtEgn4" type="3McdnqE6JCta" value="" name="sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cH4EIJO9zft9" comment="Set a value into mpSpecializedSciMsgArray&#xa;@return bool&#xa;@param sci_msg_type the array position to set&#xa;@param sci_msg the new value of mpSpecializedSciMsgArray[sci_msg_type]" name="registerSpecializedSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5XcCucsjOVT4" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="iyZFUoZtGiWV" type="EknMLJBAPpgo" value="" name="sci_msg_type"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="J7OVl9aNOcZe" type="hHn4fFvgbLYX" value="" name="sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vvnvaf4IdbV8" comment="@return bool&#xa;@param header&#xa;@param data_length&#xa;@param received_data" name="receiveMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BfPnSnGqCMjt" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="P51gnV94aXaL" type="erAlIci9mSIq" value="" name="header"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="e8g2kFgf8SYj" type="qtOabrV06r8H" value="" name="data_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="7bziCVqcYqGL" type="Z3mduvueNb9d" value="" name="received_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JPOuuyFW6wYo" name="displaySpecializedSciMsgArray"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9CRGc0zjZwQl" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return StationsList *" name="getStationsList">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="d5HN7O7CvjOn" type="cKqCpL4vHbUA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PELx2ZHMwfGq" comment="@return bool&#xa;@param p_list_of_stations" name="setStationsList">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JFXik0mudBh5" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="bTKfNsTX3unf" type="cKqCpL4vHbUA" value="" name="p_list_of_stations"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="skNRenB21Uz4" comment="Get the value of mArraySize&#xa;@return the value of mArraySize" name="getArraySize">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xvv9Fe0riGEp" type="DshIKK2Zspzs"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4EOytcnS577T" comment="Get the value of mpSpecializedSciMsgArray&#xa;@return the value of mpSpecializedSciMsgArray" name="getSpecializedSciMsgArray">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="eL1Z2NMLcr1N" type="s715so7RcDV9"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0Yy1RjgJT1j5" comment="@return bool&#xa;@param current_tick_value" name="updateTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rnFSxwXuqR15" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="os7oM7qOJENB" type="Fls26ZE3bRdo" value="" name="current_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="q8dtFjMDHKEi" comment="@return Network_Clock_Tick" name="getNetworkClockTick">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3zulF8atRZQT" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3t0UujajbhVv" comment="// private methods// " name="log">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vlnXcosSc7uX" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mLI6XdFNlsG0" comment="@return bool&#xa;@param type&#xa;@param received_sci_msg" name="createSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="2SPqtOvuNqgd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZbErtSZvJZPE" type="EknMLJBAPpgo" value="" name="type"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="GxvpfQlPj1TG" type="s715so7RcDV9" value="" name="received_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eibPZrP8QbxK" comment="@return bool&#xa;@param msg_header&#xa;@param data_length&#xa;@param remaining_data&#xa;@param received_sci_msg" name="fillSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="wEUOovrjeeEG" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2XFL4cZJaU8D" type="erAlIci9mSIq" value="" name="msg_header"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="srcbs4rUkStH" type="qtOabrV06r8H" value="" name="data_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="IHQgqN0ssDEv" type="Z3mduvueNb9d" value="" name="received_data"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qlEQEKb6ABi0" type="s715so7RcDV9" value="" name="created_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FXVyyOFEdfuU" comment="@return bool&#xa;@param received_sci_msg" name="processSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="R5g3CbYC1x2s" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1vMr6YmwIyKW" type="hHn4fFvgbLYX" value="" name="received_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HtaR5IRIowGm" name="displaySciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JwmgkSHghm4T" type="QBMG0J8pDlsx"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="JW0wBuQAnl2u" type="8RfL5UmYopms" value="" name="sci_msg_type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HmoZj7300eR5" name="displayStatus"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uqOineU68U0I" name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NPSAAS2PFpzy" comment="// private attribute accessor methods// /**&#xa;@return std::string" name="getStationLog">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fuAJWOXxTEye" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zHkGrUnn4Onb" comment="@return bool&#xa;@param sci_msg_to_send&#xa;@param " name="sendSciMsgToDestStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pUqoPrginSPX" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vWLFcfRpmPBn" type="3McdnqE6JCta" value="" name="sci_msg_to_send"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="H2iKwatvpd9g" type="eqNqcEputAw7" value="" name="list_of_dest_stations"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="ElUvZ3tKAVPh" xmi.id="IAY38dzMqpYq" parent="PKaM1HoCDbbs" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0vcc95kxWWVn" name="StationsList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OvNqoCObl8CH" comment="StationConfiguration.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/system/inc/StationConfiguration.h&#xa;//**&#xa;class StationConfiguration" name="StationConfiguration">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="wv2nq1dXlwOr" type="tn89GJwm2DQU" comment="// private attributes// " name="mCcoCapability"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="JZxkV8It3gis" type="XmVg46uC4n8q" name="mBridgeCapability"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="q4RZCeq8XqtN" type="BEIun6kQm0UQ" name="mHomeplugVersion"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="rWtaRFRioORJ" type="bJtzCEyKnKFK" name="mDeviceAccessKey"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="bai6gzkJrv6v" type="QBMG0J8pDlsx" comment="// private attributes// " name="mStationExecutable"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="3xtAgo722W76" type="QBMG0J8pDlsx" name="mStationName"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VhAYNsOBwok8" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="StationConfiguration"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QaEvR8JGeAp3" comment="Constructor" name="StationConfiguration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="PGmBdBU8sceE" type="bJtzCEyKnKFK" value="" name="device_access_key"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="V3PPpAYFimA7" type="tn89GJwm2DQU" value="" name="cco_capability"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="uRMXZBYyRK74" type="XmVg46uC4n8q" value="" name="bridge_capability"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TZAMCpafsz4f" type="BEIun6kQm0UQ" value="" name="homeplug_version"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9cuqN4xFUJk3" comment="Empty Destructor" name="~ StationConfiguration"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UJ0ub7w5f7Rr" comment="// public methods// // public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return bool&#xa;@param cco_capability" name="setCcoCapability">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tgBYQG1589Mc" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LtlpBWtdprXQ" type="w1WmyaR6BJwY" value="" name="cco_capability"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wSTbZuSTtwFq" comment="@return bool&#xa;@param bridge_capability" name="setBridgeCapability">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Xuaz6Wbt1RhQ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TzWGq1hkTAM0" type="VewgxsCIjx8s" value="" name="bridge_capability"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3mTujgkCKgsH" comment="@return bool&#xa;@param homeplug_version" name="setHomeplugVersion">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="GL93nWYeAkCb" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="aOD1XX0aKTU1" type="W4aE1i6TfajT" value="" name="homeplug_version"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ADDSt3kO7Kc6" comment="@return bool&#xa;@param device_access_key" name="setDeviceAccessKey">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="yBe4K1gqtGnz" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="rmk9EDAOQLoH" type="0gZfFH6nfJoC" value="" name="device_access_key"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OYfTsHZqw9TB" comment="// private methods// " name="initAttributes"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3jUGUiy3Ig9w" comment="// Constructors/Destructors// /**&#xa;Constructor" name="StationConfiguration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="6x8a4CdlguDO" type="drESmKOpFHzv" value="" name="station_executable"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="sHeXOZ8Gnb25" type="QBMG0J8pDlsx" value="" name="station_name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Z6vG07cqOFLm" comment="// public methods// // public attribute accessor methods// // private attribute accessor methods// /**&#xa;Set the station executable.&#xa;@param station_executable the new value of mStationExecutable" name="setStationExecutable">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lOqmnXC4sJ5d" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="oS0Z33c0tuEi" type="trv86yL4jfeS" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7VcDt5NQBGg9" comment="Get the station executable.&#xa;@return mStationExecutable" name="getStationExecutable">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pcI0MSZIeDMw" type="trv86yL4jfeS"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NHzjWJUIlUrm" comment="Set the station name.&#xa;@param station_name the new vale of mStationName" name="setStationName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="E2k5HX42vsoj" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="VTmOLy7SRhdI" type="trv86yL4jfeS" value="" name="station_name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kyjvEN4ae2H8" comment="Get the station name.&#xa;@return mStationName" name="getStationName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PynFGqr5S73m" type="trv86yL4jfeS"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="G1jpotlnS9ne" comment="class Station" name="Station">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="QZy3tkEiVyrj" type="WO0VJglkKJD1" comment="// private attributes// " name="mInputPipe"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="9z5XItpgSU9I" type="WO0VJglkKJD1" name="mOutputPipe"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="kg9gnapBAlF1" type="WO0VJglkKJD1" name="mLogPipe"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="gvR6OYO8EVm2" type="TTjyPYhZVm6n" name="mPid"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="6bDEKSFntwmJ" type="zczAjgq81yYh" name="mStationStatus"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="URqzCwkqqBwC" type="qzlFUs4gsJKl" name="mStationIdleCounter"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="bJkVFWmhwce8" type="jIKxm4xqfB4z" name="mpStationConfiguration"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="WBTxq6Gb2zWH" type="WO0VJglkKJD1" comment="// private attributes// " name="mInputFileDescriptor"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="MZpzb47soYu0" type="WO0VJglkKJD1" name="mOutputFileDescriptor"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WOyKZsWGAoBu" comment="// Constructors/Destructors// /**&#xa;Empty Constructor&#xa;//**&#xa;Constructor" name="Station">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="s9kVKoSt5DOI" type="QBMG0J8pDlsx" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hAxdkbjHzfbW" comment="Empty Destructor" name="~ Station"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="X8kguwan5LGN" comment="// public methods// " name="operator ==">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Zc4BqO62Rq8g" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="0wnycOS7UDnP" type="7jGBwdRbnPDW" value="" name="station"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7OAAjQXo9lz3" name="operator =">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OAiH1U0QQleg" type="nBSGMFfRdnbK"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ORdAoqgmkRiM" type="7jGBwdRbnPDW" value="" name="station"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="D69Lp6MCVzMJ" comment="@return void" name="displayStation"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="n06YPmsCvKSH" name="launchDebugger">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="aTk2anp7OrJC" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="a5gBsFW4LfN9" type="9U1uI8HJT0Jf" value="" name="command_line"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="lhLFffYSdcy2" type="9U1uI8HJT0Jf" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PrEK9hahkEtd" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return Sci_Station_Id" name="getStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="GNCfDKJZT1pU" type="dsRw8nRMsxE8"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UPfn20wlhH0M" comment="@return pid_t" name="getPid">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TnsrXUY7xI9X" type="wZnZ9lZYcork"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TPRDdKo7jTvj" comment="@return bool&#xa;@param input_file_descriptor" name="setInputFileDescriptor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3wfRmwb0HodS" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="28gewXONuobY" type="TrV97VV12IZA" value="" name="input_file_descriptor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8PfqrYZIO4RV" comment="@return bool&#xa;@param output_file_descriptor" name="setOutputFileDescriptor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6w0Xvp1OcsF9" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YvUYB3iDCNq6" type="TrV97VV12IZA" value="" name="output_file_descriptor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uCUp03L9S0zH" comment="@return bool&#xa;@param log_file_descriptor" name="setLogFileDescriptor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KlGI1On5IQU4" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZYaxb1Q9wuf8" type="TrV97VV12IZA" value="" name="log_file_descriptor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wML8jBCbMeOM" comment="@return File_Descriptor" name="getInputFileDescriptor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="K62bsf4yb4WU" type="TrV97VV12IZA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hjV8iSPH1zCc" comment="@return File_Descriptor" name="getOutputFileDescriptor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rVsTL6bgrpyr" type="TrV97VV12IZA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zajvUM1OiNWR" comment="@return File_Descriptor" name="getLogFileDescriptor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BjwUAOWUSX4K" type="TrV97VV12IZA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Wh1sJPDz9i7r" comment="@return Station_Status" name="getStationStatus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="C8JmApG1I7Se" type="zczAjgq81yYh"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BU6ASGkRqRKI" comment="@return bool&#xa;@param status" name="setStationStatus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="B3K0rGr2zlU7" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="KH9TxEI6gOE8" type="nMhUhBvBqw4A" value="" name="status"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cyXQNsgBCLft" comment="@return mStationIdleCounter" name="getStationIdleCounter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AzacWexgkEQs" type="qZLXuibBNXID"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VY2LT6TnLaEH" comment="@return bool" name="incrementStationIdleCounter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1frJmJxvLFtA" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oWNVsabSY9sw" comment="@return bool" name="decrementStationIdleCounter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VlCTUfYee8FA" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zY5Bsi2NG4gh" comment="@return bool&#xa;@param station_configuration" name="setStationConfiguration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kAoSMFKNu9ge" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9AUSkgjXC522" type="jIKxm4xqfB4z" value="" name="configuration"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dbUBkK5jrAsj" comment="@return StationConfiguration" name="getStationConfiguration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TcZmpSwJB6mg" type="jIKxm4xqfB4z"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="su67xmo4uHWf" comment="// private methods// /**&#xa;@return void" name="startProcess">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xEA8HAAuld3W" type="9U1uI8HJT0Jf" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="x9DoH6XAybFv" comment="@return void" name="stopProcess"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="M3zGIUtGi3Mx" name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DWrz7uT51grJ" name="displayStationStatus"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nihWGnXmwzjn" comment="// Constructors/Destructors// /**&#xa;Constructor" name="Station">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3xO6wsNHPAG0" type="trv86yL4jfeS" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="lYt1WmvcoWrL" name="launchDebugger">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lIIPPVX9fMaz" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="wBCWlpMtCht9" type="trv86yL4jfeS" value="" name="command_line"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="J5fMAZjBuuSy" comment="@return bool&#xa;@param station_name the new value of mpStationConfiguration->mStationName" name="setStationName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="buMT417VbeHQ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="czuXNqMBxXIM" type="trv86yL4jfeS" value="" name="station_name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oRuH6AKNExiO" comment="// private methods// /**&#xa;@return void" name="startProcess"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bBWfkvMSUBzc" comment="class SystemManager" name="SystemManager">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="4QEmSahd4YcC"/>
- <UML:Generalization xmi.idref="SqtM7IeD47EL"/>
- <UML:Generalization xmi.idref="61wWSqWN4OPC"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="HtfMPGWnHlFz" type="0vcc95kxWWVn" comment="// private attributes// " name="mListOfStations"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="nwSF6dZuRDQn" type="xXbKcOH2nKjB" name="mpSciServer"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="NvFxdPxsIcEf" type="QBMG0J8pDlsx" name="mStationExecutable"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="qiT8Tg7FdZSj" type="QBMG0J8pDlsx" name="mDebugger"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="vfgxkuIaTgbH" type="QBMG0J8pDlsx" name="mDefaultStationExecutable"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="OoUldHki4oSH" type="Dc4onmiEKP73" name="mpNetworkClock"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="B1eaE4OZxbUY" comment="// Constructors/Destructors// /**&#xa;Constructor" name="SystemManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1RRJ2dxqMQyn" type="xXbKcOH2nKjB" value="" name="sci_server"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="642hbURmV3Ni" comment="Empty Destructor" name="~ SystemManager"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5jF2KkZLB0dB" comment="// public methods// /**&#xa;@return Sci_Msg_Station_Id" name="createStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6BjGHTw3kCQ9" type="uNcSkNqyAxHb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ba2x0yl42lme" comment="Indicate the station executable to run when creating a station&#xa;@return bool&#xa;@param station_executable the new value of mStationExecutable" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iyILIsLrlhKn" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="EBOjElPHUfJn" type="9U1uI8HJT0Jf" value="" name="station_executable"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Nq8WqliSJkNH" type="9U1uI8HJT0Jf" value="" name="debugger"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="i6Mjs6N6FjnR" comment="@return bool&#xa;@param system_sci_msg" name="receiveIdleMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gRGH5Vg9gPPx" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="aP6u7UBoaVVQ" type="VBixqziBqrhe" value="" name="system_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bqWoZIF4Tx0H" comment="@return bool&#xa;@param station_id" name="removeStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rJybWPkCN0Xd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xiSlX9P8XW2c" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yBOWhtxIjR7J" comment="@return bool" name="removeAllStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rsUaaoLGDbWG" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jKLCIJRD0tyX" comment="@return bool&#xa;@param station_id" name="deactivateStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6CNkZlhQ4gzY" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1NdWrd8ppVKW" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OFm6erNMCiWU" comment="@return bool&#xa;@param station_id" name="activateStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3hkOgI1X8T5g" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="0yfyrdVsy7Oq" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kVdX0x3MAqSp" comment="@return bool&#xa;@param station_id" name="debugStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="FQvS1Rg5d3pC" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="hpBrWhLUfySV" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bvLa2iQlD1IB" comment="@return bool" name="isStationIdle">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="oUbrAYPDE8bu" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="zMX9Aywpl7hH" type="uNcSkNqyAxHb" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="n0jQzBvY7H67" comment="@return bool" name="areAllActiveStationsIdle">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OaPW3UDIu8iv" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zWsAYBJVVqcd" comment="@return Station_Status&#xa;@param station_id" name="getStationStatus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XOyASnKEHt5Q" type="zczAjgq81yYh"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mZSYe7nP8Xq5" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gldn0ktxEl5k" comment="@return bool&#xa;@param station_id&#xa;@param new_status" name="updateStationStatus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="STbeZBYxlxRp" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="uODNDo0zLRXz" type="dsRw8nRMsxE8" value="" name="station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YJNeqDjUwLIx" type="nMhUhBvBqw4A" value="" name="new_status"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3BuFu0ypMBCZ" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Get the value of mListOfStations&#xa;@return the value of mListOfStations" name="getListOfStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Pe5JkoCHCAPc" type="cKqCpL4vHbUA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zBZIc4IANfpB" comment="@return mStationExecutable" name="getStationExecutable">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vkrCbua1NCfw" type="9U1uI8HJT0Jf"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qWgmpwjq5c4z" comment="// private methods// " name="displayListOfStations"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="a2mwBxU983Rk" name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5hsTKfcACGxz" name="registerSystemSciMsg"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AeoFEsDouzj3" name="findStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NDr68JvVvzog" type="INoSbjQmME1a"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="uDC2EekJJdke" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6CP0C634JE7V" comment="@return mDebugger" name="getDebugger">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nyvx6La13PCc" type="9U1uI8HJT0Jf"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MAwjmvEfZsaJ" comment="// Constructors/Destructors// /**&#xa;Constructor" name="SystemManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ksuDWVUvJxgu" type="T3wGzLaOdJRi" value="" name="p_sci_server"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LVYuN9B8z5JW" comment="// public methods// /**&#xa;Indicate the default station executable to run when creating a station&#xa;@return bool&#xa;@param default_station_executable the new value of mDefaultStationExecutable&#xa;@param debugger the new value of mDebugger" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="HmefwJZJVPQb" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YoPpj3hxSHCf" type="trv86yL4jfeS" value="" name="default_station_executable"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="IjCQ9ULUxuML" type="trv86yL4jfeS" value="" name="debugger"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1XR0bkU9WtxF" comment="@return Sci_Msg_Station_Id" name="createStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iJ7dGtH3sB1y" type="uNcSkNqyAxHb"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="veBNuN0A4CaD" type="trv86yL4jfeS" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="prxjViUQjhSS" comment="@return bool&#xa;@param p_network_clock the new value of mpNetworkClock" name="setNetworkClock">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="UZyXwA9Dulqr" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XLg15bvnbtDo" type="Dc4onmiEKP73" value="" name="p_network_clock"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ym0h8ycxnZgI" comment="@return mDefaultStationExecutable" name="getDefaultStationExecutable">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5O8YnW9VoE64" type="trv86yL4jfeS"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="F8izq8PLR5MW" comment="@return bool&#xa;@param station_id the station ID&#xa;@param station_name the new value of the station name" name="setStationName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8M6yX5w1csWY" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="gGHH7T36F3lN" type="dsRw8nRMsxE8" value="" name="station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1LJmvz488l7w" type="trv86yL4jfeS" value="" name="station_name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dPfz7KV2Nze1" comment="@return a pointer to Network Clock Processor" name="getNetworkClock">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0djvPakSyq0l" type="Dc4onmiEKP73"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="bBWfkvMSUBzc" xmi.id="61wWSqWN4OPC" parent="0dybVkdpO4Ya" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kNRjwgcIhcX0" comment="class SystemSciMsg" name="SystemSciMsg">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="qpo9SZnjuaBV"/>
- <UML:Generalization xmi.idref="kZodzZdOFIKk"/>
- <UML:Generalization xmi.idref="F8kIYwpMZuWF"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="oumiUxElXTPK" type="yD8lVM51i3U1" comment="// private attributes// // For specialized SCI msg header//" name="mSpecializedSciMsgType"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="fGGAifVQGjcS" type="II4tXBwM3i4V" comment="// Specialized SCI msg header//" name="mpSpecializedSciMsgHeader"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="mQLltAsASv30" type="8HFYeCh1V2Tr" name="mpSystemManager"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="5xgKFy2bIrWG" type="idECE5nt0Vr7" comment="// Specialized SCI msg header//" name="mSpecializedSciMsgHeader"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4zK7hMcKdqVL" comment="// Constructors/Destructors// /**&#xa;Constructor" name="SystemSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="UylkfMDRkWCb" type="8HFYeCh1V2Tr" value="" name="p_system_manager"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="h3l7wm70lP5Q" comment="Empty Destructor" name="~ SystemSciMsg"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mfjNVCizARin" comment="// public methods// /**&#xa;@return SciMsg *" name="create">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="N7E9MIBSeHQ9" type="hHn4fFvgbLYX"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ltCTNP54QqCM" comment="@return bool" name="dispatchMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KK8wDeSDIC6f" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dHKMfPlR2SoX" comment="@return bool" name="identifySpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="mq7kh5T2Ch9W" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eUVmtBXf2j6P" comment="@return bool" name="checkCompatibility">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zKycaOlsjupw" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6BSW0cqbrAxW" name="displaySpecializedSciMsgHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="XgxZ8j5kDYW5" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return mSpecializedSciMsgType" name="getSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WH7mTERF4Wxj" type="yD8lVM51i3U1"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="h3ijno6r0YO0" comment="@return bool&#xa;@param type the new value of mSpecializedSciMsgType" name="setSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="bQjm5qI39Hfj" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9V2L1YQia6PL" type="8Eb0NWUsBQSJ" value="" name="type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uVCs2Ys8lR88" comment="Get the value of mpSpecializedSciMsgHeader&#xa;@return the value of mpSpecializedSciMsgHeader into a void pointer" name="returnSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fObMGOIngQZ7" type="TYfZTukOB7DK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wb071QOAvQTw" comment="@return mpSpecializedSciMsgHeader" name="getSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ezLgVGO5h7rk" type="II4tXBwM3i4V"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xrcVx1qqV0iX" comment="@return bool&#xa;@param p_specialized_sci_msg_header the new value of mpSpecializedSciMsgHeader" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="y7l7OOo2nNO3" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="pOWkm0fjpFEn" type="ZZfK0mQuNQ1O" value="" name="p_specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="H2dm1JHasusr" comment="// private methods//" name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gIl1gnNV9uEv" name="displaySpecializedSciMsgType"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RrpOsLQDNVtL" comment="// Constructors/Destructors// /**&#xa;Constructor" name="SystemSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Fb6V7QnCOSVb" type="TXhtlZjMAp7C" value="" name="p_system_manager"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="82E8dP9eMOkB" comment="Display the specialized SCI message type." name="displaySpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="QyHvUzPptERC" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dv4eGrk78MU4" comment="@return bool&#xa;@param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kfoO3OVfLoLo" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Loi7utuFnjWz" type="MvpHChZ2rJOW" value="" name="specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kNRjwgcIhcX0" xmi.id="F8kIYwpMZuWF" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pkwx1nQd15WY" name="runtime_error"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="Awyu6tX5fqlW" xmi.id="eRWRUKUohuHk" parent="pkwx1nQd15WY" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kzdjBd3ATyt6" comment="// Constants defining the six different importance levels of the log messages" name="Logger">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="nKss3o39Z3mH" type="UOc7OI8LRuFv" comment="// Current log level" name="mLogLevel"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="hAaBJZSsONVc" type="UOc7OI8LRuFv" comment="// Level of message (as set by operator)" name="mMsgLevel"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="pkjdKJy5coyd" type="PDzFlxMB73D7" name="mCurrentTickValue"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="im0mz7VTwqde" comment="// Constructors:/**&#xa;Empty Constructor&#xa;Logs to cout, log level LOG_DEBUG" name="Logger"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pKyAH6gz5KiE" comment="Constructor&#xa;Logs to cout, log level specified" name="Logger">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vmPOkGSQ2TCz" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ahQVV19KM6Sd" comment="Constructor&#xa;Logs to a specified stream, log level specified" name="Logger">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="6DD6gN6F2UkX" type="C9cGTLSO5pln" value="" name="log_file"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="WrrqvJT6Q3Kr" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MmERazCgANkp" comment="Empty Destructor" name="~ Logger"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ko4mJmHnb6dV" comment="Operator to set the level of a message" name="operator ( )">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5htkpiUloGqA" type="r4r1RcqCQswh"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Q6bo7vgUfutD" type="UOc7OI8LRuFv" value="" name="msg_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="friend" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eEUEK7jiBIVH" comment="Operator to pass the message to the stream" name="operator &lt;&lt;">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ecCPxZRhCF5F" type="ViIuaCbFO4Rh"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9ANLSsad1JR4" type="ViIuaCbFO4Rh" value="" name="os"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="6KJVOkAXsXqK" type="vTwaNogqWwk6" value="" name="logger"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OQvPjNSdoMD9" comment="Function to set the stream" name="setLogFile">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Atygnglt04OO" type="C9cGTLSO5pln" value="" name="log_file"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nYuf4k0S9tps" comment="Functions to get and set the log level" name="getLogLevel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="dZswNDlSteCi" type="UOc7OI8LRuFv"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EFV3cgAkX8PK" name="setLogLevel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="pAEnEaA174hB" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mfbvYQongHoG" comment="Functions to get and set the msg level" name="getMsgLevel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LhR9vFJXrUxm" type="UOc7OI8LRuFv"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wy0T5PosZ0fm" name="setMsgLevel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="anlhrQqe5RZc" type="UOc7OI8LRuFv" value="" name="msg_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qLNWbBkV7iyA" comment="@return Network_Clock_Tick" name="getCurrentTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1OUDdZQF6I9U" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8k2fkgPJT90J" comment="@return bool&#xa;@param current_tick_value" name="updateTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TuwMX92qoRzh" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZrxfGUF6ocaN" type="Fls26ZE3bRdo" value="" name="current_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kooC0I8IkF1k" xmi.id="QZAIkvPSXwgX" parent="KqJ8bZTEut0O" name=""/>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bxyfX2FkfHc6" name="EvtsList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="khBqlcIjqaYa" comment="class NetworkClockEvtList" name="NetworkClockEvtList">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="FQVDxYEWTCA1" type="bxyfX2FkfHc6" comment="// private attributes// " name="mListOfEvts"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FNlsdNwN57Bo" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="NetworkClockEvtList"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jTXY358GUbUP" comment="Empty Destructor" name="~ NetworkClockEvtList"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9ivbs5c5RLy4" comment="// public methods// /**&#xa;@return bool&#xa;@param tick_value&#xa;@param evt_to_insert" name="insertElement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gGEVi9IjVku7" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="juPm0aaj15H2" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="8NIcyk16QvhJ" type="VcPcOcsgjQbo" value="" name="evt_to_insert"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yHOPcKTLFq7F" comment="@return bool&#xa;@param evt_to_remove" name="removeElement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="HKKOaTs4OmOt" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="QfwRkCRrZiTW" type="VcPcOcsgjQbo" value="" name="evt_to_remove"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="STarMHAKWYi8" comment="@return bool&#xa;@param tick_value&#xa;@param evt_to_remove" name="removeElement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vRjhqiOXwb0f" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="t9S60XJQDFqv" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="PFmxxETQf1H1" type="VcPcOcsgjQbo" value="" name="evt_to_remove"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="GPJmv1uoBMsB" comment="@return bool&#xa;@param evt_to_add" name="addElement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iGMEyHJGZdeA" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="u9Z5NNymdlja" type="VcPcOcsgjQbo" value="" name="evt_to_add"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="w6pFoDutXMZa" name="displayListOfEvts"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Wpaq08JPHCMI" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Set the value of mListOfEvts&#xa;@param list_of_evts the new value of mListOfEvts" name="setListOfEvts">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6UCSGaLAz4pq" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xioU3N2ZAaNB" type="HrAPc4wZ9mox" value="" name="list_of_evts"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="igYzrsF8jPVL" comment="Get the value of mListOfEvts&#xa;@return the value of mListOfEvts" name="getListOfEvts">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kELfnJIVYejW" type="HrAPc4wZ9mox"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SSsbEeW9LIdO" comment="// private methods// " name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fdvnDIwvwUsn" name="displayListOfEvts">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="M7t3VNNxpDW1" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="s0ADIlbxMUiZ" comment="Remove elements whose key equals the input tick value &#xa;@return bool&#xa;@param tick_value" name="removePreviousElements">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="v2mTdObiqnA5" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mfSi9KUURLVw" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qa8yLazS9pRI" comment="@return bool&#xa;@param station_id" name="removeElement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LUFJW47FGSu3" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qYkPuskggpuw" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WFgAavh42rB6" comment="@return bool&#xa;@param next_evt_to_process" name="getNextElement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="jCXHoEokFYBs" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="BI6hmaso5PUg" type="u6I3QBCIKjNh" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Exi59oEPtvBT" type="eFtlt57PInXt" value="" name="p_next_evt_to_process"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Kd2vdgexbsmt" comment="class PhySciMsg" name="PhySciMsg">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="kW8FuRBYKjoB"/>
- <UML:Generalization xmi.idref="2uCdtjrgLfpr"/>
- <UML:Generalization xmi.idref="bbEXkRwwAMUd"/>
- <UML:Generalization xmi.idref="Y9t3iv153eXZ"/>
- <UML:Generalization xmi.idref="f7qcLRlLp3d5"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="AG2SxqbqTRBU" type="4F2mG2WvecbT" comment="// private attributes// " name="mFc10"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="UZ6on8MB4gMB" type="4F2mG2WvecbT" name="mFcAvArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="mx3Mg8qoMtGJ" type="LIcXhcTtT8Bn" name="mMpduPayloadLength"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="hr98IJcksgZd" type="ObMobD4JO6Fx" name="mpMpduPayload"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="pvmrc72M25ji" type="6EgMC1YWquF9" comment="// Get from specialized SCI msg header// " name="mSpecializedSciMsgType"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="BZUXQio6ZwEp" type="R7NTfdMjVLA2" name="mMpduFormat"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Fra5X9gK2TBe" type="YkJeSfDyIVQI" name="mNbOfPbs"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="YEzaHiGRFiwg" type="DhQX2rY6wPDZ" name="mFcMode"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="QlkxfymspMxL" type="UgPIutO5ambc" name="mShortPpdu"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="TdfU4p6a158I" type="6Qx7AaWcHvu9" name="mMod"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="nMh14efSNPP0" type="TJe4s63xXy2f" name="mFecrate"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="NCsBWpWyQ9ST" type="tWAq6KHaeveU" name="mGil"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="wY1xeAEPUvOX" type="axOd2PMcsqyz" name="mTonemapIndex"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="X3zsSNsoZkz3" type="2yOeu36ujWRN" name="mTxId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="ZT1yaRPX0QUc" type="E4ek4y1U3HLE" name="mFlags"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Ygz3cOa7RX0s" type="4Kduenu6BUBZ" name="mIsEncrypted"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="useRdbTA2S6c" type="4Kduenu6BUBZ" name="mIsCrcOk"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="uV7suaSSGRVq" type="qzlFUs4gsJKl" name="mPbSize"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="p3yFZy5RohrR" type="qzlFUs4gsJKl" comment="// NOT USED YET" name="mReserved"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="IKaKkgueA0U4" type="eKZEv9oVXM34" name="mNbOfSymbols"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="awWoM0fB1dOY" type="4F2mG2WvecbT" name="mIvArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="ZR0N8pnQ7Nir" type="4F2mG2WvecbT" name="mNekArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="1dWBdyFBtkzF" type="4F2mG2WvecbT" name="mPbMeasurementArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="ieOhFnGoCECL" type="4F2mG2WvecbT" name="mPbHeaderArray"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="3zjAKS1L3VXe" type="i2UaJmLAA6SB" comment="// Specialized SCI msg header//" name="mpSpecializedSciMsgHeader"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="SkpLSmaARyse" type="DEOmV9sHIiVw" name="mpPhyProcessor"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="KjgU387lTfM4" type="qzlFUs4gsJKl" name="mNbOfMsgs"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="SXVBdch4R92A" type="YFYivL7lKsyo" comment="// Specialized SCI msg header//" name="mSpecializedSciMsgHeader"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="ahSdaFNuw4Mz" type="4Kduenu6BUBZ" name="mIsSent"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="j6TwKdFLayVu" comment="// Constructors/Destructors// /**&#xa;Constructor" name="PhySciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OUFPyk3QTqlv" type="DEOmV9sHIiVw" value="" name="p_phy_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dL42Hug1y7vI" comment="Empty Destructor" name="~ PhySciMsg"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kAbK66CTYSsW" comment="// public methods///**&#xa;Creates a PHY SCI message.&#xa;@return SciMsg *" name="create">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xmalZjqsD3Bh" type="hHn4fFvgbLYX"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AuwdkfXL0ZNG" comment="Handles a received PHY SCI message.&#xa;@return bool" name="dispatchMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6GwMioOQythn" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="R2HP9AhuKGCO" comment="When receiving a PHY SCI message,&#xa;extracts the PHY SCI message header from the received SCI message data. &#xa;@return bool" name="identifySpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="7TVM2gFxSngz" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MPrspkPzeJbM" comment="Checks that software versions are compatible,&#xa;i.e. checks specialized SCI msg compatibility (check specialized SCI msg version).&#xa;@return bool" name="checkCompatibility">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WXphazPgFJ1w" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="z8ixf5D67SVF" comment="Checks PHY SCI message header values ranges,&#xa;i.e. checks specialized SCI msg validity (check specialized SCI msg header coherence).&#xa;@return bool" name="checkValidity">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6NM4G1rNTKkT" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cA9uQJJkiAcV" comment="Prepares the MPDU, i.e. segment MPDU payload into PBs.&#xa;Fills PBs headers.&#xa;@return bool" name="prepareMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0xQQk4NHbDwA" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="szVWJ4rGCZBp" comment="Fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type PREAMBLE.&#xa;@return bool" name="fillPreMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CLqRdpLjChlS" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cNvkpQxQY4Ky" comment="Fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type FC_HYBRID_MODE.&#xa;@return bool" name="fillFc10Msg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hbqAvYdwV1KF" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Nbg4kIZcI27Z" comment="Fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type FC_AV_ONLY_MODE.&#xa;@return bool" name="fillFcAvMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5iUhvRr5kfUN" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6ypGXy59LyrB" comment="Fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type MPDU_PAYLOAD.&#xa;@return bool" name="fillMpduMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Vq4hVoACPyMK" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MoZusrqETWID" comment="Displays the PHY SCI message header contents." name="displaySpecializedSciMsgHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="npn3sucwsPDN" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Gets a pointer to the PHY SCI message header.&#xa;@return mpSpecializedSciMsgHeader into a void pointer" name="returnSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WxE1yZE4HjjA" type="TYfZTukOB7DK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NGVjFMsZ9PU1" comment="Gets a pointer to the PHY SCI message header.&#xa;@return mpSpecializedSciMsgHeader" name="getSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AYFsBjEgXIM3" type="i2UaJmLAA6SB"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="GIFhpVsaLgdB" comment="Sets the value of the PHY SCI message header.&#xa;@return bool&#xa;@param p_specialized_sci_msg_header the new value of mpSpecializedSciMsgHeader" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="4UFTScoyX2xW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YD7RcImxZHem" type="O12pIiPVGutd" value="" name="p_specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cULltnk86ynt" comment="Gets a pointer to the PHY processor.&#xa;@return mpPhyProcessor" name="getPhyProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="bBYqsF00nDtw" type="DEOmV9sHIiVw"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TgToM4zuH7Jr" comment="Gets the PHY SCI message type.&#xa;@return mSpecializedSciMsgType" name="getSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="v7dSNxVSRlvt" type="6EgMC1YWquF9"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="N4mwJPgvt0el" comment="Sets the PHY SCI message type.&#xa;@return bool&#xa;@param type the new value of mSpecializedSciMsgType" name="setSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LhpsikMHtu8m" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="nPrtNekqIBde" type="02OHgpv6iwv9" value="" name="type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FaXUhoJ5q6zA" comment="Gets the PHY SCI message MPDU format.&#xa;@return mMpduFormat" name="getMpduFormat">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="96kuKdrFiSh4" type="R7NTfdMjVLA2"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Ve3Mei5R7wJS" comment="Sets the PHY SCI message MPDU format.&#xa;@return bool&#xa;@param mpdu_format the new value of mMpduFormat" name="setMpduFormat">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PBWowPfF5S7n" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Z3GrFtUSUzx9" type="QYpsIm6ImSYT" value="" name="mpdu_format"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nGCcKAmnopAS" comment="Gets the PHY SCI message PB number.&#xa;@return mNbOfPbs" name="getNbOfPbs">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CS43MAnUHYMZ" type="YkJeSfDyIVQI"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VFrcA82jAJaP" comment="Sets the PHY SCI message PB number.&#xa;@return bool&#xa;@param nb_of_pbs the new value of mNbOfPbs" name="setNbOfPbs">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9BmsdRu0cQoY" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="A2pc1kmpzwPJ" type="U3HSI0riWfYo" value="" name="nb_of_pbs"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6B5syFIUS84a" comment="Sets the PHY SCI message Frame Control mode.&#xa;@return mFcMode" name="getFcMode">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nRlqttd5Lg7f" type="DhQX2rY6wPDZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="G7JQOsnYud9u" comment="Sets the PHY SCI message Frame Control mode.&#xa;@return bool&#xa;@param fc_mode the new value of mFcMode" name="setFcMode">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qu75SUccfOSH" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LvhKp6cuHhmD" type="8JusFMjAgM0v" value="" name="fc_mode"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="u3hMBmxRrEsF" comment="Gets the PHY SCI message short PPDU.&#xa;@return mShortPpdu" name="getShortPpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qMHSk4zVVkMP" type="UgPIutO5ambc"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4dlxGurcnYud" comment="Sets the PHY SCI message short PPDU.&#xa;@return bool&#xa;@param short_ppdu the new value of mShortPpdu" name="setShortPpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="bzSudZYSUfVu" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="eWVtDF67IoSR" type="nLEyCkrlHPQw" value="" name="short_ppdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YNtPbjeeMNbb" comment="Gets the PHY SCI message modulation.&#xa;@return mMod" name="getMod">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="78WnUw4KIJl2" type="6Qx7AaWcHvu9"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ISB5y5gcc9Tn" comment="Sets the PHY SCI message modulation.&#xa;@return bool&#xa;@param mod the new value of mMod" name="setMod">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LiWpQsE0pesT" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="PZvfLL7ti0IJ" type="UxIGEVkWi0NJ" value="" name="mod"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="huv1IWcawldu" comment="Gets the PHY SCI message FEC rate.&#xa;@return mFecrate" name="getFecrate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CQvg4QYBW5w1" type="TJe4s63xXy2f"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pIURRxCqX5Us" comment="Sets the PHY SCI message FEC rate.&#xa;@return bool&#xa;@param fecrate the new value of mFecrate" name="setFecrate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="z0LII4IdkoSB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Qbm8Z2QGxLFF" type="pwe3pKqZPxkb" value="" name="fecrate"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qqnmbQhQg9p8" comment="Gets the PHY SCI message Guard Interval.&#xa;@return mGil" name="getGil">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ee9UH1xTQq7U" type="tWAq6KHaeveU"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="70we5QUW1EcY" comment="Sets the PHY SCI message Guard Interval.&#xa;@return bool&#xa;@param gil the new value of mGil" name="setGil">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EfdliamiY5yq" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="H2oEM2RCsEwR" type="0cEqYhKKEcTV" value="" name="gil"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cbsJlfPsfLUl" comment="Gets the PHY SCI message tonemap index.&#xa;@return mTonemapIndex" name="getTonemapIndex">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AESu1s3fXC9m" type="axOd2PMcsqyz"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kyFjDrIUs4gC" comment="Sets the PHY SCI message tonemap index.&#xa;@return bool&#xa;@param tonemap_index the new value of mTonemapIndex" name="setTonemapIndex">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="E4FeuM69zjui" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="67MwJIOvuECf" type="eOTt0WSUZhur" value="" name="tonemap_index"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tbVXvzGfvVM8" comment="Sets the PHY SCI message transmission ID.&#xa;@return mTxId" name="getTxId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JeOqjMgtY8mZ" type="2yOeu36ujWRN"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KeaAhEKnJgkc" comment="Gets the PHY SCI message transmission ID.&#xa;@return bool&#xa;@param tx_id the new value of mTxId" name="setTxId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zpDU2MGEPVqH" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="z6WrKiUDIziD" type="ASmFlCHQXF31" value="" name="tx_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wyqrRC0mpYuW" comment="Gets the PHY SCI message flags.&#xa;@return mFlags" name="getFlags">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pwQodIUvwqlg" type="E4ek4y1U3HLE"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nFJ4v1hs7BhP" comment="Sets the PHY SCI message flags.&#xa;@return bool&#xa;@param flags the new value of mFlags" name="setFlags">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CRXjYJIV7Vz7" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="tBbB8JM4ICwj" type="ee5ipO9TkcLk" value="" name="flags"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NuTCSOgDbxIW" comment="Gets if the PHY SCI message is encrypted or not.&#xa;@return mIsEncrypted" name="isEncrypted">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qFLDiBUX5vJg" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zxN484U1E5BM" comment="Sets if the PHY SCI message is encrypted or not.&#xa;@return bool&#xa;@param is_encrypted the new value of mIsEncrypted" name="setIsEncrypted">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Bmb6cMknmHWI" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OVRegLM3FpDf" type="3lgc1KcaMAny" value="" name="is_encrypted"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Bttmq9Hn6cqE" comment="Gets if the PHY SCI message CRC is OK or not.&#xa;@return mIsCrcOk" name="isCrcOk">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZmngGml416Hj" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gIDuNMFjseMW" comment="Sets if the PHY SCI message CRC is OK or not.&#xa;@return bool&#xa;@param is_crc_ok the new value of mIsCrcOk" name="setIsCrcOk">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="FlEIeVyqHauu" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ziZEVktfbkPP" type="3lgc1KcaMAny" value="" name="is_crc_ok"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="teBzG1BxJNpe" comment="Gets the PHY SCI message PB size.&#xa;@return mPbSize" name="getPbSize">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uehetBwSxj6B" type="qzlFUs4gsJKl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="h2NXgh3fPatt" comment="Sets the PHY SCI message PB size.&#xa;@return bool&#xa;@param pb_size the new value of mPbSize" name="setPbSize">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TpFSvW98GLOu" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="KlWtVvJPaUMq" type="qZLXuibBNXID" value="" name="pb_size"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VWlmtZQabl8G" name="getReserved">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rNi8vc0pGfS8" type="qzlFUs4gsJKl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="T9vqknh4YDy3" name="setReserved">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qOYm6dvZSB0M" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9FQhjnVCJFyA" type="qZLXuibBNXID" value="" name="reserved"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oOiN7qda0XRi" comment="Gets the PHY SCI message symbols number.&#xa;@return mNbOfSymbols" name="getNbOfSymbols">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="f9UvVtqKEYS9" type="eKZEv9oVXM34"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="K8kqKgrRvI8e" comment="Sets the PHY SCI message symbols number.&#xa;@return bool&#xa;@param nb_of_symbols the new value of mNbOfSymbols" name="setNbOfSymbols">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9RwN6OVvl2fr" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3doKqmUc8CyG" type="s0nXwm2aK1kb" value="" name="nb_of_symbols"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1bqz6FhOMREe" comment="Gets the PHY SCI message IV array.&#xa;@return mIvArray" name="getIv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="faO7jMTPWwKz" type="t2asNnHh8wsl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8651ODePoSjf" comment="Sets the PHY SCI message IV array.&#xa;@return bool&#xa;@param iv the new value of mIvArray" name="setIv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="n8Jzfj6m829D" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="FBFLLDbKnQJt" type="ylvhNGRUzc7S" value="" name="iv[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dyIxOWbUagVy" comment="Gets the PHY SCI message NEK array.&#xa;@return mNekArray" name="getNek">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Pd88flxKLJR5" type="t2asNnHh8wsl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="t9Lga4LpDYAZ" comment="Sets the PHY SCI message NEK array.&#xa;@return bool&#xa;@param nek the new value of mNekArray" name="setNek">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gtSAnk9arQZW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mktZABSn7ilT" type="ylvhNGRUzc7S" value="" name="nek[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FMxp3RmuY7a8" comment="Gets the PHY SCI message PB measurement array.&#xa;@return mPbMeasurementArray" name="getPbMeasurement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9fGIfPV22bAh" type="t2asNnHh8wsl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AtvLS4uEomnw" comment="Sets the PHY SCI message PB measurement array.&#xa;@return bool&#xa;@param pb_measurement the new value of mPbMeasurementArray" name="setPbMeasurement">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="K5zfPPi5I8F3" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vDj0wSU9nPwo" type="ylvhNGRUzc7S" value="" name="pb_measurement[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qigPoHVw8RHY" comment="Gets the PHY SCI message PB header array.&#xa;@return mPbHeaderArray" name="getPbHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tOdkmAEvnUBS" type="t2asNnHh8wsl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VAmHuXDpjund" comment="@return bool&#xa;@param pb_header the new value of mPbHeaderArray" name="setPbHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="reTsDbXXhXB6" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LHm8hiuXPauB" type="ylvhNGRUzc7S" value="" name="pb_header[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pO7wpMUIUFZO" comment="Gets the Frame Control 1.0.&#xa;@return mFc10" name="getFc10">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="wrBC0OFrmqZW" type="ylvhNGRUzc7S"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kkBTez6zEq5v" comment="@return bool&#xa;@param fc_10 the new value of mFc10" name="setFc10">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0lPlDbB4DewP" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZxRwYJ7LhCHU" type="ylvhNGRUzc7S" value="" name="fc_10"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Wmk1zHPj1ZDg" comment="Gets the Frame Control AV.&#xa;@return mFcAvArray" name="getFcAv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ESwvz51txA5v" type="t2asNnHh8wsl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YHdm8hgfe7bA" comment="@return bool&#xa;@param fc_av the new value of mFcAvArray" name="setFcAv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YIkI8Ho62DrD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="QgW6slYOVJNU" type="ylvhNGRUzc7S" value="" name="fc_av[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="anCcMNGsetck" comment="Gets the MPDU payload length.&#xa;@return mMpduPayloadLength" name="getMpduPayloadLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="m2HyfCNteHob" type="qtOabrV06r8H"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="aINDNyNmctsS" comment="@return bool&#xa;@param length the new value of mMpduPayloadLength" name="setMpduPayloadLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NnUIvXBRpvhv" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="dQp8jCbIxnuH" type="qtOabrV06r8H" value="" name="length"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AA7o1kXa0unO" comment="Gets the MPDU payload.&#xa;@return mpMpduPayload" name="getMpduPayload">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CV1CgqPRsePV" type="Z3mduvueNb9d"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="rAAT20ufQjl8" comment="@return bool&#xa;@param p_mpdu_payload the new value of mpMpduPayload" name="setMpduPayload">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="okOQ1AzOxTeq" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="tMQr9I6HSE4R" type="Z3mduvueNb9d" value="" name="p_mpdu_payload"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yb1yToMKzUmz" comment="// private methods// /**&#xa;Initializes the PHY SCI message class attributes." name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UeevNN1EkP5r" comment="Displays the PHY SCI message header IV." name="displayIv"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hC99QDYMmaKF" comment="Displays the PHY SCI message header NEK." name="displayNek"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OfYL9KIewwXJ" comment="Displays the PHY SCI message header PBs measurements." name="displayPbMeasurement"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KYX2xbrcl0j9" comment="Displays the PHY SCI message header PBs headers." name="displayPbHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mGwfH4GlRyrH" comment="Fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type FC_HYBRID_MODE.&#xa;@param fc_10 the Frame Control 1.0&#xa;@param fc_av the AV Frame Control&#xa;@return bool" name="fillFcHybridMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0pHniyiuRh46" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1e7JcDdFWqOO" type="4F2mG2WvecbT" value="" name="fc_10"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LWo2zxflBcQS" type="4F2mG2WvecbT" value="" name="fc_av[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eeB3a1KcfRtF" comment="Fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type FC_AV_ONLY_MODE.&#xa;@param fc_av the AV Frame Control&#xa;@return bool" name="fillFcAvMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XRXO6utseIHd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="dUU9KqYgNKgM" type="4F2mG2WvecbT" value="" name="fc_av[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="70J7yst8fTa3" comment="Display the specialized SCI message type." name="displaySpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="oSlmwzzyw35S" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Cx1k7cEEcXJY" comment="Sets the PHY SCI message attributes before transmission.&#xa;@param clock_id ID of the Network Clock event received message&#xa;@return bool" name="prepare">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SG2OkeEiUWWC" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ODe1eE4SepEb" type="2OUKpDmUU6Tg" value="" name="clock_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3eQakWDTr7mj" comment="Sets the value of the PHY SCI message header.&#xa;@return bool&#xa;@param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="UC5uu90RZXpf" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Ibze5EeoX49f" type="iJSN8ewspTX1" value="" name="specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WRvK8CSUMkAa" comment="Gets the number of PHY SCI messages (composing the MPDU).&#xa;@return mNbOfMsgs" name="getNbOfMsgs">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PjV3zmeR3gnl" type="qZLXuibBNXID"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mkESDsbuUd5h" comment="Sets the number of PHY SCI messages (composing the MPDU).&#xa;@param nb_of_msgs the new value of mNbOfMsgs&#xa;@return bool" name="setNbOfMsgs">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="J2TnWxzyA2s4" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="52WoBjef8YzG" type="qZLXuibBNXID" value="" name="nb_of_msgs"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VUHK1ajgE3p9" comment="Checks if the PHY SCI message has been sent.&#xa;@return mIsSent" name="isSent">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AsVjPLMo2rp1" type="3lgc1KcaMAny"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="t0J373cnViQ8" comment="Sets if the PHY SCI message has been sent.&#xa;@param is_sent the new value of mIsSent&#xa;@return bool" name="setIsSent">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="cUQf8CQRErCi" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="yeMCUq7zIPKJ" type="3lgc1KcaMAny" value="" name="is_sent"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HaP8ZCy8plaL" comment="NetworkClockEvt.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/NetworkClockEvt.h&#xa;//**&#xa;class NetworkClockEvt" name="NetworkClockEvt">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Wyku01OWbn80" type="uNcSkNqyAxHb" comment="// private attributes//" name="mStationId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Qye7PFvVCgxa" type="acFbRvXTEMIs" name="mNetworkClockType"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="wo5LHtolrYgq" type="2OUKpDmUU6Tg" name="mNetworkClockId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="e6geZ8aObm6V" type="TYfZTukOB7DK" name="mpData"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Y4M9pS7FRmMo" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="NetworkClockEvt"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zGJ9uEjq2mBI" comment="Constructor" name="NetworkClockEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="f03VWhL4jhEZ" type="dsRw8nRMsxE8" value="" name="station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="7LmY57K3NdCH" type="G9Fc21bZFJYw" value="" name="type"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qw7qiH8MFArl" type="nNX5UmpiITKY" value="" name="id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pCqXr26yLqVP" comment="Copy Constructors" name="NetworkClockEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xpSIReXHYd7F" type="VcPcOcsgjQbo" value="" name="evt"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uEZ9MQsBagiP" comment="Empty Destructor" name="~ NetworkClockEvt"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gmL0dqPYepr5" comment="// public methods// " name="operator ==">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pAgzCZ3MRW3p" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ROK01RDtdm0z" type="VcPcOcsgjQbo" value="" name="evt"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ArBiXr7CeSCF" name="operator =">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pPbpFPortFWz" type="j0sNksMuhVaF"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="HbnvQcyr1Ip0" type="VcPcOcsgjQbo" value="" name="evt"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LfRx6bCNCxGa" name="displayEvt"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="aEPZWFXDDNYy" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Set the value of mStationId&#xa;@return bool&#xa;@param station_id the new value of mStationId" name="setStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PuPbjbJYlzVw" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="EtqvOR8j6ZeC" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8qXKmnsK1ItV" comment="Get the value of mStationId&#xa;@return the value of mStationId" name="getStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YWGy3KnshOgw" type="uNcSkNqyAxHb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VOjimHg0AVvX" comment="Set the value of mNetworkClockType&#xa;@return bool&#xa;@param type the new value of mNetworkClockType" name="setNetworkClockType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nUnejHc691ht" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="w4E0btDkhk2R" type="G9Fc21bZFJYw" value="" name="type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WvlVBc1g1iOl" comment="Get the value of mNetworkClockType&#xa;@return the value of mNetworkClockType" name="getNetworkClockType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="a0RK0vEWRUUU" type="acFbRvXTEMIs"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="x3j6YcbSepSG" comment="Set the value of mNetworkClockId&#xa;@return bool&#xa;@param id the new value of mNetworkClockId" name="setNetworkClockId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="mFLUe1OPTC2D" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="gdyMMynsrZN2" type="nNX5UmpiITKY" value="" name="id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BMgA23ty6c4c" comment="Get the value of mNetworkClockId&#xa;@return the value of mNetworkClockId" name="getNetworkClockId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ReHbdzUDztVx" type="2OUKpDmUU6Tg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Ff2tSU7783RU" comment="// private methods// " name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0EKrlfsv0Y30" name="getType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ojUEEwgyCzQo" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="StUj99llDRPn" comment="Constructor" name="NetworkClockEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XzB9jIcjg202" type="dsRw8nRMsxE8" value="" name="station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="iTy4m5nCwHt3" type="G9Fc21bZFJYw" value="" name="network_clock_type"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Peoc3DPYBbhs" type="nNX5UmpiITKY" value="" name="id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZpzV7sWWUK8V" type="rHbXHZa03W4n" value="" name="p_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cFsPi6AvfZ2W" comment="Set the value of mpData&#xa;@return bool&#xa;@param p_data the new value of mpData" name="setData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ypBS1DdQpu1S" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1FeJmIkuNxFh" type="rHbXHZa03W4n" value="" name="p_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wa9sY7FBM5Y2" comment="Get the value of mpData&#xa;@return the value of mpData" name="getData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tTerL7o7rIL3" type="TYfZTukOB7DK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="GIrdG4ICfR4B" name="displayNetworkClockType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="D21PzSByHMQG" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="lmHNZqFB8Nj8" name="PhyMpduCb"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vSu5lsg0a7WJ" comment="class PhySciMsgNoise" name="PhySciMsgNoise">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="5oSJ5pfRXEKM"/>
- <UML:Generalization xmi.idref="GpnnjAimICRg"/>
- <UML:Generalization xmi.idref="8YLQXRKCCIRS"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LbXsqqCDrQXh" comment="// Constructors/Destructors// /**&#xa;Constructor&#xa;Creates a PHY message of type NOISE.&#xa;@param p_phy a pointer to the PHY interface" name="PhySciMsgNoise">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="wzStLEaXhIIG" type="DEOmV9sHIiVw" value="" name="p_phy"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ULvVrrbCQ62E" comment="Empty Destructor" name="~ PhySciMsgNoise"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wFSmfxTawuTH" comment="// public methods// /**&#xa;Sets the PHY SCI message class attributes before transmission&#xa;for a PHY message of type NOISE.&#xa;@return bool" name="prepare">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Y3gNvgop9QeS" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="83mpM46qOzJF" comment="// private methods// /**&#xa;Initializes the PHY SCI message class attributes:&#xa;fills PHY SCI message type,&#xa;and specialized SCI msg data length.&#xa;" name="initAttributes"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="emjq7Xks8DWW" comment="PhySciMsgPre.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/phy/inc/PhySciMsgPre.h&#xa;//**&#xa;class PhySciMsgPre" name="PhySciMsgPre">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="78n0YovcPcSY"/>
- <UML:Generalization xmi.idref="osPEzRTtgtfK"/>
- <UML:Generalization xmi.idref="t2VHdgaE0EUP"/>
- <UML:Generalization xmi.idref="38CRTOHxlKYx"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DNXsEDC2K4mJ" comment="// Constructors/Destructors// /**&#xa;Constructor&#xa;Creates a PHY message of type PREAMBLE.&#xa;@param p_phy_processor a pointer to the PHY interface" name="PhySciMsgPre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="NjQjTLOFItPE" type="DEOmV9sHIiVw" value="" name="p_phy_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fmyMYtyjGWbT" comment="Empty Destructor" name="~ PhySciMsgPre"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jlV1nGKAzisQ" comment="// public methods// /**&#xa;Sets the PHY SCI message class attributes before transmission,&#xa;and fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY SCI message of type PREAMBLE.&#xa;@param clock_id ID of the Network Clock event received message&#xa;@return bool" name="prepare">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XSaOjvRwvRLv" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2GdK70ZmmV7I" type="2OUKpDmUU6Tg" value="" name="clock_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="M52bZb4GNXHA" comment="// private methods// /**&#xa;Initializes the PHY SCI message class attributes.&#xa;Fills PHY SCI message type." name="initAttributes"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="c6nC8sEdaTgi" name="Expected_Tx">
- <UML:Classifier.feature>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="GQCuSON9dVcx" type="2yOeu36ujWRN" comment="// expected transmission ID" name="src_tx_id"/>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="OFjIEoRosCzy" type="uNcSkNqyAxHb" comment="// expected transmitting station ID" name="src_station_id"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4DbehFMvfWp7" name="lttx">
- <UML:Classifier.feature>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tAHWfrR369KI" name="operator ( )">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tWr8qHMOI0kB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZwpFSdMLndpR" type="vl7nx6lzHKbw" value="" name="tx1"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="SFSYMmrHXw2S" type="vl7nx6lzHKbw" value="" name="tx2"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0lRF51Cex1tP" name="RxStationsList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cEjQpWrIlHo7" comment="// list of destination stations" name="Frame_Control">
- <UML:Classifier.feature>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="4fMbZO2Z9RpE" type="4F2mG2WvecbT" name="fc_10"/>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="SzrPyinbwUzm" type="4F2mG2WvecbT" name="fc_av"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0o4m5sr9WEj3" name="RxFcList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ajbkAQwdNn0L" comment="// list of received Frame Control" name="Mpdu_Payload">
- <UML:Classifier.feature>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="UluQFtCGhE0l" type="qzlFUs4gsJKl" comment="// number of PHY SCI messages MPDU that have been received" name="msg_nb"/>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="5psZ1bacKBMT" type="LIcXhcTtT8Bn" name="data_length"/>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="ZG4w24GWoAw3" type="ObMobD4JO6Fx" name="p_data"/>
- <UML:Attribute visibility="public" isSpecification="false" xmi.id="47HjJFSM5Lt6" type="4F2mG2WvecbT" name="pb_header"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uUiFf2iFHkBJ" name="RxMpduList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kooC0I8IkF1k" comment="// list of received MPDU/**&#xa;class PhyProcessor&#xa;Simulates the real HomePlugAV physical interface and data bus." name="PhyProcessor">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="wqho3l7CAaCs"/>
- <UML:Generalization xmi.idref="mPpaajecotJ6"/>
- <UML:Generalization xmi.idref="qMFrrMkplbDq"/>
- <UML:Generalization xmi.idref="QIT8Cyxljy5W"/>
- <UML:Generalization xmi.idref="QZAIkvPSXwgX"/>
- <UML:Generalization xmi.idref="r3SvcBVOH0oL"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="MSPW0bORYUMs" type="T3wGzLaOdJRi" comment="// private attributes//" name="mpSciServer"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="4bRqVlwcVPoa" type="Dc4onmiEKP73" name="mpNetworkClock"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="j4ZX3m01ehFH" type="h0fjFQ6XJMWi" name="mpChannel"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Zngo7fg9F50k" type="4Kduenu6BUBZ" name="mIsChannelEnabled"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="qwKJJ8t2CTZE" type="DshIKK2Zspzs" name="mNbOfCarriers"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="SEUhKSP8PjSi" type="FYDrFS8mDoaL" name="mpTonemask"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="pLlzmIBzqOr3" type="2yOeu36ujWRN" comment="// unique ID incremented for each transmission" name="mTxId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="pzp2mQLEcovw" type="0lRF51Cex1tP" comment="// (PREAMBLE, FC, MPDU, and NOISE if enabled)." name="mListOfRxStations"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="GI5f1VMoo7nb" type="lmHNZqFB8Nj8" name="mInterfaceCb"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="NzaCLPFAN3B9" type="0o4m5sr9WEj3" name="mListOfRxFc"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="RWN3IGyZW1CV" type="uUiFf2iFHkBJ" name="mListOfRxMpdu"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="WYJKf6t13UDP" type="nJsED87p1vHp" name="mFrequency"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="rQXERiNsDiuV" type="PDzFlxMB73D7" name="mZeroCrossDelay"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="wq4SrHxLpGfT" type="iP4BuKaU6MFG" name="mpZeroCross"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="JxYpsEM9xWub" type="iP4BuKaU6MFG" comment="// for the wrong preambles transmission feature" name="mpPre"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="JXPFIAgz5MJu" type="PDzFlxMB73D7" name="mAverageDuration"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="AXAYvicEdA1T" type="nJsED87p1vHp" name="mStdDeviation"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="HMoWMarc8Qsx" type="4Kduenu6BUBZ" comment="// For the wrong preambles transmission feature" name="mIsFalseAlarmActivated"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="fIZddmejZuth" type="vFBbZkjwm4Vx" name="mpWrongPre"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kjwpsBsKYDVA" comment="// Constructors/Destructors// /**&#xa;Constructor" name="PhyProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZPgj0ywKOLqN" type="T3wGzLaOdJRi" value="" name="p_sci_server"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uCoTe8JPrGEk" comment="Empty Destructor" name="~ PhyProcessor"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="R72zIX7svlbt" comment="// public methods// /**&#xa;@return PhySciMsg &amp;" name="createMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gY0oyeGT5qso" type="w18nsvnfKlCn"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jYE8r2VkFHBr" comment="@return bool&#xa;@param received_phy_sci_msg" name="receiveMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kHkdg3WXXNfN" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="QUGFkTx9Yz6q" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VBgQwIJgoVmd" comment="@return bool&#xa;@param phy_sci_msg_to_send" name="sendMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="czku0U4g22Sy" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YFNlUYcs3t8l" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="K3ts3zgWBNu5" comment="@return bool&#xa;@param phy_sci_msg_to_send" name="sendMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fhRkXHYFXGtD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="dDlPhV2FiQ0D" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yc5zTBjlFcbI" comment="@return bool&#xa;@param received_evt&#xa;@param phy_sci_msg_to_send" name="receiveEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="HPlonO9NOrGO" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZIoidioGtXfa" type="j0sNksMuhVaF" value="" name="received_evt"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3hnl5nw2O21p" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DkbSKCiuSUc5" comment="// private methods// /**&#xa;Initializes the PHY processor class attributes." name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AQJ4wwczcOih" comment="Registers the PHY SCI message creation function to the SCI server." name="registerPhySciMsg"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BdjXdjNqRyHm" comment="@return preamble duration in ticks" name="calculatePreDuration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LK2LMTH1Ajlf" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8xeZSGecfweb" comment="@return Frame Control duration in ticks" name="calculateFcDuration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="yHvVXmhm9Sau" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sFYUdEAortKU" comment="@return MPDU payload duration in ticks" name="calculateMpduDuration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qiICZYavsbEE" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ahJ0dYmjVOIx" comment="Sends a PHY SCI message of type NOISE.&#xa;@return bool&#xa;@param phy_sci_msg_to_send" name="sendNoise">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="4WEEDztBFmfm" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="evYHrCqhROC4" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bMrSDBvmqCmR" comment="@return a pointer to SCI server" name="getSciServer">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YKXim7cansnN" type="T3wGzLaOdJRi"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NFHOWKrVnBiw" comment="// public methods// /**&#xa;@param interface_cb&#xa;Initialize PHY with an interface callback function for PHY SCI message MPDU reception." name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="QLGIwUV00jCD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="MQ1QAZGC3U1p" type="lmHNZqFB8Nj8" value="" name="interface_cb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LJul1NAOaPk4" comment="Initialize PHY with the PLC frequency for PHY SCI message of type ZERO_CROSS.&#xa;@param frequency&#xa;@return bool" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="g6Nvq0gPKD54" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="icaVnIP9gOXq" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3UdcrOgZ0E2l" comment="Creates a PHY SCI message MPDU.&#xa;@return PhySciMsgMpdu *" name="createMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Ife6YPTylhFh" type="ihg5BF2ckirV"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="URuAoQzkExjU" comment="Sends a PHY SCI message MPDU.&#xa;This message has to be configured before transmission.&#xa;@param p_mpdu&#xa;@return bool" name="sendMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BigARsL7wg1n" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xX5DDPVEr6og" type="ihg5BF2ckirV" value="" name="p_mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UTGShGDCg6KU" comment="Sends the PHY SCI message associated to the received Network Clock event.&#xa;@return bool&#xa;@param received_evt" name="receiveEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ghC0uF4AuhGS" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="WHEiFvACSFPd" type="j0sNksMuhVaF" value="" name="received_evt"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cspTzc7T5Lum" comment="Processes the received PHY SCI message of type NONE or NOISE.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveInvalid">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6hPrOeXYKDgl" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="c7wIBHkhYwNn" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="rXxHkNsMDhnC" comment="Processes the received PHY SCI message of type PREAMBLE.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receivePre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="51q2irpOWzNO" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="HveMGY7qd38p" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KqWrmuedPauA" comment="Processes the received PHY SCI message of type FC_HYBRID_MODE or FC_AV_ONLY_MODE.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveFc">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EPZ66pZDXw2t" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xmW8SILjDx6R" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VDI8EOxZFSO1" comment="Processes the received PHY SCI message of type PRS.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receivePrs">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YZPsm5dq7Rsp" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="K2fjcZtXKOem" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gzVrwZIPkYVz" comment="Processes the received PHY SCI message of type MPDU_PAYLOAD.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="HfBneYCqwlw2" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xRWCtuBBuqsV" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Om2g8eSodxdX" comment="Processes the received PHY SCI message of type TONEMASK.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="aTD5PGxxpMnc" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="VtuFSQEPrkZi" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cktXZl2vV2bd" comment="Processes the received PHY SCI message of type TONEMAP.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveTonemap">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SOQZqIM7vVuZ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="h3PIy0qTukhM" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8vjzeIhE0YlZ" comment="Processes the received PHY SCI message of type RX.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveRx">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="26NypJ0OnCTA" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="KlUno5RT6ol5" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pZWhID3Q7mQj" comment="@return bool&#xa;@param phy_sci_msg_to_send" name="sendMsgToAllStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SO8FlvrDKFk8" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="25x2ejcwS4jG" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="88jEvVHk2oPK" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return bool&#xa;@param p_network_clock the new value of mpNetworkClock" name="setNetworkClock">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="X4FSZ7zbCMZ1" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1Sl6C9pECnEq" type="Dc4onmiEKP73" value="" name="p_network_clock"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UomwtUB1cuDX" comment="@return bool&#xa;@param p_channel the new value of mpChannel" name="setChannel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gYPRkrbAFhPy" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="NVFQJekI4TNG" type="h0fjFQ6XJMWi" value="" name="p_channel"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cCSpxfdPTOMK" comment="Sets the channel perturbation.&#xa;@param is_channel_enabled the new value of mIsChannelEnabled" name="setIsChannelEnabled">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="bF9tUt12xESV" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="sVLSNXyl2D9J" type="3lgc1KcaMAny" value="" name="is_channel_enabled"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qrbuJy9t9Zg6" comment="Gets the TX ID.&#xa;@return mTxId" name="getTxId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LQ6VmeXQCwru" type="ASmFlCHQXF31"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EKUigo2WJMyg" comment="Gets the tonemask.&#xa;@return mpTonemask" name="getTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lR4z8Txhi7aD" type="S02STVfDWPXk"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="twPt8WCyMlqf" comment="Check if the channel perturbation is enabled.&#xa;@return mIsChannelEnabled" name="isChannelEnabled">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0bDwndR73Vco" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ixYrXFvjXPRD" comment="Sets the power line frequency.&#xa;@param frequency the new value of mFrequency&#xa;@return bool" name="setFrequency">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="99EJ44DnTFmb" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="DSjUmf9dcYWi" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3iePRU49Sa0x" comment="Gets the power line frequency.&#xa;@return mFrequency" name="getFrequency">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hkJNrrYpRllE" type="EQrcJtA2vC7c"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="I7gihefVYKpq" comment="Computes PREAMBLE transmission duration.&#xa;@return preamble delay in ticks" name="calculatePreDelay">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NALQewEl5R57" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ONJubGCVL5xw" comment="Computes Frame Control transmission duration.&#xa;@return Frame Control delay in ticks" name="calculateFcDelay">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VGvyWhXBRoYG" type="PDzFlxMB73D7"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="S9cXzd3GkhyP" type="DhQX2rY6wPDZ" value="" name="fc_mode"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MesuwiiK31Ec" comment="Computes MPDU payload transission duration.&#xa;@return MPDU payload delay in ticks" name="calculateMpduDelay">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="g765qpJDydec" type="PDzFlxMB73D7"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="GO6ZR3VtD5OA" type="6Qx7AaWcHvu9" value="" name="mod"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="iPQQ7PnR1eJx" type="TJe4s63xXy2f" value="" name="fecrate"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="M2HN1TzFr5mG" type="qzlFUs4gsJKl" value="" name="pb_size"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="7H7IKVS2urQz" type="YkJeSfDyIVQI" value="" name="pb_nb"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="EEQFskACkPXl" type="tWAq6KHaeveU" value="" name="gil"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sWzhalxf12xL" comment="@return bool&#xa;@param phy_sci_msg_to_send" name="fillMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZqNcHQikhdgB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XPMPEmPSypfo" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jeFkgC6BZQbo" comment="@return a pointer to Network Clock Processor" name="getNetworkClock">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="IEMi0syez2jq" type="Dc4onmiEKP73"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="C0EBnuxLhyas" comment="Gets a pointer to Channel.&#xa;@return mpChannel" name="getChannel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="s33oefQBWlll" type="h0fjFQ6XJMWi"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RbuTZc1JEE3v" comment="Gets the number of carriers.&#xa;@return mNbOfCarriers" name="getNbOfCarriers">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CTWr4C0LOM3P" type="O74yXfkidyrR"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qokWkKOCwIdV" comment="Sets the number of carriers.&#xa;@return bool&#xa;@param nb_of_carriers the new value of mNbOfCarriers" name="setNbOfCarriers">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Cz3C2n2so3gS" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ufm9ro2Gt6EP" type="O74yXfkidyrR" value="" name="nb_of_carriers"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kw7NswohkYDV" comment="Sets the tonemask.&#xa;@return bool&#xa;@param length the tonemask length in octets&#xa;@param p_tonemask the new value of mpTonemask" name="setTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="j4bDpMwzqSqs" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="rbfnrIGkv1rn" type="O74yXfkidyrR" value="" name="length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="pr1gxD5f9A3z" type="S02STVfDWPXk" value="" name="p_tonemask"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6pgrMtKDSxyI" comment="Increments the TX ID.&#xa;@return bool" name="incrementTxId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="dqDzAGMNEQZG" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="FE29Dtu2kvhf" comment="Gets the interface callback function for PHY SCI message MPDU reception.&#xa;@return mInterfaceCb" name="getInterfaceCb">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BZ8xamNHqyUf" type="lmHNZqFB8Nj8"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6mJFxKE19tqT" comment="Gets the zero-cross delay for PHY SCI message of type ZERO_CROSS transmission.&#xa;@return mZeroCrossDelay" name="getZeroCrossDelay">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KPf8pV1SKEQU" type="Fls26ZE3bRdo"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mAgD5cVJrVS2" comment="Sets the zero-cross delay for PHY SCI message of type ZERO_CROSS transmission.&#xa;@param zero_cross_delay the new value of mZeroCrossDelay&#xa;@return bool" name="setZeroCrossDelay">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TmrhAOvJv1GW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="MK36DkjJW0WR" type="Fls26ZE3bRdo" value="" name="zero_cross_delay"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KiTSbJvOSaZX" comment="Gets a pointer to the PHY SCI message of type ZERO_CROSS.&#xa;@return mpZeroCross" name="getZeroCross">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ndndZGGsfv0U" type="iP4BuKaU6MFG"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="C4q1ZG4vY7zl" comment="Creates a PHY SCI message of type ZERO_CROSS,&#xa;and schedules an event for next PHY SCI message of type ZERO_CROSS transmission.&#xa;@return bool" name="scheduleZeroCross">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PzvjCJBd51IG" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="rg2LhYn1HGTq" comment="Sends a PHY SCI message of type MPDU to destination stations.&#xa;@param mpdu the PHY SCI message MPDU to send&#xa;@return bool" name="sendMpduToDestStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PDXJEopzPacx" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YDH6KEs9vuUa" type="XNEzxlV9pJ9M" value="" name="mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RHZgV1W1Oj0L" comment="Sends an empty PHY SCI message of type NOISE to destination stations.&#xa;@return bool" name="sendEmptyNoiseToDestStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qspTmnwBlrsx" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UTSKnbgJmwP4" comment="Sends PHY SCI message(s) of type MPDU&#xa;and a PHY SCI message of type NOISE&#xa;to destination stations.&#xa;@param mpdu the PHY SCI message of type MPDU&#xa;@return bool" name="sendMpduAndNoiseToDestStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="A1aD2sRQ3zjH" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="8FD38gbZvBFR" type="XNEzxlV9pJ9M" value="" name="mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CjQYSQrxsJFd" comment="Update the list of destination stations.&#xa;Once a PHY SCI message MPDU has been sent to the destination stations,&#xa;remove the destination stations from the reception list." name="updateListOfRxStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="tvwfpLiyZvzh" type="XNEzxlV9pJ9M" value="" name="mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="miLUqmIF4Mp6" comment="Sends an empty PHY SCI message of type NOISE to destination stations.&#xa;@param noise the empty PHY SCI message NOISE to send&#xa;@return bool" name="sendEmptyNoiseToDestStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lWGA6q7xguQS" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="uWFgFmnAKuo7" type="j5EvHIixdpql" value="" name="noise"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="m041la1QGicY" comment="Activate the wrong preambles transmission feature.&#xa;@param average_duration average number of ticks 25 MHz between two consecutive wrong preambles&#xa;@param std_deviation the standard deviation&#xa;@return bool" name="activateFalseAlarm">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iMbTBROJTwXT" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="VJAWSVeG0Fwz" type="Fls26ZE3bRdo" value="" name="average_duration"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="fCcoKQy6R15A" type="EQrcJtA2vC7c" value="" name="std_deviation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WOLI6fzsId4V" comment="Calculate date of next wrong preamble transmission.&#xa;@return the calculated date in ticks 25 MHz" name="calculateNextPreDate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="mwtpva4g6IpD" type="Fls26ZE3bRdo"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ubxT7hdob1It" comment="Schedules an event for next wrong preamble transmission.&#xa;@return bool" name="scheduleNextPre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8u8opWFVrqw2" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZCvoicom5P8Q" comment="Deactivate the wrong preambles transmission feature.&#xa;@return bool" name="deactivateFalseAlarm">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="IKKjGpC2l4pf" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PCJLv0HglTc0" comment="Check if the wrong preambles transmission is enabled or not.&#xa;@return mIsFalseAlarmActivated" name="isFalseAlarmActivated">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="etLjB8uJ325q" type="3lgc1KcaMAny"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="41vxmbYlMoBI" comment="Gets a pointer to the PHY SCI message of type PREAMBLE with the flag PHY_FLAG_WRONG_PREAMBLE set.&#xa;@return mpWrongPre" name="getWrongPre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YKJN9FOPXi8l" type="vFBbZkjwm4Vx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YH3eH1QfEhy7" comment="Gets the average number of ticks 25 MHz between 2 consecutive wrong preambles transmissions.&#xa;@return mAverageDuration" name="getAverageDuration">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VIlGMavzTFgc" type="Fls26ZE3bRdo"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iFnTjOTnPNiB" comment="Gets the standard deviation (used to calculate date of the next wrong preamble transmission).&#xa;@return mStdDeviation" name="getStdDeviation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LatOayC8HVUQ" type="EQrcJtA2vC7c"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yHuK34acLdGa" comment="Calculate date of next wrong preamble transmission.&#xa;@return the calculated date in ticks 25 MHz" name="calculateNextWrongPreDate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="isnFav03BjJW" type="Fls26ZE3bRdo"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dgFpMDw4ThVA" comment="Schedules an event for next wrong preamble transmission.&#xa;@param tick_wrong_pre the next wrong preamble should be transmitted at current date + tick_wrong_pre (in 25 MHz)&#xa;@return bool" name="scheduleNextWrongPre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JDVkQ9MljF8J" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="5wxTJgcHvXZy" type="Fls26ZE3bRdo" value="" name="tick_wrong_pre"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="KqJ8bZTEut0O" comment="class IPhy" name="IPhy">
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yaLsEUCpV6SB" name="IPhy"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kPkaAdqUS7a3" name="~ IPhy"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="h1GZuEvrpEj3" comment="// public methods// /**&#xa;@return PhySciMsg &amp;" name="createMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CKPRorrWjemH" type="w18nsvnfKlCn"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="jusE0INkg7Lq" comment="@return bool&#xa;@param received_phy_sci_msg" name="receiveMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XkKiUcElphWD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="j9IBHtCwuSVn" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="hOeUdLXMFNYD" comment="@return bool&#xa;@param phy_sci_msg_to_send" name="sendMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="osyV66mGPAhD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="fvyL0H9jQSsf" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="J5bBV6yATae6" comment="@return bool&#xa;@param phy_sci_msg_to_send" name="sendMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1Whl8R2fCNLe" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="w9Q9UyN8rJRp" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="YbZw1PcKSDVy" comment="@return bool&#xa;@param received_evt&#xa;@param phy_sci_msg_to_send" name="receiveEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xYPmDvx2mvVq" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="IS6l2jpwsF6L" type="j0sNksMuhVaF" value="" name="received_evt"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="BRT0iupGTMCU" type="w18nsvnfKlCn" value="" name="phy_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="AtHIE0QoOt3a" comment="// public methods// /**&#xa;@param interface_cb&#xa;Initialize PHY with an interface callback function for PHY SCI message MPDU reception." name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0I6NSnYTJFER" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="l214gNwRYSA4" type="lmHNZqFB8Nj8" value="" name="interface_cb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="HFKsayykpF23" comment="Initialize PHY with the PLC frequency for PHY SCI message of type ZERO_CROSS.&#xa;@param frequency&#xa;@return bool" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hF4taPVXvuH9" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Z116SAAjPUZx" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="3jRwvWWTVYZx" comment="Creates a PHY SCI message MPDU.&#xa;@return PhySciMsgMpdu *" name="createMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="oE9a7eQ7wUSM" type="ihg5BF2ckirV"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="NCRUK0sLkHHd" comment="Sends a PHY SCI message MPDU.&#xa;This message has to be configured before transmission.&#xa;@param p_mpdu&#xa;@return bool" name="sendMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="H0qaG2zvH3mp" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="nm4HIdEyKv3U" type="ihg5BF2ckirV" value="" name="p_mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="836rmxK77lbR" comment="Sends the PHY SCI message associated to the received Network Clock event.&#xa;@param received_evt&#xa;@return bool" name="receiveEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="QHMMBbTxpcVx" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="kRkSh25SmAj4" type="j0sNksMuhVaF" value="" name="received_evt"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="ly04r3Yz6coq" comment="Processes the received PHY SCI message of type NONE or NOISE.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveInvalid">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Ev29NVVeVJCj" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="X8xfsW4ayp2f" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="p57ZDpbznb1e" comment="Processes the received PHY SCI message of type PREAMBLE.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receivePre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="MBebEORffl1p" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="eZbi9QXgWUJM" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="zMwv9wYy2dXF" comment="Processes the received PHY SCI message of type FC_HYBRID_MODE or FC_AV_ONLY_MODE.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveFc">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LSmA4I5GB8PZ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="S6CFhDtJkTzr" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="tWYNzpkyBerK" comment="Processes the received PHY SCI message of type PRS.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receivePrs">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="btB4COoYZQ8m" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="bPGb2loVr1iY" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="Capv3pmwLIHI" comment="Processes the received PHY SCI message of type MPDU_PAYLOAD.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pXRSGQHbs2mu" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="81GHg7aFUqqX" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="cc0RbiyoInhJ" comment="Processes the received PHY SCI message of type TONEMASK.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Ip8RxYyYPAbb" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="aTDukVCsWR7A" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="YhN1WBY6oWXP" comment="Processes the received PHY SCI message of type TONEMAP.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveTonemap">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YN85nGranG13" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="CTDTHsmpM0j6" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="VwwzN38tjVuF" comment="Processes the received PHY SCI message of type RX.&#xa;@return bool&#xa;@param received_phy_sci_msg" name="receiveRx">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="eGdUIPMYCV0A" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="hQLTwqs7K4aZ" type="w18nsvnfKlCn" value="" name="received_phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="wMOGK8Mp2GnP" comment="@return bool&#xa;@param p_network_clock the new value of mpNetworkClock" name="setNetworkClock">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1ygQ6H1ce9iQ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="IvIzOBE3ZXWW" type="Dc4onmiEKP73" value="" name="p_network_clock"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="LPbfTBCPXbgq" comment="@return bool&#xa;@param p_channel the new value of mpChannel" name="setChannel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PXyAmzCOEptW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Xij7DGbYdCE4" type="h0fjFQ6XJMWi" value="" name="p_channel"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="NQTsz7ig6MNL" comment="Sets the channel perturbation.&#xa;@param is_channel_enabled the new value of mIsChannelEnabled" name="setIsChannelEnabled">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="CF3Ok3WlzDB6" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mTq4qKmN0VSD" type="3lgc1KcaMAny" value="" name="is_channel_enabled"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="j3lMDxQYOsPL" comment="Gets the TX ID.&#xa;@return Phy_Tx_Id" name="getTxId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SBg5KMTisRqe" type="ASmFlCHQXF31"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="x721RPKCrAGh" comment="Gets the tonemask.&#xa;@return mpTonemask" name="getTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="P20drt717AQp" type="S02STVfDWPXk"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="MwIimf4jl6jC" comment="Check if the channel perturbation is enabled.&#xa;@return mIsChannelEnabled" name="isChannelEnabled">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BwZB7iFYttdC" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="T3MKEc1ea274" comment="Sets the power line frequency.&#xa;@param frequency the new value of mFrequency&#xa;@return bool" name="setFrequency">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="G6u8VkkulkVc" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XkF39mlUg2CS" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="hGASKtfmwz68" comment="Gets the power line frequency.&#xa;@return mFrequency" name="getFrequency">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="edcjn2Yzw782" type="EQrcJtA2vC7c"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="tbpXPLzYIUlS" comment="Activate the wrong preambles transmission feature.&#xa;@param average_duration average number of ticks 25 MHz between two consecutive wrong preambles&#xa;@param std_deviation the standard deviation&#xa;@return bool" name="activateFalseAlarm">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qLajEBvUFnak" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="4PmVEZrSWSor" type="Fls26ZE3bRdo" value="" name="average_duration"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="cAp0OFZIqMnE" type="EQrcJtA2vC7c" value="" name="std_deviation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="CTuiKWIdpi2x" comment="Deactivate the wrong preambles transmission feature.&#xa;@return bool" name="deactivateFalseAlarm">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WKdH58rhlTQX" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="kooC0I8IkF1k" xmi.id="r3SvcBVOH0oL" parent="KqJ8bZTEut0O" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="RYfxHmW7DMwU" xmi.id="ZMYd8VSqVZW8" parent="vpDXE2tS2kJL" name=""/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="CpGnr2lIA5kk" xmi.id="gipeZdVAO1cK" parent="dBvvR3kpanaF" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZWryYSGDRuyu" name="Ethernet_Sniffer_Type"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cQhYUO60E2We" name="Ethernet_Flags"/>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="RYfxHmW7DMwU" xmi.id="9YrE9VtnAraO" parent="vpDXE2tS2kJL" name=""/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dBvvR3kpanaF" comment="SciMsg.h - Copyright buret&#xa;Here you can write a license for your code, some comments or any other&#xa;information you want to have in your generated code. To to this simply&#xa;configure the &quot;headings&quot; directory in uml to point to a directory&#xa;where you have your heading files.&#xa;or you can just replace the contents of this file with your own.&#xa;If you want to do this, this file is located at&#xa;/usr/share/apps/umbrello/headings/heading.h&#xa;-->Code Generators searches for heading files based on the file extension&#xa;i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&#xa;files, and for a file name ending in &quot;.java&quot; to include in all generated&#xa;java code.&#xa;If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&#xa;choose this file even if there are other files with the same extension in the&#xa;directory. If you name the file something else, it must be the only one with that&#xa;extension in the directory to guarantee that Code Generator will choose it.&#xa;you can use variables in your heading files which are replaced at generation&#xa;time. possible variables are : author, date, time, filename and filepath.&#xa;just write %variable_name%&#xa;This file was generated on %date% at %time%&#xa;The original location of this file is /home/buret/eclipse/maximus/sci/inc/SciMsg.h&#xa;//**&#xa;class SciMsg" name="SciMsg">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="DNaf2fosEYp6" type="4ptGPmSL1mv9" comment="// private attributes// // NOT USED YET" name="mSciMsgStatus"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="yCEYCVwasJEM" type="B8d1TM24GHiB" comment="// Values of SCI message header//" name="mSciMsgType"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="lK5p4wmHHMxI" type="uNcSkNqyAxHb" name="mSciMsgStationId"/>
- <UML:Attribute visibility="private" isSpecification="false" ownerScope="classifier" xmi.id="zjADHzJD9XkJ" type="A2J7LcYakjsI" comment="// to send to station" name="mSciMsgId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="3gtty6EhQJUU" type="bicD6yqnVUa7" name="mSciMsgFlag"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="frhxJACauh8Z" type="1p2XZLYDDR9J" comment="// SCI message header, SCI message data length, and SCI message data//" name="mpSciMsgHeader"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="SgvPQYIQNKxu" type="LIcXhcTtT8Bn" name="mSciMsgDataLength"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="fV8suH9Y6rVO" type="ObMobD4JO6Fx" name="mpSciMsgData"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="1fyvN4SpkND9" type="LIcXhcTtT8Bn" comment="// protected attributes// // Specialized SCI message header size, specialized SCI message data length, and specialized SCI message data//" name="mSpecializedSciMsgHeaderSize"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="tVZFpU9SzFLr" type="LIcXhcTtT8Bn" name="mSpecializedSciMsgDataLength"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="VSPZJuxIatDv" type="ObMobD4JO6Fx" name="mpSpecializedSciMsgData"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="91lljHb4Hsc9" type="FGkVafnZOxkd" comment="// SCI message header, SCI message data length, and SCI message data//" name="mSciMsgHeader"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ydigyvpsOM5B" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="SciMsg"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qCenSxfvP4Uh" comment="Copy Constructors" name="SciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2ldQ8iayuCmK" type="xSzXJBSHo8yn" value="" name="sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7RFUTkBQABvR" name="SciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="AUT5eDNlcdG5" type="KLj6UftWOUuW" value="" name="p_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LRUTaPuslbzF" comment="Empty Destructor" name="~ SciMsg"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="EqjdLb7V6YYi" comment="// public methods// /**&#xa;@return SciMsg *" name="create">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TwUQ4cQsvyZ7" type="hHn4fFvgbLYX"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="jwULXkPs9tJi" comment="@return bool" name="dispatchMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9TcOGC6kVj1a" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="GDaznZC1Qvcj" comment="@return bool" name="identifySpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="stHbKf8obaCd" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="XiEbElJyhlJC" comment="@return bool" name="checkCompatibility">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AaV5Y3DhWn3k" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Tg2dXLJoWrnJ" comment="@return bool" name="checkValidity">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="x9VSrU0hLHIe" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="R0JpttWOZkzo" comment="@return bool" name="identifySpecializedSciMsgData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uPSUxc78CbDk" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="THk801KUiM5F" name="displaySciMsgHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hO1EFpVenmRg" name="displaySciMsgData"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="gx5Dg2z9HjII" name="displaySpecializedSciMsgHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jcmRxreeDgqQ" name="displaySpecializedSciMsgData"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TK3G6UukSxy6" comment="@return SCI_MSG_MAGIC converted to uint32_t" name="getDefinedSciMsgMagicId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="cOP6BSq7ZJZQ" type="4F2mG2WvecbT"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0vFHfVZO6Jn3" comment="@return SCI_MSG_VERSION" name="getDefinedSciMsgVersion">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ma57pMlijBCg" type="8RfL5UmYopms"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HhdhcZncU1s7" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;@return mSciMsgStatus" name="getSciMsgStatus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lHoxq0fSO4YY" type="4ptGPmSL1mv9"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WPTahGdpgHBl" comment="@return bool&#xa;@param status the new value of mSciMsgStatus" name="setSciMsgStatus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="UNf2gCQQmWWa" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZQu2Rm9wAdWr" type="lvIXi2Pxh0fK" value="" name="status"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="r8eVPpF8iXfO" comment="@return the value of mSciMsgType" name="getSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="sHGbRSFCh48Y" type="B8d1TM24GHiB"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Z2MF31ZaRTar" comment="@return bool&#xa;@param type the new value of mSciMsgType" name="setSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="4l0SqXyIudKY" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="dvwJQZixa4Cd" type="EknMLJBAPpgo" value="" name="type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3lBSDmJRU4ln" comment="Get the value of mSciMsgStationId&#xa;@return the value of mSciMsgStationId" name="getSciMsgStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qjzaFV85kOe9" type="uNcSkNqyAxHb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MwxlldaMWUgw" comment="Set the value of mSciMsgStationId&#xa;@return bool&#xa;@param station_id the new value of mSciMsgStationId" name="setSciMsgStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="otMWxS41D2S1" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2OucQ4DTqMt3" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8DSaFDNb7JNs" comment="Get the value of mSciMsgId&#xa;@return the value of mSciMsgId" name="getSciMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZQKR2c0qLxOY" type="A2J7LcYakjsI"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uvFRNvNPHFzh" comment="Increment the value of mSciMsgId&#xa;@return bool" name="incrementSciMsgId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="QVdAtHIg9eC6" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KA88X19dCZES" comment="@return the value of mSciMsgFlag" name="getSciMsgFlag">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="4E6HEWJmubDw" type="bicD6yqnVUa7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mZ3tsOjnJwCf" comment="@return bool&#xa;@param flag the new value of mSciMsgFlag" name="setSciMsgFlag">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BBkV693WeffV" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="rKN1rZRb8TSz" type="pX24l2l5CrBj" value="" name="flag"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="rBk96wovRq0C" comment="@return mpSciMsgHeader" name="getSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ux93ZLAdXEum" type="1p2XZLYDDR9J"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qjF3ZQkOi5PZ" comment="@return bool&#xa;@param p_sci_msg_header the new value of mpSciMsgHeader" name="setSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kBYemlZyvJR1" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="M4llvjylRDmy" type="erAlIci9mSIq" value="" name="p_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cXMIalqDa0ys" comment="Get the value of mSciMsgDataLength&#xa;@return the value of mSciMsgDataLength" name="getSciMsgDataLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="QUY29BY48h7h" type="LIcXhcTtT8Bn"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="be0L4GBQLu9E" comment="Set the value of mSciMsgDataLength&#xa;@return bool&#xa;@param data_length the new value of mSciMsgDataLength" name="setSciMsgDataLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1FIWRCIBMqo8" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="c7x1JizvDLBn" type="qtOabrV06r8H" value="" name="data_length"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="410d0wVZaTue" comment="Get the value of mpSciMsgData&#xa;@return the value of mpSciMsgData" name="getSciMsgData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="aN4TgVU5y077" type="ObMobD4JO6Fx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="k323xCFXJCYa" comment="Set the value of mpSciMsgData&#xa;@return bool&#xa;@param p_data the new value of mpSciMsgData" name="setSciMsgData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9d9HJFwKSCqu" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="uXT5sftvgtYg" type="Z3mduvueNb9d" value="" name="p_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="o1FOV73DA5G6" comment="// protected attribute accessor methods// /**&#xa;Get the value of mSpecializedSciMsgHeaderSize&#xa;@return the value of mSpecializedSciMsgHeaderSize" name="getSpecializedSciMsgHeaderSize">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="P75lvrrTEuwt" type="LIcXhcTtT8Bn"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HTdZfC9Yjdda" comment="Set the value of mSpecializedSciMsgHeaderSize&#xa;@return bool&#xa;@param header_size the new value of mSpecializedSciMsgHeaderSize" name="setSpecializedSciMsgHeaderSize">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NPyLN5RXjYm2" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="GUTwM1bA2oYV" type="qtOabrV06r8H" value="" name="header_size"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="wZg4fwAuPmT3" comment="Get the value of mpSpecializedSciMsgHeader&#xa;@return the value of mpSpecializedSciMsgHeader into a void pointer" name="returnSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lhKEt86IF919" type="TYfZTukOB7DK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ybZfCADSfgM1" comment="Get the value of mSpecializedSciMsgDataLength&#xa;@return the value of mSpecializedSciMsgDataLength" name="getSpecializedSciMsgDataLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1rcFlX86w6SJ" type="LIcXhcTtT8Bn"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hv9ikhBeHsgu" comment="Set the value of mSpecializedSciMsgDataLength&#xa;@return bool&#xa;@param data_length the new value of mSpecializedSciMsgDataLength" name="setSpecializedSciMsgDataLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ArotPbtBIBPB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mpoAbGDXpkA1" type="qtOabrV06r8H" value="" name="data_length"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uORX2lYkhfQP" comment="Get the value of mpSpecializedSciMsgData&#xa;@return the value of mpSpecializedSciMsgData" name="getSpecializedSciMsgData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JVSXeRgdIGt1" type="ObMobD4JO6Fx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NZ3cRhUCWIM7" comment="Set the value of mpSpecializedSciMsgData&#xa;@return bool&#xa;@param p_data the new value of mpSpecializedSciMsgData" name="setSpecializedSciMsgData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nz6j6Y1EPp5m" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="WXcLHnK99lhB" type="Z3mduvueNb9d" value="" name="p_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VDtCtJbErcoI" name="displaySciMsgType"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JISqYov5LWOa" comment="// private methods// " name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JjiQSPbxaV7T" name="displaySciMsgFlag"/>
- <UML:Operation visibility="protected" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mihdIVuanMQK" comment="// protected methods///**&#xa;@return bool&#xa;@param data_length_to_remove&#xa;@param data_length&#xa;@param pp_data" name="removeData">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Qyxg7KsQnIvQ" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9JPSpn36UjWx" type="qtOabrV06r8H" value="" name="data_length_to_remove"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="88sib0ANgpzx" type="iB4yZDFSik45" value="" name="data_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Zq83ZdyfjpLK" type="LrX6DxQMEnp2" value="" name="pp_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="cSKBEqveaO2g" comment="Display the specialized SCI message type." name="displaySpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="EplKIu64kqHZ" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="klmZIFWoPiEg" comment="@return bool&#xa;@param sci_msg_header the new value of mSciMsgHeader" name="setSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="jZ30qwzdw5L0" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="D5Bc34Mmou43" type="7YtOMToL1Xs9" value="" name="sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="CpGnr2lIA5kk" xmi.id="lUOyLKnJycgv" parent="dBvvR3kpanaF" name=""/>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Afzv7B0Suvrw" name="StaCounter"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="C32l1W8XzZV4" comment="class CoreEngine&#xa;Main simulator part which is managing the overall working of PHY interface,&#xa;Network Clock and other AV stations." name="CoreEngine">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="NaCjKA3ztF1f" type="qcb8l3xv8TRt" comment="// private attributes// " name="mpFunctionCall"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="tIqrt93wBnvf" type="TXhtlZjMAp7C" name="mpSystem"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="vReSwjgJHq1c" type="Dc4onmiEKP73" name="mpNetworkClock"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="14ZsHYW9oM0f" type="DEOmV9sHIiVw" name="mpPhy"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="T1ceoVKhww8r" type="T3wGzLaOdJRi" name="mpSci"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Qvzi8cZHoFW0" type="h0fjFQ6XJMWi" name="mpChannel"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="OZ68tPxHLwzT" type="xqe85s2v3X76" name="mpEthernet"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dm8vd9VcC2UT" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="CoreEngine"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="b0cNLa3madPO" comment="Empty Destructor" name="~ CoreEngine"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8h43dAsHw0CZ" comment="// public methods// /**&#xa;Initializes the Core Engine.&#xa;@return bool" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="dMC09HnYDkEK" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Ah9KjcnIaOgv" type="9U1uI8HJT0Jf" value="" name="station_executable"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="wjgWK5tQmvTP" type="9U1uI8HJT0Jf" value="" name="station_log"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="5Lg1MqZUVioF" type="9U1uI8HJT0Jf" value="" name="debugger"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KZVvvBoqsUMC" comment="Processes the next event in the Network Clock event list.&#xa;Then, processes messages coming from pipe.&#xa;@return bool" name="process">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="34iqMeG4DK41" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZDdJ84jBONDi" type="Fls26ZE3bRdo" value="" name="max_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CmAhUywpVQiP" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Gets Function Call.&#xa;@return IFunctionCall *" name="getFunctionCall">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="E3f8706kKIjR" type="qcb8l3xv8TRt"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZWFS1ZcYnDst" comment="Gets System.&#xa;@return ISystem *" name="getSystem">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZUzmCC4FGn6b" type="TXhtlZjMAp7C"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Gb5ewIM82WqU" comment="Gets Network Clock.&#xa;@return INetworkClock *" name="getNetworkClock">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PKfaehcrkFzr" type="Dc4onmiEKP73"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SkHv8zKiWZAV" comment="Gets PHY.&#xa;@return IPhy *" name="getPhy">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="D6aXOHwwlwgx" type="DEOmV9sHIiVw"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9k3uwvlCUqoP" comment="Gets SCI.&#xa;@return ISci *" name="getSci">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6lDKWHvvbaTE" type="T3wGzLaOdJRi"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="68V8cJd42uxA" comment="// private methods// /**&#xa;Initializes the Core Engine class attributes." name="initAttributes"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PmskjqBDNtW9" comment="// public methods// /**&#xa;Initializes the Core Engine.&#xa;@return bool" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="H550K2pX8N2V" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="5qq6mdFYTGLp" type="9U1uI8HJT0Jf" value="" name="station_executable"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="RFY8ENjb9aJq" type="9U1uI8HJT0Jf" value="" name="station_log"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OU4lLasPOiV8" type="9U1uI8HJT0Jf" value="" name="debugger"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Lkgm10aQF8YR" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="F99UFftitsKh" comment="Creates, enables or disables Channel." name="disturbChannel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ezRNt7LzsWJM" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="DnryIm4MXao0" type="3lgc1KcaMAny" value="" name="enable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WCIhU3W1sD2s" comment="Gets a pointer to Channel.&#xa;@return mpChannel" name="getChannel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nDHMljY1od17" type="h0fjFQ6XJMWi"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CcgOZDeA999G" comment="Gets a pointer to Ethernet.&#xa;@return mpEthernet" name="getEthernet">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="goemCfHocgCV" type="xqe85s2v3X76"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0dybVkdpO4Ya" comment="class ISystem" name="ISystem">
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DcrHJRGd69d1" name="ISystem"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zdmBV5JTgF4A" name="~ ISystem"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="xfzMjXwu7lBR" comment="// public methods// /**&#xa;@return Sci_Msg_Station_Id" name="createStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="oXSe1j1mwG8g" type="uNcSkNqyAxHb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="DP4JYfKYI6jn" comment="@return bool&#xa;@param station_id" name="removeStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zhhmIgtwUVhe" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="90EpEIzBxyVe" type="uNcSkNqyAxHb" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="UQWbBi2O55he" comment="@return bool&#xa;@param station_id" name="deactivateStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AyTmffFRAf5B" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="i1Cz5tkEsz46" type="uNcSkNqyAxHb" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="H3FD0lpUBM5M" comment="@return bool&#xa;@param station_id" name="activateStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="P4xJL3xIie41" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="26l79SjpStoX" type="uNcSkNqyAxHb" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="nZmdYqjnrwyr" comment="Get the value of mListOfStations&#xa;@return the value of mListOfStations" name="getListOfStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KvvnRcRZZuMC" type="cKqCpL4vHbUA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="hmJq6ND6RyBa" comment="@return bool" name="areAllActiveStationsIdle">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XZdhFgqclnt4" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="8P8dmSdYZ6WN" comment="// public methods// /**&#xa;Indicate the default station executable to run when creating a station&#xa;@return bool&#xa;@param default_station_executable the new value of mDefaultStationExecutable&#xa;@param debugger the new value of mDebugger" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="prMXTPWoKSZj" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="MRiHZqb8I49K" type="trv86yL4jfeS" value="" name="default_station_executable"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9glyxiT37agr" type="trv86yL4jfeS" value="" name="debugger"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="2JQaOuviJdxq" comment="@return Sci_Msg_Station_Id" name="createStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="20JbtdnQCO6P" type="uNcSkNqyAxHb"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="UYzka84impgj" type="trv86yL4jfeS" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="W8mdiQTkhtI5" comment="@return bool&#xa;@param system_sci_msg" name="receiveIdleMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5w1oktsZiC4B" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="lDl4pivJHs1r" type="VBixqziBqrhe" value="" name="system_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="yB425IP1woFk" comment="@return bool&#xa;@param station_id" name="debugStation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Zbxu1Wb3VufO" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LWNvAAJCvZaA" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="QH7JbAUZLWaO" comment="@return bool" name="isStationIdle">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="XQokps7sp7gX" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="pxPjlcR79n0J" type="uNcSkNqyAxHb" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="xJTqs3yHK5au" comment="@return bool&#xa;@param station_id&#xa;@param new_status" name="updateStationStatus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0W4ii8rGjpAi" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="D2TYY1uLwI3i" type="dsRw8nRMsxE8" value="" name="station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="sSn1FnJC4k0w" type="nMhUhBvBqw4A" value="" name="new_status"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="c6XgqXacWmjX" comment="@return bool&#xa;@param p_network_clock the new value of mpNetworkClock" name="setNetworkClock">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JlmoePCBpztc" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XhmJ7WbZBEx6" type="Dc4onmiEKP73" value="" name="p_network_clock"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="t1s0sfKSjp8X" comment="@return mDefaultStationExecutable" name="getDefaultStationExecutable">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="p1Se86B8cFoJ" type="trv86yL4jfeS"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="LiArUrM0W8Je" comment="@return bool&#xa;@param station_id the station ID&#xa;@param station_name the new value of the station name" name="setStationName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="MdZ3QhmkQYW4" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="dsDo68tx9jvz" type="dsRw8nRMsxE8" value="" name="station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OGR53XcOFkDi" type="trv86yL4jfeS" value="" name="station_name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2j8N30UlnykR" comment="class IFunctionCall" name="IFunctionCall">
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="J2aNcDdLjIki" name="IFunctionCall"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HyhtbluIuHLs" name="~ IFunctionCall"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="l7eip5m97MWi" comment="// public methods// /**&#xa;@return FunctionSciMsg *" name="createMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vhEie7LT8l8E" type="JCIhsw1mHbC2"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="X81GQjzfieZJ" comment="@return bool&#xa;@param function_sci_msg&#xa;@param callback_address" name="registerCallback">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="sHKSV8lrkIuA" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="QRZIitARyo9n" type="2JrrgMpWtl6M" value="" name="msg_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="lTejHlV9fP7u" type="O0Y4e7L2YuKE" value="" name="callback_address"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="mkhHNiAlgjpI" comment="@return bool&#xa;@param function_sci_msg" name="sendMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zeuOCRS58eom" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="o8LL2dXo6BXM" type="JCIhsw1mHbC2" value="" name="p_function_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="v2TaQYUAJBSg" comment="@return bool&#xa;@param function_sci_msg" name="sendMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="m7FssL7kdRD8" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mu6r4eDzeeZ2" type="taPZHCs4KBPK" value="" name="function_sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="Ynfe0DywdNUn" comment="@return bool&#xa;@param function_sci_msg" name="receiveMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YwzIFrSCWLag" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TO4JwUKjgffu" type="Q7aANH0SNANP" value="" name="function_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="4MiOTTt1EXfF" comment="@return pointer to mListOfCallbacks" name="getListOfCallbacks">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="k3mshacRhpKX" type="Dk5pczPnz6Yr"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pdUJAVtJe39T" comment="class INetworkClock" name="INetworkClock">
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sh6Y1fcHG1Pp" name="INetworkClock"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BOv17TKw7oDH" name="~ INetworkClock"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="I6aw7hNyMRWO" comment="// public methods///**&#xa;@param evt_to_send&#xa;@param tick_value" name="createEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="78fL728GO4HV" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="8ymUQIqVOTqV" type="VcPcOcsgjQbo" value="" name="evt_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="M8En1Kv1mtoY" comment="@return bool" name="processNextEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BPGmqRuMNrea" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OGXn2qPMzklY" type="Fls26ZE3bRdo" value="" name="max_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="QO5UDy5Z4JK5" comment="@return Network_Clock_Tick" name="getCurrentTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="g5nAONr8Oby6" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="iRbOoMx0JUVV" comment="@return bool&#xa;@param evt_to_insert&#xa;@param tick_value" name="insertEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9aVoNnLWCbI3" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jPVy38VHo2wj" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="8ma3mYiSzJql" type="VcPcOcsgjQbo" value="" name="evt_to_insert"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="flkwFFSwfxui" comment="@return bool&#xa;@param evt_to_remove&#xa;@param tick_value" name="removeEvt">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="2ANOz0ye3loR" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="5OxuOtbUd9VP" type="Fls26ZE3bRdo" value="" name="tick_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="hEpeVdQ9P85c" type="VcPcOcsgjQbo" value="" name="evt_to_remove"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="te4ovL4IvO5c" comment="@return bool&#xa;@param station_id" name="removeEvts">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9dZXEXbN55BS" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="52fJxeRcefMY" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mKTfuY7pgyOI" comment="class IChannel" name="IChannel">
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mnXY2pAfXV4I" name="IChannel"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1LylB28ScNMD" name="~ IChannel"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="p03UaTHNEmvE" comment="// public methods// /**&#xa;Duplicate the MPDU payload.&#xa;@param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload&#xa;@return bool" name="duplicateMpduPayload">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="sVz56F67OTVN" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="c4t9XxPYINIR" type="XNEzxlV9pJ9M" value="" name="mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="OQtyoDBbEC4m" comment="Compute PB measurement and NOISE.&#xa;@param pb_measurement_array the PB measurement to fill in&#xa;@param noise the PHY SCI message NOISE to fill in&#xa;@param pb_header_array the PB header of each PB composing the MPDU&#xa;@param mpdu a PHY SCI message MPDU that contains the duplicated MPDU payload&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param rx_station_id the ID of the destination station&#xa;@param current_tick the current Network Clock tick&#xa;@return bool" name="addPerturbation">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TR1WBqvKRUpg" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vECDaScytWwf" type="fL9t737j70re" value="" name="pb_measurement_array"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="swSzwHbsWm36" type="j5EvHIixdpql" value="" name="noise"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Ee25Aykt1znI" type="t2asNnHh8wsl" value="" name="pb_header_array"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="KkkqUmwiQymY" type="FVFtK4cB028u" value="" name="mpdu"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="uWPvTCDhfRa0" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TA9RCHJWz2KT" type="dsRw8nRMsxE8" value="" name="rx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="oGACCwi6Q7zs" type="Fls26ZE3bRdo" value="" name="current_tick"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="KBZza9x3H6ST" comment="Add Channel Settings to the list.&#xa;Called when a station is created => create its associated Channel Settings.&#xa;@return bool" name="addChannelSettings">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zP14UDVMgSPm" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="MlyLnIpZXxjj" type="dsRw8nRMsxE8" value="" name="created_station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="tRoJZlBrwkqU" comment="Find Channel Settings.&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param rx_station_id the ID of the destination station&#xa;@return a list of Channel Settings" name="findChannelSettings">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fVr3xKRQmQvx" type="SuGBQogD9iYR"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="rmX8szaEjYYW" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="oN4LKn3BDpUk" type="dsRw8nRMsxE8" value="" name="rx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="aebVMPzEBVK4" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="TZagO5Qxh1S3" comment="Called when the PHY processor receives a preamble.&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param current_tick the current Network Clock tick&#xa;@return bool" name="receivePre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EqFgJ2KIRLLt" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="RRHauaeNStYt" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="fC6nucEOAn2Y" type="Fls26ZE3bRdo" value="" name="current_tick"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="sTVXSvarLqSF" comment="Called when the PHY processor receives a frame control.&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param current_tick the current Network Clock tick&#xa;@return bool" name="receiveFc">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WoECGdxv9oz6" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Q4csx9jbJnOE" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OaaYNc4D3YkW" type="Fls26ZE3bRdo" value="" name="current_tick"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="TLNmBp2ZucPp" comment="Sets the tonemask.&#xa;@param p_tonemask the new value of mpTonemask&#xa;@return bool" name="setTonemask">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9OUtmNo1C3fT" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="l7O5umHGLpmi" type="S02STVfDWPXk" value="" name="p_tonemask"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="RruVNezoxMb6" comment="Sets the tonemap of the current transmission.&#xa;@return bool&#xa;@param tx_station_id the ID of the transmitting station&#xa;@param length the tonemap length in octets&#xa;@param p_tonemap the tonemap" name="setTonemap">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="3zjTK4Mpsa16" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Adf2F3pzAE22" type="dsRw8nRMsxE8" value="" name="tx_station_id"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="0HHJ630Xsu0F" type="qtOabrV06r8H" value="" name="length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Yz4UKfaSGEUT" type="Z3mduvueNb9d" value="" name="p_tonemap"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="HHSPVSPUjgnp" comment="Sets the beacon period in ticks 25 MHz.&#xa;@return bool&#xa;@param frequency the power-line frequency" name="setBeaconPeriod">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Cy0LlxPuLrl7" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="knLchJsEHugb" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="XG1nSTEjkf6G" comment="Gets the beacon period in ticks 25 MHz.&#xa;@return mBeaconPeriod" name="getBeaconPeriod">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="DZ6Palsdib43" type="O74yXfkidyrR"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4xqo1eJwmBM3" comment="class Sta" name="Sta">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="zRkSwGNALXUk" type="8HFYeCh1V2Tr" comment="// private attributes// " name="mpSystemManager"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="7ZaQNgZJ8zsD" type="uNcSkNqyAxHb" name="mStationId"/>
- <UML:Attribute visibility="private" isSpecification="false" ownerScope="classifier" xmi.id="fHVjp6noe6bA" type="Afzv7B0Suvrw" comment="Each 'Sta' instance points to an eCos process (via 'mStationId').&#xa;When a 'Sta' is created from a Python script,&#xa;the 'Sta' copy constructor is called by the Boost.Python interface.&#xa;Thus, several 'Sta' instances point to the same eCos process.&#xa;The eCos process has to be stopped only when the last 'Sta' pointing to it is deleted,&#xa;i.e. when the station counter defined below equals 1." name="mStaCounter"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="lyCfKZjGyLKp" type="E5x9L9RNrd6t" comment="// private attributes// // used for 'Maximus::process()' method only" name="mpMaximus"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vDy8rHM8FLMJ" comment="Copy constructors" name="Sta">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="dz8u1efxrd3g" type="GgjUKN39BDXg" value="" name="sta"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sNo5i8Pxn6R7" comment="Empty Destructor" name="~ Sta"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RUGdflJGlQBk" comment="// public methods// /**&#xa;@return Sta &amp;&#xa;@param sta" name="operator =">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="eRqUzrb9obUZ" type="lNFLPGC5GcjE"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="4qftRiZI6LNm" type="GgjUKN39BDXg" value="" name="sta"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UmjHrAMIcdtF" comment="Remove an existing station." name="remove"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ODW7bhsfVXYu" comment="Deactivate an existing station,&#xa;i.e. the station will not receive Maximus messages anymore, until it will be reactivated." name="deactivate"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="G5CKQa6sKq79" comment="Reactivate a deactivated station." name="activate"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="yUSZ5LoTWKb7" comment="Launch a debugger attached to the station executable,&#xa;with arguments passed to main program." name="debug"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LhgpzFvzefRZ" comment="// private methods// // private attribute accessor methods// /**&#xa;@return SystemManagaer *" name="getSystemManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YrRrjCwwj1JJ" type="8HFYeCh1V2Tr"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="umjFKCxPlYn8" comment="@return bool" name="resetStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="k9uTixUMMKrL" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CNRKKIXdzBTw" comment="// public methods//// private attribute accessor methods// /**&#xa;@return Sci_Msg_Station_Id" name="getStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9QVxzxWVnvMU" type="uNcSkNqyAxHb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kNlTyXsQ4Zd6" comment="Indicate if the station is IDLE or not." name="is_idle">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="7GOoHh52o0VW" type="3lgc1KcaMAny"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zYKpWQFd8x41" comment="Set the station name." name="set_name">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Ges7FlOx68R4" type="trv86yL4jfeS" value="" name="station_name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1fMphZ3m8uJa" comment="// Constructors/Destructors// /**&#xa;Constructor" name="Sta">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YswGI6MdbpQd" type="E5x9L9RNrd6t" value="" name="p_maximus"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="OAI3M6TLlpBR" type="TXhtlZjMAp7C" value="" name="p_system_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="NEBT8V1fLvtc" type="trv86yL4jfeS" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bb88X3GmDev9" comment="// private methods// // private attribute accessor methods// /**&#xa;Gets a pointer to Maximus.&#xa;@return mpMaximus" name="getMaximus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vxrHHgcQ65O5" type="E5x9L9RNrd6t"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="3PksAGjP1DIY" comment="class Msg" name="Msg">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="tJbdsVYsSKl5" type="E5x9L9RNrd6t" comment="// private attributes// " name="mpMaximus"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="vTEpSL31kzln" type="FM9MFyrLE5ts" name="mpFunctionCallManager"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="QJhQsq5k8fNy" type="8HFYeCh1V2Tr" name="mpSystemManager"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="8tqZDae63qtT" type="QBMG0J8pDlsx" name="mName"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="Do8JRTHaK87V" type="CxVwuGjKYPlO" name="mListOfParameters"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="glbjaTCkQfeK" type="K1iCj3mMQwQL" name="mCallback"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="QZ9lfEGLyq2Y" type="uNcSkNqyAxHb" name="mStationId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="z0y7xDgOmo7P" type="JCIhsw1mHbC2" name="mpFunctionSciMsg"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="2Ni0DkWUvoBn" type="4Kduenu6BUBZ" name="mResponseReceived"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AsynVX0oIj6T" comment="// Constructors/Destructors// /**&#xa;Constructor" name="Msg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ORHKrcSzSOky" type="E5x9L9RNrd6t" value="" name="p_maximus"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ulkCSqeguboD" type="FM9MFyrLE5ts" value="" name="p_function_call_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jFYYrdRD4hXv" type="8HFYeCh1V2Tr" value="" name="p_system_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="HxtkJdgDMQOp" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="F2T7dHKMVtvK" comment="Copy constructor" name="Msg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="yhUI5s5KuZPV" type="WKXaz2THzK1G" value="" name="msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qkqLblf53Ad1" comment="Empty Destructor" name="~ Msg"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="C4I9PHQNysd1" comment="// public methods// /**&#xa;@return Msg &amp;&#xa;@param msg" name="operator =">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1samouGtAeiQ" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="kjKcIj78RxS0" type="WKXaz2THzK1G" value="" name="msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="GwXCo8DWrX89" comment="@return Msg &amp;&#xa;@param name&#xa;Add a void parameter named name to an existing message,&#xa;i.e. its length is set to 0 and its value is set to NULL.&#xa;Return the message." name="add_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JnS5lvbgsSv7" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="FDGeBgfpjiVx" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PEMADuKTopfa" comment="@return Msg &amp;&#xa;@param name&#xa;@param length&#xa;@param value&#xa;Add a parameter named name to an existing message.&#xa;Its length is set to length and its value is set to value.&#xa;Return the message." name="add_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8YXCbtFaknMW" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xr6pMCwbPCEY" type="trv86yL4jfeS" value="" name="name"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jSjXHM7FDB2Y" type="qtOabrV06r8H" value="" name="length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="yFq9Qshoopbx" type="Z3mduvueNb9d" value="" name="value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AuvPaSB7VxkO" comment="@return Msg &amp;&#xa;@param name&#xa;@param value&#xa;Add a parameter named name to an existing message.&#xa;Its length is set to the size of value string and its value is set to value.&#xa;Return the message." name="add_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="haPqC5GVrgaa" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="sc0EE7pAMfHn" type="trv86yL4jfeS" value="" name="name"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="VzZJo8Fw2AJa" type="trv86yL4jfeS" value="" name="value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="aUh4QRSG2QUE" name="add_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZAFPaAWhg1tG" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XHOsuffPcEhO" type="trv86yL4jfeS" value="" name="name"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="LXpyjWK3OfNQ" type="44n6UGK0XgsS" value="" name="value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="IK1Pxfuzkf5E" comment="@return Msg &amp;&#xa;@param name&#xa;Remove the parameter named name from an existing message.&#xa;Return the message." name="remove_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="t7oduB9ajWQw" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vNER34rMZgII" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BdJZIhyYzzvu" comment="@return Msg &amp;&#xa;@param user_cb&#xa;Register a callback function to an existing function message.&#xa;This callback will be called when the function message response will be received.&#xa;If a callback had already been set, it is replaced by the new one.&#xa;Return the message." name="set_cb">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="aeRRI0zp8EEi" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="sejRLziUc11t" type="eptOVybOJnpM" value="" name="user_cb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gzPgyLadAUzd" comment="@return Msg &amp;&#xa;Remove a registered callback from an existing function message.&#xa;Return the message." name="remove_cb">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NiP3jHHcO6DG" type="g55iEgjQlzYA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Qa0kOp6GSnhn" comment="@return Msg &amp;&#xa;@param sta&#xa;Set destination station to sta for an existing message.&#xa;If a destination station had already been set, it is replaced by the new one.&#xa;Return the message." name="set_sta">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="FMqyrGuRsKq8" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xIp5mpjAPhun" type="lNFLPGC5GcjE" value="" name="sta"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Wz1wkhjV4ypT" comment="Send an existing function message in the asynchronous mode,&#xa;i.e. Maximus does not wait for function message response reception before continuing its execution.&#xa;Note that before sending a function message via this method,&#xa;user has to set its destination station." name="send_async"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="F1XTdEhaWXeI" comment="@param sta&#xa;Send an existing function message to the station sta,&#xa;in the asynchronous mode." name="send_async">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="KLTj2LVWKWT3" type="lNFLPGC5GcjE" value="" name="sta"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DCWI9LjMNEp0" comment="Send an existing message in the synchronous mode,&#xa;i.e. Maximus will wait for function message response reception before continuing its execution.&#xa;Return the received message.&#xa;Note that before sending a message via this method,&#xa;user has to set its destination station." name="send">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="InxQ2B8NrWOb" type="g55iEgjQlzYA"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TUZzzDGJWh3Y" comment="@param sta&#xa;Send an existing message to the station sta,&#xa;in the synchronous mode.&#xa;Return the received message." name="send">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lgB7mNN1jEzY" type="g55iEgjQlzYA"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2Y4L2XOGisWp" type="lNFLPGC5GcjE" value="" name="sta"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ED9bSyZtQ6sQ" comment="@return bool&#xa;@param name&#xa;Return 'true' if the parameter named name exists in the message." name="is_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SsxJCnRUbPub" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="H6hnnkLqGO9H" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vVXbN1ObCXAc" comment="@return unsigned char *&#xa;@param name&#xa;@param length&#xa;@param p_data&#xa;Retrieve contents of the parameter named name.&#xa;Return updated length of the received parameter via length and a pointer to its value via p_data.&#xa;Return NULL if the parameter named name does not exist in the message, else return p_data.&#xa;Note that user has to allocate enough memory for parameter value.&#xa;If parameter value length is unknown, user has to allocate FUNCTION_CALL_PARAM_MAX_SIZE bytes." name="bind_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Y0yOUMzD08Km" type="ObMobD4JO6Fx"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TiVuoMI4SzrG" type="trv86yL4jfeS" value="" name="name"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jSfwypYRV2LK" type="iB4yZDFSik45" value="" name="length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="JTQzBS3tsipq" type="ObMobD4JO6Fx" value="" name="p_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VLI1LbJhDfWm" name="bind_param">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VglDujjKbhdn" type="bQxm3RYu0b9f"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qY5FfIAwlawv" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="iAX0mh0jhwqf" comment="// private methods// " name="bindParameter">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="U5F3S9ey7aMa" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="io9dcJOJTvHF" type="9U1uI8HJT0Jf" value="" name="name_of_parameter_to_get"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="cHyIBmxKHwCX" type="iB4yZDFSik45" value="" name="data_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZCp266GiLEyW" type="2UqTU88CwGoW" value="" name="p_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ztpGp1nrVcLx" comment="// private attributes accessor methods///**&#xa;@return Maximus *" name="getMaximus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vJntQ6gtmP6g" type="E5x9L9RNrd6t"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kR8gfwCE82FE" comment="@return FunctionCallManager *" name="getFunctionCallManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8o0jVcUzfj15" type="FM9MFyrLE5ts"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8VvUhtygnnua" comment="@return SystemManager *" name="getSystemManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="qd3wEOW7fH05" type="8HFYeCh1V2Tr"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pgQIIjG2AOio" comment="@return const ParametersList &amp;" name="getListOfParameters">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Nex921nAposK" type="Ks2QuFd1iYTQ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PR4ADzl2fBKx" comment="@return bool&#xa;@param ParametersList &amp;" name="setListOfParameters">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OKI32J6sw9m8" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="uYz2wfqEXrfQ" type="Ks2QuFd1iYTQ" value="" name="list_of_parameters"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6IRnouDDJFMW" comment="@return cb_t" name="getCallback">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VID9aEEvq95s" type="K1iCj3mMQwQL"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="E7WrGroAPlAK" comment="@return Sci_Msg_Station_Id" name="getStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Bs10erL29d3B" type="uNcSkNqyAxHb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Q1YwqBMuTlhF" comment="@return bool&#xa;@param Sci_Msg_Station_Id" name="setStationId">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="w92qHozk5Ctd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="m0IAkQU8R04H" type="dsRw8nRMsxE8" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="COAd9rtmkIhs" comment="@return FunctionSciMsg *" name="getFunctionSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="O6YFFd5QU4R8" type="58Cx3O5oNLy7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="lQFBQKQagaEq" comment="@return bool&#xa;@param function_sci_msg " name="setFunctionSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tm93NAEHIG7X" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZQDulB1UbGfz" type="Q7aANH0SNANP" value="" name="function_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Y4aFco52tfAG" comment="@return bool" name="isResponseReceived">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="36H8HBlfFJsU" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vAgGJ3fqTskC" comment="@return bool&#xa;@param bool" name="setResponseReceived">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vwtPyIVs2cvP" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ws1pVB3OKjfd" type="3lgc1KcaMAny" value="" name="response_received"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kKTDDDNEw1px" comment="@return std::string" name="getName">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="n7g3MnaPsrX9" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JPVfZIcV8bIc" name="receiveResponse">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mL042dhmy8x9" type="Q7aANH0SNANP" value="" name="function_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JKLFJADdZgG6" name="receiveAsynchronousResponse">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="xsb5TthECgIE" type="Q7aANH0SNANP" value="" name="function_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="d8gn0UhKQQiL" comment="// Constructors/Destructors// /**&#xa;Constructor" name="Msg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="zuK9lGFs5Ase" type="E5x9L9RNrd6t" value="" name="p_maximus"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="H4tPlkPNq48p" type="qcb8l3xv8TRt" value="" name="p_function_call_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Wp9xGpGDkaMT" type="TXhtlZjMAp7C" value="" name="p_system_manager"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qZLtkDY1FPOy" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xzO34XLCmvyg" comment="@return Function_Call_Msg_Id&#xa;Return mpFunctionSciMsg->mSpecializedSciMsgId." name="get_tx_msg_id">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0GmFZfiSZZrX" type="2JrrgMpWtl6M"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="kpNH1ycS3hdJ" comment="@return Function_Call_Msg_Id&#xa;Return mpFunctionSciMsg->mpSpecializedSciMsgHeader->msg_id." name="get_rx_msg_id">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rLPtxIIiQwlm" type="2JrrgMpWtl6M"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JTIcHfu1hcoN" comment="@return bool&#xa;@param cb_t" name="setCallback">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hJ9ZBeg9uTNR" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="FCdx2d7L5NvK" type="vteoFJru7xrN" value="" name="callback"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gjYrACSC9BuB" comment="class PhySciMsgMpdu" name="PhySciMsgMpdu">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="D8KuNhepKAPe"/>
- <UML:Generalization xmi.idref="mRseT4TBFAfy"/>
- <UML:Generalization xmi.idref="I5POjRXvITtd"/>
- <UML:Generalization xmi.idref="LDY16XoozXTL"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="M2LZCyY6pGdk" type="LIcXhcTtT8Bn" comment="// private attributes// " name="mPayloadLength"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="CK2gDNwU6enG" type="ObMobD4JO6Fx" name="mpPayload"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="131qHeYSxZ6A" type="vFBbZkjwm4Vx" name="mpPre"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="aFQc6PzmnrBh" type="4XSkb7G7HX8a" name="mpFc"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="d4vdm39XH5iE" type="qzlFUs4gsJKl" name="mNbOfPbsInLastMsg"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="mBRb0wQvPAtZ" type="Ny9n9LLzEhXo" name="mPbsArray"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0X10zUZAnpwn" name="segment"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KsBy2uT9wopo" name="reassemble"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7TE2jX8Ma10K" comment="// Constructors/Destructors// /**&#xa;Constructor&#xa;Creates a PHY SCI message of type MPDU_PAYLOAD.&#xa;@param p_phy_processor a pointer to the PHY interface" name="PhySciMsgMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="57rMCXYwiyXg" type="DEOmV9sHIiVw" value="" name="p_phy_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uvcJ4TrBw5Bf" comment="Copy Constructor&#xa;Creates a PHY SCI message of type MPDU_PAYLOAD.&#xa;@param phy_sci_msg a PHY SCI message" name="PhySciMsgMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="bI2BJ0VM5KgH" type="w18nsvnfKlCn" value="" name="phy_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="rFBZBjF5cpNg" comment="Empty Destructor" name="~ PhySciMsgMpdu"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tUvwobDdoOAz" comment="Sets the PHY SCI message class attributes before transmission,&#xa;and fills specialized SCI msg data length and specialized SCI msg data&#xa;for a PHY message of type MPDU_PAYLOAD.&#xa;@param clock_id ID of the Network Clock event received message&#xa;@return bool" name="prepare">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="63ufcjCT4cK0" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="5O3gBQMUcAgr" type="2OUKpDmUU6Tg" value="" name="clock_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9ZiQQhyHAtDw" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Gets the MPDU payload length.&#xa;@return mPayloadLength" name="getPayloadLength">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uaiIWS4BlBlu" type="qtOabrV06r8H"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="TQaHmiFq6IUI" comment="Gets the MPDU payload.&#xa;@return mpPayload" name="getPayload">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="pR4jsP9yS3d2" type="Z3mduvueNb9d"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gqkGyQ57xlXN" comment="@param length the new value of mPayloadLength&#xa;@param p_payload the new value of mpPayload&#xa;@return bool" name="setMpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="mqTpQnpILXbr" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="RUebNpVoD540" type="qtOabrV06r8H" value="" name="length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="mJosZIAD6tR5" type="Z3mduvueNb9d" value="" name="p_payload"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JWCFIicjCFIX" comment="Gets the PHY SCI message PREAMBLE.&#xa;@return mpPre" name="getPre">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xf0jplbeBdM3" type="vFBbZkjwm4Vx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4nMIrOGdf2TE" comment="Gets the PHY SCI message FC.&#xa;@return mpFc" name="getFc">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="2V0SYdUIRx7r" type="4XSkb7G7HX8a"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KcPOVqRmKc1a" comment="Gets the number of PBs into the last PHY SCI message composing the MPDU.&#xa;@return mNbOfPbsInLastMsg" name="getNbOfPbsInLastMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iwA3SlsPOt6D" type="qZLXuibBNXID"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KeHWrZ1vLLBC" comment="Sets the number of PBs into the last PHY SCI message composing the MPDU.&#xa;@param nb_of_pbs_in_last_msg the new value of mNbOfPbsInLastMsg&#xa;@return bool" name="setNbOfPbsInLastMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ciqnLCpMfpoB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jRnOTGalsz8L" type="qZLXuibBNXID" value="" name="nb_of_pbs_in_last_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pZ8899iTn0xc" comment="Gets a pointer to the PBs of the nth PHY SCI message composing the MPDU.&#xa;@return &amp;mPbsArray[n*PHY_PB_MAX_NB*MAC_PB520_BYTES]" name="getPbs">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="QHTsEZhvTpyv" type="Z3mduvueNb9d"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZxYuIj429rOa" type="qZLXuibBNXID" value="" name="n"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6zKyySKmzQu9" comment="Checks if the PHY SCI message has been sent (MPDU, or FC in case of a short PPDU).&#xa;@return (mIsSent || mpFc->mIsSent)" name="isSent">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="apJxiN8K5w6P" type="3lgc1KcaMAny"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZcaLcWxATT2j" comment="Checks if the MPDU has been completely received&#xa;(i.e. all PHY SCI messages MPDU composing the MPDU have been received).&#xa;@param nb_of_received_msgs number of PHY SCI messages MPDU that have been received&#xa;@return nb_of_received_msgs == mNbOfMsgs " name="isReceived">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6tjliXw6oOy1" type="3lgc1KcaMAny"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="D5lKwAu07Ex5" type="qZLXuibBNXID" value="" name="nb_of_received_msgs"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="eFrcfjjEKJZu" comment="Sets the PHY SCI message Frame Control mode for PREAMBLE, FC and MPDU.&#xa;@return bool&#xa;@param fc_mode the new value of mFcMode, mpPre->mFcMode and mpFc->mFcMode" name="setFcMode">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xeuOTsI2fbzN" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="nV4Ey5yBAhT4" type="8JusFMjAgM0v" value="" name="fc_mode"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pM5wa20DHppw" comment="Sets the PHY SCI message short PPDU for PREAMBLE, FC and MPDU.&#xa;@return bool&#xa;@param short_ppdu the new value of mShortPpdu, mpPre->mShortPpdu and mpFc->mShortPpdu" name="setShortPpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="w5i02mP8f6sL" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZY8tpinbDqpB" type="nLEyCkrlHPQw" value="" name="short_ppdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vlL3Rm7G8CDj" comment="Sets the PHY SCI message modulation for PREAMBLE, FC and MPDU.&#xa;@return bool&#xa;@param mod the new value of mMod, mpPre->mMod and mpFc->mMod" name="setMod">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="doRQAOP72JUT" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="CBuT0jNZFWQ2" type="UxIGEVkWi0NJ" value="" name="mod"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CEdN2RWxCr0d" comment="Sets the PHY SCI message FEC rate for PREAMBLE, FC and MPDU.&#xa;@return bool&#xa;@param fecrate the new value of mFecrate, mpPre->mFecrate and mpFc->mFecrate" name="setFecrate">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9mVpLSAHWqHW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="c5skG5RSELwE" type="pwe3pKqZPxkb" value="" name="fecrate"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2HoHnEKxQvKS" comment="Sets the PHY SCI message Guard Interval for PREAMBLE, FC and MPDU.&#xa;@return bool&#xa;@param gil the new value of mGil, mpPre->mGil and mpFc->mGil" name="setGil">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="cecHkUcMH4mR" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="MrNZgLAIR23h" type="0cEqYhKKEcTV" value="" name="gil"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5U9Jo3YqLK66" comment="Sets the PHY SCI message flags for PREAMBLE, FC and MPDU.&#xa;@return bool&#xa;@param flags the new value of mFlags, mpPre->mFlags and mpFc->mFlags" name="setFlags">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Q9XQQ1tXnPM8" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YQ2xJMPgDnDu" type="ee5ipO9TkcLk" value="" name="flags"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="8NAXODETgMlU" comment="Gets the Frame Control 1.0 of the PHY SCI message FC.&#xa;@return mpFc->mFc10" name="getFc10">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rVNNLfryJUD2" type="ylvhNGRUzc7S"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PJKidQn9op68" comment="Sets the Frame Control 1.0 of the PHY SCI message FC.&#xa;@param fc_10 the new value of mpFc->mFc10&#xa;@return bool" name="setFc10">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="yqOFs8hGHCgh" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9WmNHzFNMNvk" type="ylvhNGRUzc7S" value="" name="fc_10"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="b7CFTxjrG3Xr" comment="Gets the Frame Control AV of the PHY SCI message FC.&#xa;@return mpFc->mFcAvArray" name="getFcAv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="DZEyyZ4o4R9N" type="t2asNnHh8wsl"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SIyE55KFZ6co" comment="Sets the Frame Control AV of the PHY SCI message FC.&#xa;@param fc_av the new value of mpFc->mFcAvArray&#xa;@return bool" name="setFcAv">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="41LMVXORNmhD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="5pBQC48lAK0d" type="ylvhNGRUzc7S" value="" name="fc_av[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HjSVlyKBGJNM" comment="// private methods// /**&#xa;Initializes the PHY SCI message class attributes.&#xa;Fills PHY SCI message type.&#xa;@param p_phy_processor a pointer to the PHY interface" name="initAttributes">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="MibvoBhuyqK8" type="DEOmV9sHIiVw" value="" name="p_phy_processor"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Awyu6tX5fqlW" name="Error">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="oHaNwpXsoPxf"/>
- <UML:Generalization xmi.idref="eRWRUKUohuHk"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="1rwjdmsw4F7l" type="fuM43CRtzagH" name="mErrorId"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="UpNCk1jKLyAY" type="QBMG0J8pDlsx" name="mFunction"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Mdk82fnxh6hS" name="Error">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="rn8nJHfdsNjt" type="vQ1S2XzSPBqN" value="" name="function"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3VqkbXBVvAvw" type="vQ1S2XzSPBqN" value="" name="msg"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ub9nl5jQx5S1" type="pJsfgcYj7OSg" value="" name="error"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="IuuFSaUFrNuX" name="~ Error"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xTF4pfijGsXz" name="getFunction">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uMT9W7ohg2fd" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vGPsKptcjnp9" name="getErrno">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZhPb8WzDVIZy" type="fuM43CRtzagH"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LKMChHicixgX" name="getMessage">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nvQAh5LZPmiv" type="QBMG0J8pDlsx"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="cMHqCmp70C0K" name="display"/>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="XlAIxWJ0t2q4" name="tick_t"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" elementReference="HYl1HlhGNnFB" isRoot="false" xmi.id="WHPnnVHQeFGi" name="MsgsList"/>
- <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" elementReference="rRJOS4Ahavgr" isRoot="false" xmi.id="eL818LAcaZPN" name="StasList"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="IZRHkhpzqhMU" comment="class Maximus" name="Maximus">
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="zitjPGm6qY09" type="nHLqdVHOsxNM" comment="// private attributes// " name="mpCoreEngine"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="5qTvnqHkXBRu" type="SAh1zCEmUab7" name="mMaximusLogFile"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="DPrhzQm3HEy2" type="PDzFlxMB73D7" name="mMaxTickValue"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="2EnZNESmSPzB" type="PDzFlxMB73D7" name="mWaitTickValue"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="xiKXdCEggIcz" type="WHPnnVHQeFGi" name="mListOfMsgs"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="EOZVZ8expr8W" type="eL818LAcaZPN" name="mListOfStas"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="KqCUniraUydb" type="4Kduenu6BUBZ" name="mIsWireshark"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="jSxqHDZ353l5" type="WO0VJglkKJD1" name="mEtherLogFileDescriptor"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xRABKcNpOV5J" comment="// Constructors/Destructors// /**&#xa;Empty Constructor" name="Maximus"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zPHtP7vheMwO" comment="Empty Destructor" name="~ Maximus"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1lMrQiLN9TXR" comment="// public methods// /**&#xa;@param argc&#xa;@param argv&#xa;Initialize Maximus with main program arguments." name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3sHRNMkKjzB8" type="UOc7OI8LRuFv" value="" name="argc"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="BZGJ2lk4dzVy" type="66nkQj7RUTGt" value="" name="argv[]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KEJ1DUAIZv2z" comment="This method handles messages reception and events processing.&#xa;When called, Maximus processes:&#xa;- received messages from all simulated stations at the current tick;&#xa;- all Maximus simulator events of the current tick." name="process"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="f9P7af0mFF3F" comment="@return Sta&#xa;Create a new station.&#xa;Return a station object." name="create_sta">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tUcaWFB4wad2" type="4xqo1eJwmBM3"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0lJclna3zr4A" comment="@return Msg&#xa;@param name&#xa;Create a function message, which name is set to name.&#xa;Return a message object." name="create_fc">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="4aFarmYehynM" type="3PksAGjP1DIY"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="QDVP4YZOi0Ho" type="trv86yL4jfeS" value="" name="name"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="T8Z3NQEGH7ML" comment="@return Msg&#xa;Create a probe message.&#xa;Return a message object." name="create_probe">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="18vQtbJm5vKa" type="3PksAGjP1DIY"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5iNpL2FlFj8H" comment="@param value&#xa;Wait until (Maximus current tick + value) is reached." name="wait">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="lMh0U4LZkhM5" type="Hfgxfxm85LAR" value="" name="value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jcowJuBaZrXF" comment="Wait until all responses to sent function messages in asynchronous mode are received." name="wait"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MJLSMWZZvOFv" comment="// private methods// /**&#xa;@return CoreEngine *" name="getCoreEngine">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8Tc43F76oKgf" type="nHLqdVHOsxNM"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="p1y6Fu8I8tpV" comment="@return SystemManager *" name="getSystemManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5EHmB47AB0b4" type="8HFYeCh1V2Tr"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Y0PUMeNBdLFt" comment="@return FunctionCallManager *" name="getFunctionCallManager">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="cuofo7Duanzc" type="FM9MFyrLE5ts"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HZrnbKc8I1af" comment="@return NetworkClockProcessor *" name="getNetworkClockProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="14ipMOSRajCj" type="dxoHI48VOHpd"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DhxPkoG1N7ox" comment="@return PhyProcessor *" name="getPhyProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="oJuzJV1tNpX9" type="QR5iQfL4cAJs"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CRLagBBtq8Ha" comment="@return SciServer *" name="getSciServer">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="wi4XW17X5pMP" type="xXbKcOH2nKjB"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="z4DZCWPOvlyb" comment="@return Network_Clock_Tick" name="getMaxTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="BorlV1VJIPGb" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wATkGiKDFtWr" comment="@return bool&#xa;@param max_tick_value" name="setMaxTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="sHTF7yN1gRWC" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="w2Crl9RfHsPX" type="Fls26ZE3bRdo" value="" name="max_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ahjnbDcoyUr4" comment="@return Network_Clock_Tick" name="getWaitTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SdhVQ3sbphNL" type="PDzFlxMB73D7"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="136dSjRMjbCV" comment="@return bool&#xa;@param wait_tick_value" name="setWaitTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="isc0Fta781KD" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="kdAzTaV1HCoq" type="Fls26ZE3bRdo" value="" name="wait_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PQfLtUOuVUXx" comment="// public methods///**&#xa;Constructor (FOR UNITARY TESTS ONLY)" name="Maximus">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="DwIwYURG5cEY" type="nHLqdVHOsxNM" value="" name="p_core_engine"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" ownerScope="classifier" isRoot="false" xmi.id="AjZRvLGIjvda" name="wrapper">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="N1TsVyngv5dR" type="UOc7OI8LRuFv" value="" name="n"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="X2hccv8mcfCV" name="stop"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="myq7G2MbZKOn" comment="@param interface_cb&#xa;Initialize PHY with an interface callback function for PHY SCI message MPDU reception." name="init_phy">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="N3jiJxCoOQt2" type="lmHNZqFB8Nj8" value="" name="interface_cb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ReIMjhiTdYYt" comment="@param ether_cb&#xa;Initialize Ethernet with an interface callback function for Ether SCI message reception." name="init_ether">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YQxuqpwGTEaA" type="ZsS6AptYsaG9" value="" name="interface_cb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fKjXuyfQOaKD" comment="@return Sta &amp;&#xa;@param station_executable the station executable to run&#xa;Create a new station.&#xa;Return a reference on a station object." name="create_sta">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zfFd6jqWNXzl" type="lNFLPGC5GcjE"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="PHTqT31NKbt9" type="trv86yL4jfeS" value="" name="station_executable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Zk3mOOuxMTvs" comment="Creates a PHY SCI message MPDU.&#xa;Returns a pointer to a PHY SCI message MPDU object.&#xa;@return PhySciMsgMpdu *" name="create_mpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZsNMXkfGaGEn" type="ihg5BF2ckirV"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="K6oQkbzQMuPj" comment="Sends an already configured PHY SCI message MPDU. &#xa;@param p_mpdu&#xa;@return bool" name="send_mpdu">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="kWnp7b5gK8Tg" type="ihg5BF2ckirV" value="" name="p_mpdu"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ULdooZg6fVWO" comment="Creates an Ether SCI message.&#xa;Returns a pointer to an Ether SCI message object.&#xa;@return EtherSciMsg *" name="create_ether">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9osHnCVmsiOw" type="812hl7Twm80d"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="6UmQO996fuvn" comment="Sends an already configured Ether SCI message.&#xa;@param ether&#xa;@return bool" name="send_ether">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="U0Ro8sUcE7Q0" type="3Q4QiXaDv1Kh" value="" name="ether"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BWqEwugW6DjD" comment="Enable or disable the channel perturbation." name="disturb_channel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ejl688eOwosq" type="3lgc1KcaMAny" value="" name="enable"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LLPxuF93mzIi" comment="Get the Network Clock current tick." name="get_date">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="RERmjOYGEvbm" type="Hfgxfxm85LAR"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uwC09tBoaxsj" comment="Set the power line frequency." name="set_freq">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="3W5xIwmcHBZB" type="EQrcJtA2vC7c" value="" name="frequency"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="QjDAgVtaR3ZY" comment="Get the power line frequency." name="get_freq">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="dE0BUEyb1qro" type="EQrcJtA2vC7c"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CmISlngwj5jf" comment="Gets a pointer to Channel&#xa;@return mpCoreEngine->mpChannel" name="getChannel">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="0MZq2xlR9ACs" type="h0fjFQ6XJMWi"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CfgdedIp2S9u" comment="Gets a pointer to Ethernet&#xa;@return mpCoreEngine->mpEthernet" name="getEthernet">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Yk7ldgXEuXPP" type="xqe85s2v3X76"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZRWilA5HYL4X" comment="Set the SNR." name="set_snr">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="9OGozBkjrFAQ" type="EQrcJtA2vC7c" value="" name="snr_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="GGK4gGiFhFyR" name="set_snr">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="N1iwKkTT8kH7" type="trv86yL4jfeS" value="" name="snr_file"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="t0olDy9TFRVv" name="set_snr_from_src">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="fE9LT7mq6UmR" type="EQrcJtA2vC7c" value="" name="snr_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="EEsKw8Pp8EYL" type="GgjUKN39BDXg" value="" name="src"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="CimR7ILnUU8v" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZujdMU2Yivse" name="set_snr_from_src">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1HT9V0SiiC7p" type="trv86yL4jfeS" value="" name="snr_file"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="SQawuirRaZ5w" type="GgjUKN39BDXg" value="" name="src"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="37Ul0MN1coA7" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oanUnvIFLsAE" name="set_snr_to_dst">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Zzf9Yi4bqYKo" type="EQrcJtA2vC7c" value="" name="snr_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="thqVUyaIZOnM" type="GgjUKN39BDXg" value="" name="dst"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="J5ZcvhqUhUcF" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Cgp0C9p3rfYJ" name="set_snr_to_dst">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="d9bAVMUmP2OL" type="trv86yL4jfeS" value="" name="snr_file"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jDnQhPer3TqG" type="GgjUKN39BDXg" value="" name="dst"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="cfJRIqktxK4S" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gYC6aaPInAiS" name="set_snr_from_src_to_dst">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="YMIbn8pQl7p3" type="EQrcJtA2vC7c" value="" name="snr_value"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="vYuqsyGYVSc3" type="GgjUKN39BDXg" value="" name="src"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="2zLo82EgMWFA" type="GgjUKN39BDXg" value="" name="dst"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="c3YNALQ3tLtl" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="H9Ikbsmbq7Py" name="set_snr_from_src_to_dst">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="7ceU6tcju864" type="trv86yL4jfeS" value="" name="snr_file"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TV5Loy657Mog" type="GgjUKN39BDXg" value="" name="src"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="DaI3ff1nHfFO" type="GgjUKN39BDXg" value="" name="dst"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="Wp7RxBTOgZjU" type="3lgc1KcaMAny" value="" name="both_directions"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="XoYdAMJNuZQZ" comment="Activate wrong preambles transmission.&#xa;@param average_duration average number of ticks 25 MHz between two consecutive wrong preambles&#xa;@param std_deviation the standard deviation" name="activate_false_alarm">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="FPKU2XsZMxyH" type="Fls26ZE3bRdo" value="" name="average_duration"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="7PenwNISBo5K" type="EQrcJtA2vC7c" value="" name="std_deviation"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MUgWMFI5Q9BP" comment="@param snr_file the SNR file to read&#xa;@param the SNR array read from the SNR file&#xa;@return bool" name="readSnrFile">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lLym9pb998yB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="bafle9ZNgYEz" type="trv86yL4jfeS" value="" name="snr_file"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="gZUbPQzkugGE" type="nJsED87p1vHp" value="" name="snr_array[][]"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VP73tU02COsN" comment="Deactivate wrong preambles transmission." name="deactivate_false_alarm"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EaaxRVWq8622" comment="Indicate if the station is IDLE or not.&#xa;@param station_id the ID of the station&#xa;@return 'true' if the station is IDLE, 'false' otherwise" name="is_station_idle">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5jdEtn4PXBA8" type="3lgc1KcaMAny"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="enYNTWBP9rZM" type="uNcSkNqyAxHb" value="" name="station_id"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="VQBIn8O3Ni0O" comment="Indicates if Wireshark is enabled or not.&#xa;@return 'true' if Wireshark is enabled, 'false' otherwise" name="isWireshark">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rhKkCh7y25iB" type="3lgc1KcaMAny"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CpGnr2lIA5kk" comment="class EtherSciMsg" name="EtherSciMsg">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="knNFU41hWrYt"/>
- <UML:Generalization xmi.idref="OKhFhtT3InZ0"/>
- <UML:Generalization xmi.idref="b5C38IYyUjh0"/>
- <UML:Generalization xmi.idref="gipeZdVAO1cK"/>
- <UML:Generalization xmi.idref="lUOyLKnJycgv"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="GdKdWdg4NGY7" type="TCtwHZhr7lwx" name="mSpecializedSciMsgType"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="23cO33fVVAlY" type="bErx1XNsRKIs" comment="// Specialized SCI msg header//" name="mSpecializedSciMsgHeader"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="hyvcrFKQTBNS" type="xqe85s2v3X76" name="mpEthernet"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="SbeM9S2GCU1b" type="ZWryYSGDRuyu" name="mSnifferType"/>
- <UML:Attribute visibility="protected" isSpecification="false" xmi.id="Ih3AfxA6ZmSg" type="cQhYUO60E2We" name="mFlags"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZVEqr9b3kvEo" name="dispatchMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vHI4PGEUzrgq" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xmrmTGUZsjm6" name="create">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="clG9wQFm8ZWI" type="hHn4fFvgbLYX"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5PTEweBcay3f" name="identifySpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="GbGGgxRbCjga" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4HFCv7KG4okb" name="checkCompatibility">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="yu2xjjoLU4SQ" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="t5ZfMqGz8SO4" name="checkValidity">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="SfAaCetQF7gw" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hTJ4qGQnRKKO" name="displaySpecializedSciMsgHeader"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jdje2NSCHn0X" name="returnSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="25VDmBnk3pgk" type="TYfZTukOB7DK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fu3Bt2ilRO8b" name="getSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YU32WTRy6bXI" type="PwWdyuRfg8qc"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jiK82b13cdRe" comment="// Constructors/Destructors// /**&#xa;Constructor" name="EtherSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="e499EsftpbWg" type="xqe85s2v3X76" value="" name="p_ethernet"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="oq6G1Sii81r9" comment="Empty Destructor" name="~ EtherSciMsg"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OhUFXSXch1iI" comment="Display the specialized SCI message type." name="displaySpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="zpc6foN11LmP" type="UOc7OI8LRuFv" value="" name="log_level"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CFZjc4qzlJCI" comment="// public attribute accessor methods// // private attribute accessor methods// /**&#xa;Gets a pointer to the Ethernet processor.&#xa;@return mpEthernet" name="getEthernet">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EOgTTMNUPthA" type="xqe85s2v3X76"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZRrykd0pi3v9" comment="Sets the value of the Ethernet SCI message header.&#xa;@return bool&#xa;@param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader" name="setSpecializedSciMsgHeader">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="2Uu4JYoq2qqW" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="qQpsUBXaM7Pq" type="8DcrWo7HU0iD" value="" name="specialized_sci_msg_header"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uX8OVoZ3EQ1w" comment="Gets the Ether SCI message type.&#xa;@return mSpecializedSciMsgType" name="getSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="HHTMrye5MLWn" type="HTUXG3XFPxuK"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1zmj0htq6giY" comment="Sets the Ether SCI message type.&#xa;@return bool&#xa;@param type the new value of mSpecializedSciMsgType" name="setSpecializedSciMsgType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fuH3nyDpQ7ti" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="v8a9YZ5XWpFW" type="pE9AJY0D36ZX" value="" name="type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="V6Mbm29ZEGjY" comment="// private methods// /**&#xa;Initializes the Ether SCI message class attributes." name="initAttributes"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1BJ3iBb540Tu" comment="Gets the Ether SCI message SNIFFER type.&#xa;@return mSnifferType" name="getSnifferType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ggYgUOBjec5T" type="ZcxOLFwJIm1Z"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dtwr1t715Q4l" comment="Sets the Ether SCI message SNIFFER type.&#xa;@return bool&#xa;@param sniffer_type the new value of mSnifferType" name="setSnifferType">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="akWu32hguxjf" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZdqbcKW9uTXG" type="ZcxOLFwJIm1Z" value="" name="sniffer_type"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gRXwDYVqPShR" comment="Gets the Ether SCI message flags.&#xa;@return mFlags" name="getFlags">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vwVK2M2g2aKU" type="LmSODUAk50Mh"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="IqrDHMTxo0t1" comment="Sets the Ether SCI message flags.&#xa;@return bool&#xa;@param flags the new value of mFlags" name="setFlags">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="wTEY5Jzd1VX2" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="WOqwoVLAIlWT" type="LmSODUAk50Mh" value="" name="flags"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class stereotype="typedef" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZsS6AptYsaG9" name="EtherCb"/>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="PKaM1HoCDbbs" comment="class ISci" name="ISci">
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9XqhABel8vQp" name="ISci"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NEwBjALDOYLZ" name="~ ISci"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="1d6wHoJQJ85R" comment="// public methods// /**&#xa;@return bool&#xa;@param station_log_file " name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WDhOAQ43LZNL" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="JkAPdbFyn97X" type="9U1uI8HJT0Jf" value="" name="station_log"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="HTkd14D2hHxy" comment="@return bool " name="process">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tP1wxJOsncOq" type="4Kduenu6BUBZ"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="5GNMOQlf8w5j" comment="@return bool&#xa;@param sci_msg_to_send" name="fillSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uOUtrzwNCbkK" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="XIhIRnpgEaJF" type="3McdnqE6JCta" value="" name="sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="eUFJlAFoRa8n" comment="@return bool&#xa;@param sci_msg_to_send" name="sendSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1oMKLjfE7e82" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="1uT9qWtLmYdB" type="xSzXJBSHo8yn" value="" name="sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="LRrZ1Amdd0uO" comment="@return bool&#xa;@param sci_msg_to_send" name="sendSciMsgToAllActiveStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="yXsj7FX1dztU" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="A9BZiJLjDoq1" type="3McdnqE6JCta" value="" name="sci_msg_to_send"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="IhK4EwFZN47M" comment="@return bool&#xa;@param sci_msg_to_send&#xa;@param list_of_dest_stations" name="sendSciMsgToDestStations">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="znq9OaSNMoih" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="CrxpprCyyLVg" type="3McdnqE6JCta" value="" name="sci_msg_to_send"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="69fRDmnObkBP" type="eqNqcEputAw7" value="" name="list_of_dest_stations"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="ZNNXgsCLjZ9L" comment="Set a value into mpSpecializedSciMsgArray&#xa;@return bool&#xa;@param sci_msg_type the array position to set&#xa;@param sci_msg the new value of mpSpecializedSciMsgArray[sci_msg_type]" name="registerSpecializedSciMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VNva24bybRfi" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="lyEf68mAIRbT" type="EknMLJBAPpgo" value="" name="sci_msg_type"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="BOrl63AfOVB5" type="hHn4fFvgbLYX" value="" name="sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="NNO4wVOiTcLY" comment="@return bool&#xa;@param header&#xa;@param data_length&#xa;@param received_data" name="receiveMsg">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="gAiJAZm9MaGk" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="k7i0XISgeHPl" type="erAlIci9mSIq" value="" name="header"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="IZOh4ZkQu6Up" type="qtOabrV06r8H" value="" name="data_length"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="bsX2SqaBvH9S" type="Z3mduvueNb9d" value="" name="received_data"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="Zb7DtWwB4Jq6" name="displaySpecializedSciMsgArray"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="saWlezaFp5GI" comment="@return bool&#xa;@param p_list_of_stations" name="setStationsList">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="8i7UUp90B4YB" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="voRq5aHcAOo3" type="cKqCpL4vHbUA" value="" name="p_list_of_stations"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="skCu331ubVfG" comment="@return bool&#xa;@param current_tick_value" name="updateTickValue">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="897hbmOFw4X4" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="SDTIIjYDYx1b" type="Fls26ZE3bRdo" value="" name="current_tick_value"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RYfxHmW7DMwU" comment="class EthernetProcessor" name="EthernetProcessor">
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="lfdP22D7S0Ta"/>
- <UML:Generalization xmi.idref="P1Cz8K6JKeJ1"/>
- <UML:Generalization xmi.idref="ZMYd8VSqVZW8"/>
- <UML:Generalization xmi.idref="9YrE9VtnAraO"/>
- <UML:Generalization xmi.idref="f87MTBfY1bqe"/>
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="h1VbdRCaUhXy" type="xXbKcOH2nKjB" name="mpSciServer"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="5jpVjJ5eUWHB" type="T3wGzLaOdJRi" comment="// private attributes//" name="mpSci"/>
- <UML:Attribute visibility="private" isSpecification="false" xmi.id="anXgN3gO83dY" type="ZsS6AptYsaG9" name="mInterfaceCb"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="dl2c23XnlfHK" name="registerEtherSciMsg"/>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="51fn4DV8wLde" comment="// Constructors/Destructors// /**&#xa;Constructor" name="EthernetProcessor">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ejI6DaHlLnRh" type="T3wGzLaOdJRi" value="" name="p_sci"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="q75x8gTDh81k" comment="Empty Destructor" name="~ EthernetProcessor"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="LWsFrVtTCAaN" comment="// public methods// /**&#xa;Initializes Ethernet with an interface callback function for Ether SCI message reception.&#xa;@param interface_cb&#xa;@return bool" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="dJBzrShx8oPd" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ip83cZkReoOm" type="ZsS6AptYsaG9" value="" name="interface_cb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Sr08zzsITkVJ" comment="Creates an Ether SCI message.&#xa;@return EtherSciMsg *" name="createEther">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="cYblc7wjH3Qq" type="812hl7Twm80d"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DNmOVMlDAuEm" comment="Sends an Ether SCI message.&#xa;This message has to be configured before transmission.&#xa;@param ether_sci_msg&#xa;@return bool" name="sendEther">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="no5hqcmTtxSi" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="TxD8lZsBOqJL" type="3Q4QiXaDv1Kh" value="" name="ether_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="p9bJt7c5UMTx" comment="Called when an Ether SCI message is received.&#xa;@param ether_sci_msg&#xa;@return bool" name="receiveEther">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="N9dUw25WYgH9" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="hCAr4MdYJpe2" type="3Q4QiXaDv1Kh" value="" name="ether_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MWClNV6AfiRW" comment="// private methods// /**&#xa;Initializes the Ethernet processor class attributes." name="initAttributes"/>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gXn0KP0fuCQH" comment="Fills the Ether SCI message to send.&#xa;@return bool&#xa;@param ether_sci_msg" name="fillEther">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="lDs2EGq13wgt" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="gUPJCrpzsNEG" type="3Q4QiXaDv1Kh" value="" name="ether_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NOJYkDoPjZP1" comment="Gets a pointer to SCI.&#xa;@return mpSci" name="getSci">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WQNQOn6jxkBr" type="T3wGzLaOdJRi"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="private" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zNgtY48EZXXj" comment="Gets the interface callback function for Ether SCI message reception.&#xa;@return mInterfaceCb" name="getInterfaceCb">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="mGNLueUgpKi3" type="ZsS6AptYsaG9"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WznSGvYzd4Vc" comment="Creates a TAP.&#xa;@param dev name of the TAP file&#xa;@return the created TAP file descriptor" name="allocTap">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="aX2dTgVx7sLT" type="WO0VJglkKJD1"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="jrKaqdDrAOlo" type="66nkQj7RUTGt" value="" name="dev"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="vpDXE2tS2kJL" comment="class IEthernet" name="IEthernet">
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="P4tpXY4qIbJ5" name="IEthernet"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="O0uR0GThUwM5" name="~ IEthernet"/>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="tXgA72aV4SKb" comment="// public methods// /**&#xa;Initializes Ethernet with an interface callback function for Ether SCI message reception.&#xa;@param interface_cb&#xa;@return bool" name="init">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fSCaCORwcmFX" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="0MRGwlLKjFlj" type="ZsS6AptYsaG9" value="" name="interface_cb"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="UCOy9l10GiAM" comment="Creates an Ether SCI message.&#xa;@return EtherSciMsg *" name="createEther">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OhDD1tEaQEBr" type="812hl7Twm80d"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="klrpD9OBVqRR" comment="Sends an Ether SCI message.&#xa;This message has to be configured before transmission.&#xa;@param ether_sci_msg&#xa;@return bool" name="sendEther">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="vgn2W8TAafkk" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="ZmjG0T0SfOQo" type="3Q4QiXaDv1Kh" value="" name="ether_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="7SoM8zisiXft" comment="Called when an Ether SCI message is received.&#xa;@param ether_sci_msg&#xa;@return bool" name="receiveEther">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1Ahcwu9JcMUb" type="4Kduenu6BUBZ"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="g44BsTbRDIhD" type="3Q4QiXaDv1Kh" value="" name="ether_sci_msg"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="zFfoHbK8z1CV" comment="Creates a TAP.&#xa;@param dev name of the TAP file&#xa;@return the created TAP file descriptor" name="allocTap">
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="DjBcvNTo1EqY" type="WO0VJglkKJD1"/>
- <UML:Parameter visibility="private" isSpecification="false" xmi.id="gxJgsrdat2K2" type="66nkQj7RUTGt" value="" name="dev"/>
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="RYfxHmW7DMwU" xmi.id="f87MTBfY1bqe" parent="vpDXE2tS2kJL" name=""/>
- </UML:Namespace.ownedElement>
- <XMI.extension xmi.extender="umbrello">
- <diagrams>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="SciMsg" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="860" canvaswidth="1134" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="4EhFX1CtqLC0" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="0" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="252" showattsigs="601" showstereotype="1" y="29" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="333" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="dBvvR3kpanaF" showscope="1" height="243" showopsigs="600"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="0" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="0" showattsigs="601" showstereotype="1" y="293" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="328" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="kNRjwgcIhcX0" showscope="1" height="99" showopsigs="600"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="0" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="0" showattsigs="601" showstereotype="1" y="406" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="372" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="nMqHFdX6fOJd" showscope="1" height="135" showopsigs="600"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="0" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="0" showattsigs="601" y="563" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="515" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="FBsPeH4gEvUD" showscope="1" height="171" showopsigs="600"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="0" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="615" showattsigs="601" showstereotype="1" y="120" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="325" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="CpGnr2lIA5kk" showscope="1" height="117" showopsigs="601"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="0" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="553" showattsigs="601" showstereotype="1" y="307" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="302" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="Kd2vdgexbsmt" showscope="1" height="549" showopsigs="600"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="1" widgetaid="kNRjwgcIhcX0" linecolor="none" totalcounta="2" xmi.id="qpo9SZnjuaBV" widgetbid="dBvvR3kpanaF" totalcountb="5" type="500" linewidth="none">
- <linepath>
- <startpoint startx="288" starty="293"/>
- <endpoint endx="288" endy="272"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="2" widgetaid="nMqHFdX6fOJd" linecolor="none" totalcounta="2" xmi.id="E1EkeKXGrlqW" widgetbid="dBvvR3kpanaF" totalcountb="5" type="500" linewidth="none">
- <linepath>
- <startpoint startx="372" starty="406"/>
- <endpoint endx="372" endy="272"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="3" widgetaid="FBsPeH4gEvUD" linecolor="none" totalcounta="2" xmi.id="UmoLPXdZOnAp" widgetbid="dBvvR3kpanaF" totalcountb="5" type="500" linewidth="none">
- <linepath>
- <startpoint startx="515" starty="563"/>
- <endpoint endx="515" endy="272"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" widgetaid="CpGnr2lIA5kk" linecolor="none" totalcounta="2" xmi.id="knNFU41hWrYt" widgetbid="dBvvR3kpanaF" totalcountb="2" type="500" linewidth="none">
- <linepath>
- <startpoint startx="615" starty="157"/>
- <endpoint endx="585" endy="157"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="4" widgetaid="Kd2vdgexbsmt" linecolor="none" totalcounta="2" xmi.id="kW8FuRBYKjoB" widgetbid="dBvvR3kpanaF" totalcountb="5" type="500" linewidth="none">
- <linepath>
- <startpoint startx="580" starty="307"/>
- <endpoint endx="580" endy="272"/>
- </linepath>
- </assocwidget>
- </associations>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="SciServer" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="670" canvaswidth="1134" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="Atny37F0n6QB" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="78" showattsigs="601" showstereotype="1" y="90" showattributes="1" font="Sans Serif,10,-1,0,75,0,0,0,0,0" width="1029" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="ElUvZ3tKAVPh" showscope="1" height="576" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations/>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="System" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="1496" canvaswidth="1371" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="atEHLyXN24GN" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="34" showattsigs="601" showstereotype="1" y="21" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="669" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="0dybVkdpO4Ya" showscope="1" height="333" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="35" showattsigs="601" showstereotype="1" y="406" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="671" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="bBWfkvMSUBzc" showscope="1" height="630" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="34" showattsigs="601" showstereotype="1" y="1096" showattributes="1" font="Sans Serif,10,-1,0,75,0,0,0,0,0" width="617" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="kNRjwgcIhcX0" showscope="1" height="396" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="733" showattsigs="601" showstereotype="1" y="364" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="634" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="G1jpotlnS9ne" showscope="1" height="702" showopsigs="601"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="768" showattsigs="601" showstereotype="1" y="1117" showattributes="1" font="Sans Serif,10,-1,5,75,0,0,0,0,0" width="282" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="OvNqoCObl8CH" showscope="1" height="360" showopsigs="600"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="1" widgetaid="bBWfkvMSUBzc" linecolor="none" totalcounta="2" xmi.id="4QEmSahd4YcC" widgetbid="0dybVkdpO4Ya" totalcountb="2" type="500" linewidth="none">
- <linepath>
- <startpoint startx="308" starty="406"/>
- <endpoint endx="308" endy="354"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="kNRjwgcIhcX0" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="mQLltAsASv30" changeabilityB="900" widgetbid="bBWfkvMSUBzc" totalcountb="2" type="501" linewidth="none">
- <linepath>
- <startpoint startx="296" starty="1096"/>
- <endpoint endx="296" endy="1036"/>
- </linepath>
- <floatingtext width="32" x="298" y="1038" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="32" role="702" linecolor="none" xmi.id="Ish6SIHvFmdK" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="0..1" pretext=""/>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="155" showstereotype="1" y="1038" text="mpSystemManager" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="140" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="bq4tywFf87er" height="20"/>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="G1jpotlnS9ne" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="bJkVFWmhwce8" changeabilityB="900" widgetbid="OvNqoCObl8CH" totalcountb="2" type="501" linewidth="none">
- <linepath>
- <startpoint startx="858" starty="1066"/>
- <endpoint endx="858" endy="1117"/>
- </linepath>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="860" showstereotype="1" y="1083" text="0..1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="702" width="32" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="IJzOObGfTvlv" height="32"/>
- <floatingtext width="167" x="691" y="1093" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="710" linecolor="none" xmi.id="jdBPbYJANL4L" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="mpStationConfiguration" pretext="-"/>
- </assocwidget>
- </associations>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="Function_Call" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="1469" canvaswidth="1372" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="GLYii7S9yH7g" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="59" showattsigs="601" showstereotype="1" y="16" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="661" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="2j8N30UlnykR" showscope="1" height="171" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="52" showattsigs="601" showstereotype="1" y="220" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="657" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="Szlq4RFfiqZ0" showscope="1" height="270" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="48" showattsigs="601" showstereotype="1" y="547" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="822" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="FBsPeH4gEvUD" showscope="1" height="918" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="745" showattsigs="601" showstereotype="1" y="191" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="623" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="JEjtehSNwhqe" showscope="1" height="342" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="1" widgetaid="Szlq4RFfiqZ0" linecolor="none" totalcounta="2" xmi.id="FFjd7SEcLuGj" widgetbid="2j8N30UlnykR" totalcountb="2" type="500" linewidth="none">
- <linepath>
- <startpoint startx="255" starty="220"/>
- <endpoint endx="255" endy="187"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="FBsPeH4gEvUD" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="AAzsiwCnuSXK" changeabilityB="900" widgetbid="Szlq4RFfiqZ0" totalcountb="2" type="501" linewidth="none">
- <linepath>
- <startpoint startx="310" starty="547"/>
- <endpoint endx="310" endy="490"/>
- </linepath>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="312" showstereotype="1" y="492" text="0..1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="702" width="32" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="Q9mnVo6l757U" height="32"/>
- <floatingtext width="171" x="141" y="492" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="710" linecolor="none" xmi.id="D0qQnRkU2tsd" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="mpFunctionCallManager" pretext="-"/>
- </assocwidget>
- </associations>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="Network_Clock" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="1574" canvaswidth="1406" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="1jSBKaHUXqWo" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="27" showattsigs="601" showstereotype="1" y="21" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="668" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="pdUJAVtJe39T" showscope="1" height="171" showopsigs="601"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="38" showattsigs="601" showstereotype="1" y="233" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="327" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="l6c6ZbY9k4oU" showscope="1" height="594" showopsigs="600"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="110" showattsigs="601" showstereotype="1" y="994" showattributes="1" font="Sans Serif,10,-1,0,75,0,0,0,0,0" width="661" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="nMqHFdX6fOJd" showscope="1" height="576" showopsigs="601"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="526" showattsigs="601" showstereotype="1" y="215" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="688" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="khBqlcIjqaYa" showscope="1" height="288" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="393" showattsigs="601" showstereotype="1" y="526" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="1009" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="HaP8ZCy8plaL" showscope="1" height="432" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="1" widgetaid="l6c6ZbY9k4oU" linecolor="none" totalcounta="2" xmi.id="isrV4NWwNe9f" widgetbid="pdUJAVtJe39T" totalcountb="2" type="500" linewidth="none">
- <linepath>
- <startpoint startx="324" starty="233"/>
- <endpoint endx="324" endy="192"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="nMqHFdX6fOJd" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="YaNwl3ql1Drs" changeabilityB="900" widgetbid="l6c6ZbY9k4oU" totalcountb="2" type="501" linewidth="none">
- <linepath>
- <startpoint startx="238" starty="994"/>
- <endpoint endx="238" endy="827"/>
- <point x="238" y="915"/>
- </linepath>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="247" showstereotype="1" y="834" text="0..1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="702" width="32" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="Ib8IVyut8ggb" height="32"/>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="47" showstereotype="1" y="837" text="mpNetworkClockProcessor" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="188" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="fL98Hs2Stqte" height="20"/>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="l6c6ZbY9k4oU" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="0cyrqanRieOR" changeabilityB="900" widgetbid="khBqlcIjqaYa" totalcountb="2" type="501" linewidth="none">
- <linepath>
- <startpoint startx="365" starty="286"/>
- <endpoint endx="526" endy="286"/>
- </linepath>
- <floatingtext width="32" x="492" y="252" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="32" role="702" linecolor="none" xmi.id="1ZUsQLWgxcyQ" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="0..1" pretext=""/>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="362" showstereotype="1" y="288" text="mpNetworkClockEvtList" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="169" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="UkMZoR1TnAZ2" height="20"/>
- </assocwidget>
- </associations>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="Phy" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="2172" canvaswidth="1134" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="GstO8HJ4IcQz" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="28" showattsigs="601" showstereotype="1" y="20" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" drawascircle="0" width="665" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="KqJ8bZTEut0O" showscope="1" height="567" showopsigs="601"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="24" showattsigs="601" showstereotype="1" y="620" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="957" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="kooC0I8IkF1k" showscope="1" height="1548" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="1" widgetaid="kooC0I8IkF1k" linecolor="none" totalcounta="2" xmi.id="wqho3l7CAaCs" widgetbid="KqJ8bZTEut0O" totalcountb="2" type="500" linewidth="none">
- <linepath>
- <startpoint startx="301" starty="620"/>
- <endpoint endx="301" endy="587"/>
- </linepath>
- </assocwidget>
- </associations>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="Ethernet" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="1025" canvaswidth="1134" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="HTgS1vGBsXKx" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="400" showattsigs="601" showstereotype="1" y="205" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="351" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="RYfxHmW7DMwU" showscope="1" height="288" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="260" showattsigs="601" showstereotype="1" y="23" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="351" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="vpDXE2tS2kJL" showscope="1" height="153" showopsigs="601"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="79" showattsigs="601" showstereotype="1" y="553" showattributes="1" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="612" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="CpGnr2lIA5kk" showscope="1" height="468" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="2" widgetaid="RYfxHmW7DMwU" linecolor="none" totalcounta="2" xmi.id="lfdP22D7S0Ta" widgetbid="vpDXE2tS2kJL" totalcountb="3" type="500" linewidth="none">
- <linepath>
- <startpoint startx="512" starty="205"/>
- <endpoint endx="512" endy="176"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="CpGnr2lIA5kk" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="hyvcrFKQTBNS" changeabilityB="900" widgetbid="vpDXE2tS2kJL" totalcountb="3" type="501" linewidth="none">
- <linepath>
- <startpoint startx="303" starty="553"/>
- <endpoint endx="303" endy="176"/>
- </linepath>
- <floatingtext width="32" x="308" y="178" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="32" role="702" linecolor="none" xmi.id="5ZuqiUsh3NZR" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="0..1" pretext=""/>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="204" showstereotype="1" y="182" text="mpEthernet" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="#" role="710" width="95" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="bsJjWxK0feYT" height="20"/>
- </assocwidget>
- </associations>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="User_Interface" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="1262" canvaswidth="1894" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="j0Q5l6mvJKrs" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="38" showattsigs="601" showstereotype="1" y="112" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="772" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="IZRHkhpzqhMU" showscope="1" height="1026" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="928" showattsigs="601" showstereotype="1" y="15" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="962" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="3PksAGjP1DIY" showscope="1" height="882" showopsigs="601"/>
- <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="931" showattsigs="601" showstereotype="1" y="916" showattributes="1" font="Sans Serif,10,-1,5,75,0,0,0,0,0" width="670" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="4xqo1eJwmBM3" showscope="1" height="342" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="3PksAGjP1DIY" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="tJbdsVYsSKl5" changeabilityB="900" widgetbid="IZRHkhpzqhMU" totalcountb="3" type="501" linewidth="none">
- <linepath>
- <startpoint startx="928" starty="202"/>
- <endpoint endx="810" endy="202"/>
- </linepath>
- <floatingtext width="32" x="812" y="168" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="32" role="702" linecolor="none" xmi.id="DHPttxMxVHnB" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="0..1" pretext=""/>
- <floatingtext width="94" x="812" y="204" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="710" linecolor="none" xmi.id="g57df41GuIxR" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="mpMaximus" pretext="-"/>
- </assocwidget>
- <assocwidget indexa="1" indexb="2" visibilityA="0" widgetaid="4xqo1eJwmBM3" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="lyCfKZjGyLKp" changeabilityB="900" widgetbid="IZRHkhpzqhMU" totalcountb="3" type="501" linewidth="none">
- <linepath>
- <startpoint startx="931" starty="929"/>
- <endpoint endx="810" endy="929"/>
- </linepath>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="812" showstereotype="1" y="895" text="0..1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="702" width="32" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="LIOGbLhob6hU" height="32"/>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="812" showstereotype="1" y="931" text="mpMaximus" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="94" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="jgsk1RChUJJ9" height="20"/>
- </assocwidget>
- </associations>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="CoreEngine" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="553" canvaswidth="1147" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="hOBLZCjRwfIJ" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="39" showattsigs="601" showstereotype="1" y="43" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="858" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="C32l1W8XzZV4" showscope="1" height="396" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations/>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="MPDU" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="1265" canvaswidth="1442" localid="JENORZT9F2n6" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="cIRnlzb1kmMh" documentation="" showscope="1" snapgrid="0" showatts="1" type="3">
- <widgets>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="0" instancename="" x="207" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="aqfH5SItxCyL" width="81" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="4mmdfk3zM4Cq" height="28" drawasactor="0"/>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="482" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="xginuQVObWXl" width="108" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="kooC0I8IkF1k" height="28" drawasactor="0"/>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="1327" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="zXibvu4raAyj" width="111" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="pdUJAVtJe39T" height="28" drawasactor="0"/>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="0" instancename="" x="25" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="zNTpfqN0MmXP" width="105" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="O8DTzb5kluKg" height="28" drawasactor="0"/>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="668" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="WvYCF4tkz63o" width="125" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="gjYrACSC9BuB" height="28" drawasactor="0"/>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="890" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="25xomsl1Nhqd" width="111" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="emjq7Xks8DWW" height="28" drawasactor="0"/>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="1095" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="kkjT6JLHnp7M" width="104" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="uHdgUvjiSZG6" height="28" drawasactor="0"/>
- <objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="355" decon="0" y="48" font="Sans Serif,10,-1,0,50,0,1,0,0,0" localid="JENORZT9F2n6" width="78" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="C6sJEmNl1TfP" height="28" drawasactor="0"/>
- </widgets>
- <messages>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="GKLTU8NvQqBw" operation="sFYUdEAortKU" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" y="743" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="sFYUdEAortKU" height="32" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="723" text=": calculateMpduDuration() : Network_Clock_Tick" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="705" width="321" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="GKLTU8NvQqBw" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="apLpyTLhZs6H" operation="8xeZSGecfweb" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="577" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="8xeZSGecfweb" height="32" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="557" text=": calculateFcDuration() : Network_Clock_Tick" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="705" width="300" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="apLpyTLhZs6H" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="zXibvu4raAyj" textid="X2jgBaYxExEf" operation="iRbOoMx0JUVV" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="414" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="844" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="iRbOoMx0JUVV" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="394" text=": insertEvt(tick_value : const Network_Clock_Tick, evt_to_insert : const NetworkClockEvt&amp;) : bool" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="640" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="X2jgBaYxExEf" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="zXibvu4raAyj" textid="h9Sgu2LAGvTz" operation="iRbOoMx0JUVV" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="823" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="844" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="iRbOoMx0JUVV" height="8" sequencemessagetype="1001">
- <floatingtext width="640" x="542" y="803" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="704" linecolor="none" xmi.id="h9Sgu2LAGvTz" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": insertEvt(tick_value : const Network_Clock_Tick, evt_to_insert : const NetworkClockEvt&amp;) : bool" pretext=""/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="zXibvu4raAyj" textid="bc7mOoBXCPsT" operation="iRbOoMx0JUVV" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" y="638" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="844" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="iRbOoMx0JUVV" height="8" sequencemessagetype="1001">
- <floatingtext width="640" x="542" y="618" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="704" linecolor="none" xmi.id="bc7mOoBXCPsT" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": insertEvt(tick_value : const Network_Clock_Tick, evt_to_insert : const NetworkClockEvt&amp;) : bool" pretext=""/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="QTRbrnuf1UXd" operation="BdjXdjNqRyHm" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="348" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="BdjXdjNqRyHm" height="32" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="328" text=": calculatePreDuration() : Network_Clock_Tick" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="705" width="306" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="QTRbrnuf1UXd" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="aqfH5SItxCyL" operation="" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="248" showstereotype="1" y="825" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="287" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="3RxRTMyIdWXx" height="8" sequencemessagetype="1001"/>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="Wnf8x0vHkZrq" operation="yc5zTBjlFcbI" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="883" widgetaid="zXibvu4raAyj" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="844" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="yc5zTBjlFcbI" height="8" sequencemessagetype="1001">
- <floatingtext width="595" x="542" y="863" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="704" linecolor="none" xmi.id="Wnf8x0vHkZrq" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": receiveEvt(received_evt : NetworkClockEvt&amp;, phy_sci_msg_to_send : PhySciMsg&amp;) : bool" pretext=""/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="aqfH5SItxCyL" textid="EcYsfMA250rg" operation="mpdu.send()" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="78" showstereotype="1" y="194" widgetaid="zNTpfqN0MmXP" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="168" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="OrWvrbotJSO0" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="83" showstereotype="1" y="174" text=": mpdu.send()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="98" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="EcYsfMA250rg" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="zNTpfqN0MmXP" operation="" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="78" showstereotype="1" y="827" widgetaid="aqfH5SItxCyL" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="168" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="2EhX9Ife397w" height="8" sequencemessagetype="1001"/>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="D5PLq8bto9y1" operation="VBgQwIJgoVmd" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="918" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="VBgQwIJgoVmd" height="32" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="898" text=": sendMsg(phy_sci_msg_to_send : PhySciMsg&amp;) : bool" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="705" width="358" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="D5PLq8bto9y1" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="E31QNqGuTLMD" operation="yc5zTBjlFcbI" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="1006" widgetaid="zXibvu4raAyj" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="844" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="yc5zTBjlFcbI" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="986" text=": receiveEvt(received_evt : NetworkClockEvt&amp;, phy_sci_msg_to_send : PhySciMsg&amp;) : bool" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="595" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="E31QNqGuTLMD" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="gQ4zi6FFhoGI" operation="VBgQwIJgoVmd" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="1048" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="VBgQwIJgoVmd" height="32" sequencemessagetype="1001">
- <floatingtext width="358" x="542" y="1028" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="705" linecolor="none" xmi.id="gQ4zi6FFhoGI" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": sendMsg(phy_sci_msg_to_send : PhySciMsg&amp;) : bool" pretext=""/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="nBywSIugMtbj" operation="yc5zTBjlFcbI" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="1127" widgetaid="zXibvu4raAyj" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="844" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="yc5zTBjlFcbI" height="8" sequencemessagetype="1001">
- <floatingtext width="595" x="542" y="1107" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="704" linecolor="none" xmi.id="nBywSIugMtbj" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": receiveEvt(received_evt : NetworkClockEvt&amp;, phy_sci_msg_to_send : PhySciMsg&amp;) : bool" pretext=""/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="Bk5U80bNVSab" operation="VBgQwIJgoVmd" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="1174" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="VBgQwIJgoVmd" height="32" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="1154" text=": sendMsg(phy_sci_msg_to_send : PhySciMsg&amp;) : bool" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="705" width="358" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="Bk5U80bNVSab" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="WvYCF4tkz63o" textid="RQhcfQoOCKMD" operation="0X10zUZAnpwn" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" y="700" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="192" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="0X10zUZAnpwn" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="680" text=": segment()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="83" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="RQhcfQoOCKMD" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="aqfH5SItxCyL" textid="lckZNvygFtqE" operation="mpdu = MPDU()" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="78" showstereotype="1" y="114" widgetaid="zNTpfqN0MmXP" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="168" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="NRDciZGg8XRO" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="83" showstereotype="1" y="94" text=": mpdu = MPDU()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="122" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="lckZNvygFtqE" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="JENORZT9F2n6" textid="hFwuHPLOkCKk" operation="create_phy()" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="248" showstereotype="1" y="138" widgetaid="aqfH5SItxCyL" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="145" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="hlTmkFXlV1m8" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="263" showstereotype="1" y="118" text=": create_phy()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="98" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="hFwuHPLOkCKk" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="25xomsl1Nhqd" textid="ZqFYAe4ORR1c" operation="DNXsEDC2K4mJ" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="536" showstereotype="1" y="264" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="417" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="DNXsEDC2K4mJ" height="32" sequencemessagetype="1000">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="541" showstereotype="1" y="244" text=": PhySciMsgPre(p_phy_processor : IPhy*)" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="273" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="ZqFYAe4ORR1c" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="kkjT6JLHnp7M" textid="h6BWgUJAD0Rw" operation="qlEY5IQdG7gV" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="536" y="475" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="619" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="qlEY5IQdG7gV" height="32" sequencemessagetype="1000">
- <floatingtext width="267" x="541" y="455" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="704" linecolor="none" xmi.id="h6BWgUJAD0Rw" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": PhySciMsgFc(p_phy_processor : IPhy*)" pretext=""/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="25xomsl1Nhqd" textid="KJBUEPHW3AEo" operation="fmyMYtyjGWbT" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" y="975" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="407" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="fmyMYtyjGWbT" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="955" text=": ~ PhySciMsgPre()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="132" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="KJBUEPHW3AEo" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="kkjT6JLHnp7M" textid="4Dc5JxUjNlfe" operation="83x5QdeEMsmS" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="1096" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="609" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="83x5QdeEMsmS" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="1076" text=": ~ PhySciMsgFc()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="126" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="4Dc5JxUjNlfe" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="WvYCF4tkz63o" textid="fH35jWGhDXzt" operation="rFBZBjF5cpNg" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="1233" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="192" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="rFBZBjF5cpNg" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="1213" text=": ~ PhySciMsgMpdu()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="147" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="fH35jWGhDXzt" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="9VT5Ut4WBJOF" operation="R72zIX7svlbt" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="395" y="150" widgetaid="JENORZT9F2n6" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="140" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="R72zIX7svlbt" height="8" sequencemessagetype="1001">
- <floatingtext width="186" x="400" y="130" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="704" linecolor="none" xmi.id="9VT5Ut4WBJOF" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": createMsg() : PhySciMsg&amp;" pretext=""/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="WvYCF4tkz63o" textid="J0nIsYmew458" operation="7TE2jX8Ma10K" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="537" showstereotype="1" y="175" widgetaid="xginuQVObWXl" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="192" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="7TE2jX8Ma10K" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="542" showstereotype="1" y="155" text=": PhySciMsgMpdu(p_phy_processor : IPhy*)" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="288" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="J0nIsYmew458" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="JENORZT9F2n6" textid="1TisJQiD4S1L" operation="send_phy()" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="248" showstereotype="1" y="226" widgetaid="aqfH5SItxCyL" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="145" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="MLjPYQJKrnOp" height="8" sequencemessagetype="1001">
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="253" showstereotype="1" y="206" text=": send_phy()" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="704" width="88" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="1TisJQiD4S1L" height="20"/>
- </messagewidget>
- <messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="xginuQVObWXl" textid="pX1eUtfKgm1G" operation="K3ts3zgWBNu5" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="395" showstereotype="1" y="241" widgetaid="JENORZT9F2n6" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="140" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="K3ts3zgWBNu5" height="8" sequencemessagetype="1001">
- <floatingtext width="367" x="400" y="221" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="704" linecolor="none" xmi.id="pX1eUtfKgm1G" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text=": sendMpdu(phy_sci_msg_to_send : PhySciMsg&amp;) : bool" pretext=""/>
- </messagewidget>
- </messages>
- <associations/>
- </diagram>
- <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="0" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="0" showstereotype="1" name="Phy_2" font="Sans Serif,10,-1,0,50,0,0,0,0,0" canvasheight="1990" canvaswidth="1318" localid="" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="vbn8kuzg0Pc6" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
- <widgets>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="30" showattsigs="601" showstereotype="1" y="24" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="591" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="Kd2vdgexbsmt" showscope="1" height="1962" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="677" showattsigs="601" showstereotype="1" y="22" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="532" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="gjYrACSC9BuB" showscope="1" height="612" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="703" showattsigs="601" showstereotype="1" y="687" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="299" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="emjq7Xks8DWW" showscope="1" height="99" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="1015" showattsigs="601" showstereotype="1" y="685" showattributes="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" width="299" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="uHdgUvjiSZG6" showscope="1" height="198" showopsigs="601"/>
- <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="0" showpackage="1" x="727" showattsigs="601" showstereotype="1" y="901" showattributes="1" font="Sans Serif,10,-1,0,75,0,0,0,0,0" width="224" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="vSu5lsg0a7WJ" showscope="1" height="99" showopsigs="601"/>
- </widgets>
- <messages/>
- <associations>
- <assocwidget indexa="1" indexb="1" widgetaid="gjYrACSC9BuB" linecolor="none" totalcounta="2" xmi.id="D8KuNhepKAPe" widgetbid="Kd2vdgexbsmt" totalcountb="2" type="500" linewidth="none">
- <linepath>
- <startpoint startx="677" starty="152"/>
- <endpoint endx="621" endy="152"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" widgetaid="emjq7Xks8DWW" linecolor="none" totalcounta="2" xmi.id="78n0YovcPcSY" widgetbid="Kd2vdgexbsmt" totalcountb="5" type="500" linewidth="none">
- <linepath>
- <startpoint startx="703" starty="687"/>
- <endpoint endx="621" endy="687"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="gjYrACSC9BuB" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="131qHeYSxZ6A" changeabilityB="900" widgetbid="emjq7Xks8DWW" totalcountb="2" type="501" linewidth="none">
- <linepath>
- <startpoint startx="703" starty="634"/>
- <endpoint endx="703" endy="687"/>
- </linepath>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="705" showstereotype="1" y="653" text="0..1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="702" width="32" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="WX7ungGUUrZA" height="32"/>
- <floatingtext width="55" x="646" y="663" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="710" linecolor="none" xmi.id="g0rWiqxuVPCo" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="mpPre" pretext="-"/>
- </assocwidget>
- <assocwidget indexa="1" indexb="2" widgetaid="uHdgUvjiSZG6" linecolor="none" totalcounta="2" xmi.id="XhEs3csvqUn6" widgetbid="Kd2vdgexbsmt" totalcountb="5" type="500" linewidth="none">
- <linepath>
- <startpoint startx="1015" starty="857"/>
- <endpoint endx="621" endy="857"/>
- </linepath>
- </assocwidget>
- <assocwidget indexa="2" indexb="1" visibilityA="0" widgetaid="gjYrACSC9BuB" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="aFQc6PzmnrBh" changeabilityB="900" widgetbid="uHdgUvjiSZG6" totalcountb="2" type="501" linewidth="none">
- <linepath>
- <startpoint startx="1022" starty="634"/>
- <endpoint endx="1022" endy="685"/>
- </linepath>
- <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="1024" showstereotype="1" y="651" text="0..1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" pretext="" role="702" width="32" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="bB06aCt4jyzX" height="32"/>
- <floatingtext width="49" x="972" y="661" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="20" role="710" linecolor="none" xmi.id="JbAj4RukPlG7" usefillcolor="1" linewidth="none" font="Sans Serif,10,-1,0,50,0,0,0,0,0" text="mpFc" pretext="-"/>
- </assocwidget>
- <assocwidget indexa="1" indexb="3" widgetaid="vSu5lsg0a7WJ" linecolor="none" totalcounta="2" xmi.id="5oSJ5pfRXEKM" widgetbid="Kd2vdgexbsmt" totalcountb="5" type="500" linewidth="none">
- <linepath>
- <startpoint startx="727" starty="1000"/>
- <endpoint endx="621" endy="1000"/>
- </linepath>
- </assocwidget>
- </associations>
- </diagram>
- </diagrams>
- </XMI.extension>
- </UML:Model>
- <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Use Case View" name="Use Case View">
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Component View" name="Component View">
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Deployment View" name="Deployment View">
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Entity Relationship Model" name="Entity Relationship Model">
- <UML:Namespace.ownedElement/>
- </UML:Model>
- </UML:Namespace.ownedElement>
- </UML:Model>
- </XMI.content>
- <XMI.extensions xmi.extender="umbrello">
- <docsettings viewid="j0Q5l6mvJKrs" uniqueid="IGLsSCvBAugk" documentation=""/>
- <listview>
- <listitem open="1" type="800" id="Views">
- <listitem open="1" type="801" id="Logical View">
- <listitem open="0" type="813" id="uvuzFPfmVe3t"/>
- <listitem open="0" type="813" id="SRkFry3tOtYS"/>
- <listitem open="0" type="813" id="f4Wo0xIyC255">
- <listitem open="0" type="814" id="2bn9FjKszVLx"/>
- <listitem open="0" type="814" id="PsDvdrWFWC8z"/>
- <listitem open="0" type="814" id="yHVop6npiayx"/>
- <listitem open="0" type="814" id="HGnEk8A9yN4c"/>
- <listitem open="0" type="814" id="FZrjjxihEBW1"/>
- <listitem open="0" type="814" id="IHpypnt72gLm"/>
- <listitem open="0" type="814" id="oVvnrxP4WEnF"/>
- <listitem open="0" type="815" id="BUvOfPNvgCtV"/>
- <listitem open="0" type="815" id="cS7Ge0kalIaB"/>
- <listitem open="0" type="815" id="CIQaxQoYn5dM"/>
- <listitem open="0" type="815" id="yioj0NsDfJnd"/>
- <listitem open="0" type="815" id="KdmS6QflOg8i"/>
- <listitem open="0" type="815" id="k29W0gJIJ4iP"/>
- <listitem open="0" type="815" id="vxezggkuycWT"/>
- <listitem open="0" type="815" id="ZazVCVxD5car"/>
- <listitem open="0" type="815" id="i6JlitclF5Gy"/>
- <listitem open="0" type="815" id="LYdHkoQQujBa"/>
- <listitem open="0" type="815" id="CKV1ZXML5tua"/>
- <listitem open="0" type="815" id="aUw49UQJmtIM"/>
- <listitem open="0" type="815" id="QfhUYb4IzSQV"/>
- <listitem open="0" type="815" id="QYwDRDXqsCKO"/>
- <listitem open="0" type="815" id="nMeko5Ejl7cG"/>
- <listitem open="0" type="815" id="9cMfZUJx2D8R"/>
- <listitem open="0" type="815" id="Qm5Ibdz0oHIF"/>
- <listitem open="0" type="815" id="tABiLOUlAX1k"/>
- <listitem open="0" type="815" id="7O3I75OyFXgZ"/>
- <listitem open="0" type="815" id="jQ27COb3636K"/>
- <listitem open="0" type="815" id="EbAJeHbmz36e"/>
- <listitem open="0" type="815" id="xdKweQZHg5Re"/>
- <listitem open="0" type="815" id="m40iBL7eDD2l"/>
- </listitem>
- <listitem open="0" type="813" id="N4J4BnHJo9bq">
- <listitem open="0" type="814" id="XL4btGdJr9Xs"/>
- <listitem open="0" type="814" id="zLCfqgpBk8Fu"/>
- <listitem open="0" type="814" id="tUBicnW98ai2"/>
- <listitem open="0" type="814" id="MsB4zOwsr8YT"/>
- <listitem open="0" type="815" id="v2a1cG1OZN40"/>
- <listitem open="0" type="815" id="BaNNGQKaHTeE"/>
- <listitem open="0" type="815" id="ydeVygT9GrUU"/>
- <listitem open="0" type="815" id="SvZ5b8LXly3h"/>
- <listitem open="0" type="815" id="eWptLJLb6Q7N"/>
- <listitem open="0" type="815" id="1WHlUKS6pHxA"/>
- <listitem open="0" type="815" id="hTVpMhZNDp8f"/>
- <listitem open="0" type="815" id="fxTMPci45DsR"/>
- <listitem open="0" type="815" id="4aIGsJh15UcK"/>
- <listitem open="0" type="815" id="FS7YhDtlmB1e"/>
- <listitem open="0" type="815" id="ShdX9FsfefaQ"/>
- <listitem open="0" type="815" id="iR7Ua662njYv"/>
- <listitem open="0" type="815" id="xOab392D99Uw"/>
- <listitem open="0" type="815" id="egUQQ0JNOrwP"/>
- <listitem open="0" type="815" id="0yd8752VzzaO"/>
- <listitem open="0" type="815" id="CtXakU0jQbrW"/>
- </listitem>
- <listitem open="0" type="813" id="7WkpCVeuHxVw">
- <listitem open="0" type="814" id="5LdfotjaxiG6"/>
- <listitem open="0" type="814" id="3MiEZlxumBw5"/>
- <listitem open="0" type="815" id="oI6OJS2MlfzZ"/>
- <listitem open="0" type="815" id="Wh8SPOYQkHeK"/>
- <listitem open="0" type="815" id="95YrMA9MlM6T"/>
- <listitem open="0" type="815" id="Sv0rpva8sdBQ"/>
- <listitem open="0" type="815" id="KsjAVsa9g7WF"/>
- <listitem open="0" type="815" id="SbXD1qoLiVUC"/>
- </listitem>
- <listitem open="0" type="813" id="PJbHtdSeqfcR">
- <listitem open="0" type="814" id="gt1eqa0GbUZ9"/>
- <listitem open="0" type="814" id="YJLJYvTkozJW"/>
- <listitem open="0" type="814" id="RHFrs6NWyNAm"/>
- <listitem open="0" type="814" id="x92YdbfAv0TR"/>
- <listitem open="0" type="814" id="tu9hrSEIhRAZ"/>
- <listitem open="0" type="815" id="WV4SsCEpLFMx"/>
- <listitem open="0" type="815" id="q15j0WAtQIZI"/>
- <listitem open="0" type="815" id="ilYQCixiE1A6"/>
- <listitem open="0" type="815" id="CNuVcESQDVAD"/>
- <listitem open="0" type="815" id="vgI9gSDsn5NP"/>
- <listitem open="0" type="815" id="5NjM9QDWnLLN"/>
- <listitem open="0" type="815" id="CjrhPVrVIqNC"/>
- <listitem open="0" type="815" id="GYaf2m9zBAgt"/>
- <listitem open="0" type="815" id="BdQ6sBo8jMmm"/>
- <listitem open="0" type="815" id="G0s1tcz4DN85"/>
- <listitem open="0" type="815" id="5qKElN0zNq0G"/>
- <listitem open="0" type="815" id="SxIeLPjsMt6d"/>
- <listitem open="0" type="815" id="55IQvGhLExzX"/>
- <listitem open="0" type="815" id="MhPgYTKMYNvL"/>
- <listitem open="0" type="815" id="6JEd1Jw4MEUF"/>
- </listitem>
- <listitem open="0" type="813" id="QfHGrZecvJNh"/>
- <listitem open="0" type="813" id="FNAWFo5m56XX">
- <listitem open="0" type="814" id="ZlFJOJZWpHJ0"/>
- <listitem open="0" type="814" id="lvs2tNy8i7cx"/>
- </listitem>
- <listitem open="0" type="813" id="nMqHFdX6fOJd">
- <listitem open="0" type="814" id="rz2gkqCi9n3k"/>
- <listitem open="0" type="814" id="FCfTYqKT5rid"/>
- <listitem open="0" type="814" id="01N7XprMor2W"/>
- <listitem open="0" type="814" id="rkydbz8GBI4B"/>
- <listitem open="0" type="814" id="YaNwl3ql1Drs"/>
- <listitem open="0" type="814" id="he6wwAPcfneH"/>
- <listitem open="0" type="815" id="JXgPZZ1RHy2s"/>
- <listitem open="0" type="815" id="x866R8HxgdsP"/>
- <listitem open="0" type="815" id="ieVxaWnXetd3"/>
- <listitem open="0" type="815" id="zt1fUt58ZDlV"/>
- <listitem open="0" type="815" id="DGiiOLp4xI2X"/>
- <listitem open="0" type="815" id="op2RhdUgUTKy"/>
- <listitem open="0" type="815" id="MN4wapPm48SQ"/>
- <listitem open="0" type="815" id="RHUOYWtMMvl1"/>
- <listitem open="0" type="815" id="WGh1jzz4M2yv"/>
- <listitem open="0" type="815" id="pNfrT7HuNmGv"/>
- <listitem open="0" type="815" id="EWebIuUY2k92"/>
- <listitem open="0" type="815" id="jiZy17sIdrtA"/>
- <listitem open="0" type="815" id="329et0ogLMkp"/>
- <listitem open="0" type="815" id="8XYOyquJcwd7"/>
- <listitem open="0" type="815" id="zO3LklAqIgCG"/>
- <listitem open="0" type="815" id="U6Y72BC8AW64"/>
- <listitem open="0" type="815" id="yy0UzZryvtHd"/>
- <listitem open="0" type="815" id="YfoSW458WX1a"/>
- <listitem open="0" type="815" id="ABBqopYdhMb4"/>
- <listitem open="0" type="815" id="dUC2E0OFnGO9"/>
- <listitem open="0" type="815" id="qbGpboWVV66k"/>
- <listitem open="0" type="815" id="xMZbd0yv7NcB"/>
- <listitem open="0" type="815" id="nPMurd6mzdNd"/>
- <listitem open="0" type="815" id="5jxTmJyXgIRX"/>
- <listitem open="0" type="815" id="8APIp4mPGvIs"/>
- </listitem>
- <listitem open="0" type="813" id="C32l1W8XzZV4">
- <listitem open="0" type="814" id="NaCjKA3ztF1f"/>
- <listitem open="0" type="814" id="tIqrt93wBnvf"/>
- <listitem open="0" type="814" id="vReSwjgJHq1c"/>
- <listitem open="0" type="814" id="14ZsHYW9oM0f"/>
- <listitem open="0" type="814" id="T1ceoVKhww8r"/>
- <listitem open="0" type="814" id="Qvzi8cZHoFW0"/>
- <listitem open="0" type="814" id="OZ68tPxHLwzT"/>
- <listitem open="0" type="815" id="dm8vd9VcC2UT"/>
- <listitem open="0" type="815" id="b0cNLa3madPO"/>
- <listitem open="0" type="815" id="8h43dAsHw0CZ"/>
- <listitem open="0" type="815" id="KZVvvBoqsUMC"/>
- <listitem open="0" type="815" id="CmAhUywpVQiP"/>
- <listitem open="0" type="815" id="ZWFS1ZcYnDst"/>
- <listitem open="0" type="815" id="Gb5ewIM82WqU"/>
- <listitem open="0" type="815" id="SkHv8zKiWZAV"/>
- <listitem open="0" type="815" id="9k3uwvlCUqoP"/>
- <listitem open="0" type="815" id="68V8cJd42uxA"/>
- <listitem open="0" type="815" id="PmskjqBDNtW9"/>
- <listitem open="0" type="815" id="F99UFftitsKh"/>
- <listitem open="0" type="815" id="WCIhU3W1sD2s"/>
- <listitem open="0" type="815" id="CcgOZDeA999G"/>
- </listitem>
- <listitem open="0" type="813" id="CWGE8DVJYvei"/>
- <listitem open="0" type="813" id="DQE4VzTfZR3v"/>
- <listitem open="0" type="813" id="Awyu6tX5fqlW">
- <listitem open="0" type="814" id="1rwjdmsw4F7l"/>
- <listitem open="0" type="814" id="UpNCk1jKLyAY"/>
- <listitem open="0" type="815" id="Mdk82fnxh6hS"/>
- <listitem open="0" type="815" id="IuuFSaUFrNuX"/>
- <listitem open="0" type="815" id="xTF4pfijGsXz"/>
- <listitem open="0" type="815" id="vGPsKptcjnp9"/>
- <listitem open="0" type="815" id="LKMChHicixgX"/>
- <listitem open="0" type="815" id="cMHqCmp70C0K"/>
- </listitem>
- <listitem open="0" type="813" id="ZsS6AptYsaG9"/>
- <listitem open="0" type="813" id="CpGnr2lIA5kk">
- <listitem open="0" type="814" id="GdKdWdg4NGY7"/>
- <listitem open="0" type="814" id="23cO33fVVAlY"/>
- <listitem open="0" type="814" id="hyvcrFKQTBNS"/>
- <listitem open="0" type="814" id="SbeM9S2GCU1b"/>
- <listitem open="0" type="814" id="Ih3AfxA6ZmSg"/>
- <listitem open="0" type="815" id="ZVEqr9b3kvEo"/>
- <listitem open="0" type="815" id="xmrmTGUZsjm6"/>
- <listitem open="0" type="815" id="5PTEweBcay3f"/>
- <listitem open="0" type="815" id="4HFCv7KG4okb"/>
- <listitem open="0" type="815" id="t5ZfMqGz8SO4"/>
- <listitem open="0" type="815" id="hTJ4qGQnRKKO"/>
- <listitem open="0" type="815" id="jdje2NSCHn0X"/>
- <listitem open="0" type="815" id="fu3Bt2ilRO8b"/>
- <listitem open="0" type="815" id="jiK82b13cdRe"/>
- <listitem open="0" type="815" id="oq6G1Sii81r9"/>
- <listitem open="0" type="815" id="OhUFXSXch1iI"/>
- <listitem open="0" type="815" id="CFZjc4qzlJCI"/>
- <listitem open="0" type="815" id="ZRrykd0pi3v9"/>
- <listitem open="0" type="815" id="uX8OVoZ3EQ1w"/>
- <listitem open="0" type="815" id="1zmj0htq6giY"/>
- <listitem open="0" type="815" id="V6Mbm29ZEGjY"/>
- <listitem open="0" type="815" id="1BJ3iBb540Tu"/>
- <listitem open="0" type="815" id="dtwr1t715Q4l"/>
- <listitem open="0" type="815" id="gRXwDYVqPShR"/>
- <listitem open="0" type="815" id="IqrDHMTxo0t1"/>
- </listitem>
- <listitem open="1" type="813" id="3Q4QiXaDv1Kh"/>
- <listitem open="1" type="813" id="TCtwHZhr7lwx"/>
- <listitem open="0" type="813" id="RYfxHmW7DMwU">
- <listitem open="0" type="814" id="h1VbdRCaUhXy"/>
- <listitem open="0" type="814" id="5jpVjJ5eUWHB"/>
- <listitem open="0" type="814" id="anXgN3gO83dY"/>
- <listitem open="0" type="815" id="dl2c23XnlfHK"/>
- <listitem open="0" type="815" id="51fn4DV8wLde"/>
- <listitem open="0" type="815" id="q75x8gTDh81k"/>
- <listitem open="0" type="815" id="LWsFrVtTCAaN"/>
- <listitem open="0" type="815" id="Sr08zzsITkVJ"/>
- <listitem open="0" type="815" id="DNmOVMlDAuEm"/>
- <listitem open="0" type="815" id="p9bJt7c5UMTx"/>
- <listitem open="0" type="815" id="MWClNV6AfiRW"/>
- <listitem open="0" type="815" id="gXn0KP0fuCQH"/>
- <listitem open="0" type="815" id="NOJYkDoPjZP1"/>
- <listitem open="0" type="815" id="zNgtY48EZXXj"/>
- <listitem open="0" type="815" id="WznSGvYzd4Vc"/>
- </listitem>
- <listitem open="0" type="813" id="cQhYUO60E2We"/>
- <listitem open="0" type="813" id="bErx1XNsRKIs"/>
- <listitem open="0" type="813" id="ZWryYSGDRuyu"/>
- <listitem open="0" type="813" id="HTUXG3XFPxuK"/>
- <listitem open="0" type="813" id="bxyfX2FkfHc6"/>
- <listitem open="0" type="813" id="c6nC8sEdaTgi">
- <listitem open="0" type="814" id="GQCuSON9dVcx"/>
- <listitem open="0" type="814" id="OFjIEoRosCzy"/>
- </listitem>
- <listitem open="0" type="813" id="cEjQpWrIlHo7">
- <listitem open="0" type="814" id="4fMbZO2Z9RpE"/>
- <listitem open="0" type="814" id="SzrPyinbwUzm"/>
- </listitem>
- <listitem open="0" type="813" id="Szlq4RFfiqZ0">
- <listitem open="0" type="814" id="raWAUltd7jW1"/>
- <listitem open="0" type="814" id="dmOwhy7bcAr6"/>
- <listitem open="0" type="815" id="iZoWyAQnivxA"/>
- <listitem open="0" type="815" id="7CLhKCo3kaZg"/>
- <listitem open="0" type="815" id="kxUSsRaWGOFl"/>
- <listitem open="0" type="815" id="g0uk7zTE9muS"/>
- <listitem open="0" type="815" id="7FtH2ljzRCgi"/>
- <listitem open="0" type="815" id="qraO0M37auMa"/>
- <listitem open="0" type="815" id="fUBnkmKYcswc"/>
- <listitem open="0" type="815" id="3VmF1JJgoSSW"/>
- <listitem open="0" type="815" id="AtPIj4fkZR0b"/>
- <listitem open="0" type="815" id="jHFVhh1uR4h2"/>
- <listitem open="0" type="815" id="44p1BOsJFHbz"/>
- <listitem open="0" type="815" id="ZllXuTRZV4sC"/>
- </listitem>
- <listitem open="0" type="813" id="JEjtehSNwhqe">
- <listitem open="0" type="814" id="NrWouCoyGezP"/>
- <listitem open="0" type="814" id="2phF4GENVwE7"/>
- <listitem open="0" type="814" id="dgUaMIEj9iV1"/>
- <listitem open="0" type="815" id="uKz9wwYwlFBn"/>
- <listitem open="0" type="815" id="WQBzMP6x4YXQ"/>
- <listitem open="0" type="815" id="wmd0KBO8sV6K"/>
- <listitem open="0" type="815" id="EAyLkPhHGm9g"/>
- <listitem open="0" type="815" id="Yg37rQy99xMM"/>
- <listitem open="0" type="815" id="bBBsyKWU0ZZq"/>
- <listitem open="0" type="815" id="g3LectUYOSdr"/>
- <listitem open="0" type="815" id="l4LuDzzLsCdx"/>
- <listitem open="0" type="815" id="wobrA8io91Sl"/>
- <listitem open="0" type="815" id="RyUJA5E6tpx1"/>
- <listitem open="0" type="815" id="eHnV4jU2KH6x"/>
- <listitem open="0" type="815" id="VuTb0D5y4fvN"/>
- <listitem open="0" type="815" id="tASCSY9vRaWP"/>
- <listitem open="0" type="815" id="mbNoEICQIH8q"/>
- <listitem open="0" type="815" id="AsCbRh0BINzV"/>
- </listitem>
- <listitem open="0" type="813" id="FBsPeH4gEvUD">
- <listitem open="0" type="814" id="HtgfhrS9xQuR"/>
- <listitem open="0" type="814" id="M8XTHVzTFMBi"/>
- <listitem open="0" type="814" id="H9hzty6ArmoW"/>
- <listitem open="0" type="814" id="a3kQqWuPiYyL"/>
- <listitem open="0" type="814" id="7yImSgiT36hm"/>
- <listitem open="0" type="814" id="genMHiwrmeFa"/>
- <listitem open="0" type="814" id="AAzsiwCnuSXK"/>
- <listitem open="0" type="814" id="Q9L84AutwWTs"/>
- <listitem open="0" type="815" id="7GnAKVxy9iJO"/>
- <listitem open="0" type="815" id="QFGAtTk1dirM"/>
- <listitem open="0" type="815" id="7gAFMRdlgrvX"/>
- <listitem open="0" type="815" id="1LQuy933oBI8"/>
- <listitem open="0" type="815" id="cutGlpn4TJ1p"/>
- <listitem open="0" type="815" id="SaaGlrPOlGeU"/>
- <listitem open="0" type="815" id="5QZWjaJOr6QV"/>
- <listitem open="0" type="815" id="ML9vegQ5G0J1"/>
- <listitem open="0" type="815" id="pgNax052QcX7"/>
- <listitem open="0" type="815" id="KavaYFZOvxws"/>
- <listitem open="0" type="815" id="1yMFt9PeQpdM"/>
- <listitem open="0" type="815" id="OSZWBNB9mE14"/>
- <listitem open="0" type="815" id="ClJBMrjLp5Yg"/>
- <listitem open="0" type="815" id="EvKdlxx7OWdZ"/>
- <listitem open="0" type="815" id="tpjd1kfDTwMn"/>
- <listitem open="0" type="815" id="n66bBeFOYazJ"/>
- <listitem open="0" type="815" id="o71Mf0dBu32L"/>
- <listitem open="0" type="815" id="3TdrdWfV3hoZ"/>
- <listitem open="0" type="815" id="5uqX6gAvnAFR"/>
- <listitem open="0" type="815" id="8tc3ucMx6xnj"/>
- <listitem open="0" type="815" id="RSDV712Awqh2"/>
- <listitem open="0" type="815" id="xJNr93tftnwr"/>
- <listitem open="0" type="815" id="87xzsrqoUkoQ"/>
- <listitem open="0" type="815" id="niGFX66yejX5"/>
- <listitem open="0" type="815" id="28MeqshR77EU"/>
- <listitem open="0" type="815" id="lIyVIR67iUQi"/>
- <listitem open="0" type="815" id="AJwIR8kARidh"/>
- <listitem open="0" type="815" id="7jooCCWrI0NI"/>
- <listitem open="0" type="815" id="iop7VSoaAaMM"/>
- <listitem open="0" type="815" id="mqB3rYLMreYQ"/>
- <listitem open="0" type="815" id="lL6vvTFgJOj8"/>
- <listitem open="0" type="815" id="w2Ule0BF9O1u"/>
- <listitem open="0" type="815" id="aVKdns7WDEP7"/>
- <listitem open="0" type="815" id="fenw2W3wWVfB"/>
- <listitem open="0" type="815" id="kWAvia2LCpGD"/>
- <listitem open="0" type="815" id="zNLW6edynEwJ"/>
- <listitem open="0" type="815" id="uaklPv8vKcqs"/>
- <listitem open="0" type="815" id="dTcbIRfWRszE"/>
- <listitem open="0" type="815" id="DXZgqHeyznqh"/>
- <listitem open="0" type="815" id="MexYW51gIxOy"/>
- <listitem open="0" type="815" id="3pTkKpWS9lpM"/>
- <listitem open="0" type="815" id="tttVk4P00qr6"/>
- </listitem>
- <listitem open="0" type="813" id="bEeZdY0xhVQw"/>
- <listitem open="0" type="813" id="2JrrgMpWtl6M"/>
- <listitem open="0" type="813" id="mKTfuY7pgyOI">
- <listitem open="0" type="815" id="mnXY2pAfXV4I"/>
- <listitem open="0" type="815" id="1LylB28ScNMD"/>
- <listitem open="0" type="815" id="p03UaTHNEmvE"/>
- <listitem open="0" type="815" id="OQtyoDBbEC4m"/>
- <listitem open="0" type="815" id="KBZza9x3H6ST"/>
- <listitem open="0" type="815" id="tRoJZlBrwkqU"/>
- <listitem open="0" type="815" id="TZagO5Qxh1S3"/>
- <listitem open="0" type="815" id="sTVXSvarLqSF"/>
- <listitem open="0" type="815" id="TLNmBp2ZucPp"/>
- <listitem open="0" type="815" id="RruVNezoxMb6"/>
- <listitem open="0" type="815" id="HHSPVSPUjgnp"/>
- <listitem open="0" type="815" id="XG1nSTEjkf6G"/>
- </listitem>
- <listitem open="0" type="813" id="vpDXE2tS2kJL">
- <listitem open="0" type="815" id="P4tpXY4qIbJ5"/>
- <listitem open="0" type="815" id="O0uR0GThUwM5"/>
- <listitem open="0" type="815" id="tXgA72aV4SKb"/>
- <listitem open="0" type="815" id="UCOy9l10GiAM"/>
- <listitem open="0" type="815" id="klrpD9OBVqRR"/>
- <listitem open="0" type="815" id="7SoM8zisiXft"/>
- <listitem open="0" type="815" id="zFfoHbK8z1CV"/>
- </listitem>
- <listitem open="0" type="813" id="2j8N30UlnykR">
- <listitem open="0" type="815" id="J2aNcDdLjIki"/>
- <listitem open="0" type="815" id="HyhtbluIuHLs"/>
- <listitem open="0" type="815" id="l7eip5m97MWi"/>
- <listitem open="0" type="815" id="X81GQjzfieZJ"/>
- <listitem open="0" type="815" id="mkhHNiAlgjpI"/>
- <listitem open="0" type="815" id="v2TaQYUAJBSg"/>
- <listitem open="0" type="815" id="Ynfe0DywdNUn"/>
- <listitem open="0" type="815" id="4MiOTTt1EXfF"/>
- </listitem>
- <listitem open="0" type="813" id="pdUJAVtJe39T">
- <listitem open="0" type="815" id="sh6Y1fcHG1Pp"/>
- <listitem open="0" type="815" id="BOv17TKw7oDH"/>
- <listitem open="0" type="815" id="I6aw7hNyMRWO"/>
- <listitem open="0" type="815" id="M8En1Kv1mtoY"/>
- <listitem open="0" type="815" id="QO5UDy5Z4JK5"/>
- <listitem open="0" type="815" id="iRbOoMx0JUVV"/>
- <listitem open="0" type="815" id="flkwFFSwfxui"/>
- <listitem open="0" type="815" id="te4ovL4IvO5c"/>
- </listitem>
- <listitem open="0" type="813" id="KqJ8bZTEut0O">
- <listitem open="0" type="815" id="yaLsEUCpV6SB"/>
- <listitem open="0" type="815" id="kPkaAdqUS7a3"/>
- <listitem open="0" type="815" id="h1GZuEvrpEj3"/>
- <listitem open="0" type="815" id="jusE0INkg7Lq"/>
- <listitem open="0" type="815" id="hOeUdLXMFNYD"/>
- <listitem open="0" type="815" id="J5bBV6yATae6"/>
- <listitem open="0" type="815" id="YbZw1PcKSDVy"/>
- <listitem open="0" type="815" id="AtHIE0QoOt3a"/>
- <listitem open="0" type="815" id="HFKsayykpF23"/>
- <listitem open="0" type="815" id="3jRwvWWTVYZx"/>
- <listitem open="0" type="815" id="NCRUK0sLkHHd"/>
- <listitem open="0" type="815" id="836rmxK77lbR"/>
- <listitem open="0" type="815" id="ly04r3Yz6coq"/>
- <listitem open="0" type="815" id="p57ZDpbznb1e"/>
- <listitem open="0" type="815" id="zMwv9wYy2dXF"/>
- <listitem open="0" type="815" id="tWYNzpkyBerK"/>
- <listitem open="0" type="815" id="Capv3pmwLIHI"/>
- <listitem open="0" type="815" id="cc0RbiyoInhJ"/>
- <listitem open="0" type="815" id="YhN1WBY6oWXP"/>
- <listitem open="0" type="815" id="VwwzN38tjVuF"/>
- <listitem open="0" type="815" id="wMOGK8Mp2GnP"/>
- <listitem open="0" type="815" id="LPbfTBCPXbgq"/>
- <listitem open="0" type="815" id="NQTsz7ig6MNL"/>
- <listitem open="0" type="815" id="j3lMDxQYOsPL"/>
- <listitem open="0" type="815" id="x721RPKCrAGh"/>
- <listitem open="0" type="815" id="MwIimf4jl6jC"/>
- <listitem open="0" type="815" id="T3MKEc1ea274"/>
- <listitem open="0" type="815" id="hGASKtfmwz68"/>
- <listitem open="0" type="815" id="tbpXPLzYIUlS"/>
- <listitem open="0" type="815" id="CTuiKWIdpi2x"/>
- </listitem>
- <listitem open="0" type="813" id="PKaM1HoCDbbs">
- <listitem open="0" type="815" id="9XqhABel8vQp"/>
- <listitem open="0" type="815" id="NEwBjALDOYLZ"/>
- <listitem open="0" type="815" id="1d6wHoJQJ85R"/>
- <listitem open="0" type="815" id="HTkd14D2hHxy"/>
- <listitem open="0" type="815" id="5GNMOQlf8w5j"/>
- <listitem open="0" type="815" id="eUFJlAFoRa8n"/>
- <listitem open="0" type="815" id="LRrZ1Amdd0uO"/>
- <listitem open="0" type="815" id="IhK4EwFZN47M"/>
- <listitem open="0" type="815" id="ZNNXgsCLjZ9L"/>
- <listitem open="0" type="815" id="NNO4wVOiTcLY"/>
- <listitem open="0" type="815" id="Zb7DtWwB4Jq6"/>
- <listitem open="0" type="815" id="saWlezaFp5GI"/>
- <listitem open="0" type="815" id="skCu331ubVfG"/>
- </listitem>
- <listitem open="0" type="813" id="0dybVkdpO4Ya">
- <listitem open="0" type="815" id="DcrHJRGd69d1"/>
- <listitem open="0" type="815" id="zdmBV5JTgF4A"/>
- <listitem open="0" type="815" id="xfzMjXwu7lBR"/>
- <listitem open="0" type="815" id="DP4JYfKYI6jn"/>
- <listitem open="0" type="815" id="UQWbBi2O55he"/>
- <listitem open="0" type="815" id="H3FD0lpUBM5M"/>
- <listitem open="0" type="815" id="nZmdYqjnrwyr"/>
- <listitem open="0" type="815" id="hmJq6ND6RyBa"/>
- <listitem open="0" type="815" id="8P8dmSdYZ6WN"/>
- <listitem open="0" type="815" id="2JQaOuviJdxq"/>
- <listitem open="0" type="815" id="W8mdiQTkhtI5"/>
- <listitem open="0" type="815" id="yB425IP1woFk"/>
- <listitem open="0" type="815" id="QH7JbAUZLWaO"/>
- <listitem open="0" type="815" id="xJTqs3yHK5au"/>
- <listitem open="0" type="815" id="c6XgqXacWmjX"/>
- <listitem open="0" type="815" id="t1s0sfKSjp8X"/>
- <listitem open="0" type="815" id="LiArUrM0W8Je"/>
- </listitem>
- <listitem open="0" type="813" id="1Ey5TfpDf9m6"/>
- <listitem open="0" type="813" id="kzdjBd3ATyt6">
- <listitem open="0" type="814" id="nKss3o39Z3mH"/>
- <listitem open="0" type="814" id="hAaBJZSsONVc"/>
- <listitem open="0" type="814" id="pkjdKJy5coyd"/>
- <listitem open="0" type="815" id="im0mz7VTwqde"/>
- <listitem open="0" type="815" id="pKyAH6gz5KiE"/>
- <listitem open="0" type="815" id="ahQVV19KM6Sd"/>
- <listitem open="0" type="815" id="MmERazCgANkp"/>
- <listitem open="0" type="815" id="ko4mJmHnb6dV"/>
- <listitem open="0" type="815" id="eEUEK7jiBIVH"/>
- <listitem open="0" type="815" id="OQvPjNSdoMD9"/>
- <listitem open="0" type="815" id="nYuf4k0S9tps"/>
- <listitem open="0" type="815" id="EFV3cgAkX8PK"/>
- <listitem open="0" type="815" id="mfbvYQongHoG"/>
- <listitem open="0" type="815" id="wy0T5PosZ0fm"/>
- <listitem open="0" type="815" id="qLNWbBkV7iyA"/>
- <listitem open="0" type="815" id="8k2fkgPJT90J"/>
- </listitem>
- <listitem open="0" type="813" id="IZRHkhpzqhMU">
- <listitem open="0" type="814" id="zitjPGm6qY09"/>
- <listitem open="0" type="814" id="5qTvnqHkXBRu"/>
- <listitem open="0" type="814" id="DPrhzQm3HEy2"/>
- <listitem open="0" type="814" id="2EnZNESmSPzB"/>
- <listitem open="0" type="814" id="xiKXdCEggIcz"/>
- <listitem open="0" type="814" id="EOZVZ8expr8W"/>
- <listitem open="0" type="814" id="KqCUniraUydb"/>
- <listitem open="0" type="814" id="jSxqHDZ353l5"/>
- <listitem open="0" type="815" id="xRABKcNpOV5J"/>
- <listitem open="0" type="815" id="zPHtP7vheMwO"/>
- <listitem open="0" type="815" id="1lMrQiLN9TXR"/>
- <listitem open="0" type="815" id="KEJ1DUAIZv2z"/>
- <listitem open="0" type="815" id="f9P7af0mFF3F"/>
- <listitem open="0" type="815" id="0lJclna3zr4A"/>
- <listitem open="0" type="815" id="T8Z3NQEGH7ML"/>
- <listitem open="0" type="815" id="5iNpL2FlFj8H"/>
- <listitem open="0" type="815" id="jcowJuBaZrXF"/>
- <listitem open="0" type="815" id="MJLSMWZZvOFv"/>
- <listitem open="0" type="815" id="p1y6Fu8I8tpV"/>
- <listitem open="0" type="815" id="Y0PUMeNBdLFt"/>
- <listitem open="0" type="815" id="HZrnbKc8I1af"/>
- <listitem open="0" type="815" id="DhxPkoG1N7ox"/>
- <listitem open="0" type="815" id="CRLagBBtq8Ha"/>
- <listitem open="0" type="815" id="z4DZCWPOvlyb"/>
- <listitem open="0" type="815" id="wATkGiKDFtWr"/>
- <listitem open="0" type="815" id="ahjnbDcoyUr4"/>
- <listitem open="0" type="815" id="136dSjRMjbCV"/>
- <listitem open="0" type="815" id="PQfLtUOuVUXx"/>
- <listitem open="0" type="815" id="AjZRvLGIjvda"/>
- <listitem open="0" type="815" id="X2hccv8mcfCV"/>
- <listitem open="0" type="815" id="myq7G2MbZKOn"/>
- <listitem open="0" type="815" id="ReIMjhiTdYYt"/>
- <listitem open="0" type="815" id="fKjXuyfQOaKD"/>
- <listitem open="0" type="815" id="Zk3mOOuxMTvs"/>
- <listitem open="0" type="815" id="K6oQkbzQMuPj"/>
- <listitem open="0" type="815" id="ULdooZg6fVWO"/>
- <listitem open="0" type="815" id="6UmQO996fuvn"/>
- <listitem open="0" type="815" id="BWqEwugW6DjD"/>
- <listitem open="0" type="815" id="LLPxuF93mzIi"/>
- <listitem open="0" type="815" id="uwC09tBoaxsj"/>
- <listitem open="0" type="815" id="QjDAgVtaR3ZY"/>
- <listitem open="0" type="815" id="CmISlngwj5jf"/>
- <listitem open="0" type="815" id="CfgdedIp2S9u"/>
- <listitem open="0" type="815" id="ZRWilA5HYL4X"/>
- <listitem open="0" type="815" id="GGK4gGiFhFyR"/>
- <listitem open="0" type="815" id="t0olDy9TFRVv"/>
- <listitem open="0" type="815" id="ZujdMU2Yivse"/>
- <listitem open="0" type="815" id="oanUnvIFLsAE"/>
- <listitem open="0" type="815" id="Cgp0C9p3rfYJ"/>
- <listitem open="0" type="815" id="gYC6aaPInAiS"/>
- <listitem open="0" type="815" id="H9Ikbsmbq7Py"/>
- <listitem open="0" type="815" id="XoYdAMJNuZQZ"/>
- <listitem open="0" type="815" id="MUgWMFI5Q9BP"/>
- <listitem open="0" type="815" id="VP73tU02COsN"/>
- <listitem open="0" type="815" id="EaaxRVWq8622"/>
- <listitem open="0" type="815" id="VQBIn8O3Ni0O"/>
- </listitem>
- <listitem open="0" type="813" id="ajbkAQwdNn0L">
- <listitem open="0" type="814" id="UluQFtCGhE0l"/>
- <listitem open="0" type="814" id="5psZ1bacKBMT"/>
- <listitem open="0" type="814" id="ZG4w24GWoAw3"/>
- <listitem open="0" type="814" id="47HjJFSM5Lt6"/>
- </listitem>
- <listitem open="0" type="813" id="3PksAGjP1DIY">
- <listitem open="0" type="814" id="tJbdsVYsSKl5"/>
- <listitem open="0" type="814" id="vTEpSL31kzln"/>
- <listitem open="0" type="814" id="QJhQsq5k8fNy"/>
- <listitem open="0" type="814" id="8tqZDae63qtT"/>
- <listitem open="0" type="814" id="Do8JRTHaK87V"/>
- <listitem open="0" type="814" id="glbjaTCkQfeK"/>
- <listitem open="0" type="814" id="QZ9lfEGLyq2Y"/>
- <listitem open="0" type="814" id="z0y7xDgOmo7P"/>
- <listitem open="0" type="814" id="2Ni0DkWUvoBn"/>
- <listitem open="0" type="815" id="AsynVX0oIj6T"/>
- <listitem open="0" type="815" id="F2T7dHKMVtvK"/>
- <listitem open="0" type="815" id="qkqLblf53Ad1"/>
- <listitem open="0" type="815" id="C4I9PHQNysd1"/>
- <listitem open="0" type="815" id="GwXCo8DWrX89"/>
- <listitem open="0" type="815" id="PEMADuKTopfa"/>
- <listitem open="0" type="815" id="AuvPaSB7VxkO"/>
- <listitem open="0" type="815" id="aUh4QRSG2QUE"/>
- <listitem open="0" type="815" id="IK1Pxfuzkf5E"/>
- <listitem open="0" type="815" id="BdJZIhyYzzvu"/>
- <listitem open="0" type="815" id="gzPgyLadAUzd"/>
- <listitem open="0" type="815" id="Qa0kOp6GSnhn"/>
- <listitem open="0" type="815" id="Wz1wkhjV4ypT"/>
- <listitem open="0" type="815" id="F1XTdEhaWXeI"/>
- <listitem open="0" type="815" id="DCWI9LjMNEp0"/>
- <listitem open="0" type="815" id="TUZzzDGJWh3Y"/>
- <listitem open="0" type="815" id="ED9bSyZtQ6sQ"/>
- <listitem open="0" type="815" id="vVXbN1ObCXAc"/>
- <listitem open="0" type="815" id="VLI1LbJhDfWm"/>
- <listitem open="0" type="815" id="iAX0mh0jhwqf"/>
- <listitem open="0" type="815" id="ztpGp1nrVcLx"/>
- <listitem open="0" type="815" id="kR8gfwCE82FE"/>
- <listitem open="0" type="815" id="8VvUhtygnnua"/>
- <listitem open="0" type="815" id="pgQIIjG2AOio"/>
- <listitem open="0" type="815" id="PR4ADzl2fBKx"/>
- <listitem open="0" type="815" id="6IRnouDDJFMW"/>
- <listitem open="0" type="815" id="E7WrGroAPlAK"/>
- <listitem open="0" type="815" id="Q1YwqBMuTlhF"/>
- <listitem open="0" type="815" id="COAd9rtmkIhs"/>
- <listitem open="0" type="815" id="lQFBQKQagaEq"/>
- <listitem open="0" type="815" id="Y4aFco52tfAG"/>
- <listitem open="0" type="815" id="vAgGJ3fqTskC"/>
- <listitem open="0" type="815" id="kKTDDDNEw1px"/>
- <listitem open="0" type="815" id="JPVfZIcV8bIc"/>
- <listitem open="0" type="815" id="JKLFJADdZgG6"/>
- <listitem open="0" type="815" id="d8gn0UhKQQiL"/>
- <listitem open="0" type="815" id="xzO34XLCmvyg"/>
- <listitem open="0" type="815" id="kpNH1ycS3hdJ"/>
- <listitem open="0" type="815" id="JTIcHfu1hcoN"/>
- </listitem>
- <listitem open="0" type="813" id="97JXVDPWi2XZ"/>
- <listitem open="0" type="813" id="HaP8ZCy8plaL">
- <listitem open="0" type="814" id="Wyku01OWbn80"/>
- <listitem open="0" type="814" id="Qye7PFvVCgxa"/>
- <listitem open="0" type="814" id="wo5LHtolrYgq"/>
- <listitem open="0" type="814" id="e6geZ8aObm6V"/>
- <listitem open="0" type="815" id="Y4M9pS7FRmMo"/>
- <listitem open="0" type="815" id="zGJ9uEjq2mBI"/>
- <listitem open="0" type="815" id="pCqXr26yLqVP"/>
- <listitem open="0" type="815" id="uEZ9MQsBagiP"/>
- <listitem open="0" type="815" id="gmL0dqPYepr5"/>
- <listitem open="0" type="815" id="ArBiXr7CeSCF"/>
- <listitem open="0" type="815" id="LfRx6bCNCxGa"/>
- <listitem open="0" type="815" id="aEPZWFXDDNYy"/>
- <listitem open="0" type="815" id="8qXKmnsK1ItV"/>
- <listitem open="0" type="815" id="VOjimHg0AVvX"/>
- <listitem open="0" type="815" id="WvlVBc1g1iOl"/>
- <listitem open="0" type="815" id="x3j6YcbSepSG"/>
- <listitem open="0" type="815" id="BMgA23ty6c4c"/>
- <listitem open="0" type="815" id="Ff2tSU7783RU"/>
- <listitem open="0" type="815" id="0EKrlfsv0Y30"/>
- <listitem open="0" type="815" id="StUj99llDRPn"/>
- <listitem open="0" type="815" id="cFsPi6AvfZ2W"/>
- <listitem open="0" type="815" id="wa9sY7FBM5Y2"/>
- <listitem open="0" type="815" id="GIrdG4ICfR4B"/>
- </listitem>
- <listitem open="0" type="813" id="khBqlcIjqaYa">
- <listitem open="0" type="814" id="FQVDxYEWTCA1"/>
- <listitem open="0" type="815" id="FNlsdNwN57Bo"/>
- <listitem open="0" type="815" id="jTXY358GUbUP"/>
- <listitem open="0" type="815" id="9ivbs5c5RLy4"/>
- <listitem open="0" type="815" id="yHOPcKTLFq7F"/>
- <listitem open="0" type="815" id="STarMHAKWYi8"/>
- <listitem open="0" type="815" id="GPJmv1uoBMsB"/>
- <listitem open="0" type="815" id="w6pFoDutXMZa"/>
- <listitem open="0" type="815" id="Wpaq08JPHCMI"/>
- <listitem open="0" type="815" id="igYzrsF8jPVL"/>
- <listitem open="0" type="815" id="SSsbEeW9LIdO"/>
- <listitem open="0" type="815" id="fdvnDIwvwUsn"/>
- <listitem open="0" type="815" id="s0ADIlbxMUiZ"/>
- <listitem open="0" type="815" id="qa8yLazS9pRI"/>
- <listitem open="0" type="815" id="WFgAavh42rB6"/>
- </listitem>
- <listitem open="0" type="813" id="l6c6ZbY9k4oU">
- <listitem open="0" type="814" id="b8rzl0c6gBqq"/>
- <listitem open="0" type="814" id="0cyrqanRieOR"/>
- <listitem open="0" type="814" id="dzYHAM8cQs2B"/>
- <listitem open="0" type="814" id="FTzfSCWSoSIc"/>
- <listitem open="0" type="814" id="252jhQAIPgaZ"/>
- <listitem open="0" type="814" id="2g9RY9cmdZP3"/>
- <listitem open="0" type="814" id="NnWRJWdvFfV2"/>
- <listitem open="0" type="815" id="mvUaOmBOpD7W"/>
- <listitem open="0" type="815" id="dIn1yNYz1iOX"/>
- <listitem open="0" type="815" id="y60gutN2JyCQ"/>
- <listitem open="0" type="815" id="0sL0ojaScSgS"/>
- <listitem open="0" type="815" id="pnLPFzpTppY8"/>
- <listitem open="0" type="815" id="hChUzDaswxtr"/>
- <listitem open="0" type="815" id="sbamXTblQQWS"/>
- <listitem open="0" type="815" id="m5SYjTGZ4rMb"/>
- <listitem open="0" type="815" id="lTrjgzaT40zm"/>
- <listitem open="0" type="815" id="G8oA9JesnUbT"/>
- <listitem open="0" type="815" id="HBWsZYqoecwo"/>
- <listitem open="0" type="815" id="yE85nGH2Qnuz"/>
- <listitem open="0" type="815" id="a9myCiVAudGg"/>
- <listitem open="0" type="815" id="gGrwanFBuz76"/>
- <listitem open="0" type="815" id="iaHcEVG42zII"/>
- <listitem open="0" type="815" id="0KMsIRzy2EYE"/>
- <listitem open="0" type="815" id="jpGjoYzK3q8Y"/>
- <listitem open="0" type="815" id="l7mpxsL7M0u4"/>
- <listitem open="0" type="815" id="mskrAICuoXdX"/>
- <listitem open="0" type="815" id="k1SNpgCZzaNa"/>
- <listitem open="0" type="815" id="4BuOJTKhEo6V"/>
- <listitem open="0" type="815" id="ADkV7ZCp3CBi"/>
- <listitem open="0" type="815" id="nQj9T8nxc6e2"/>
- <listitem open="0" type="815" id="zbFi79sfdIB2"/>
- <listitem open="0" type="815" id="NdFZJkiRSf4s"/>
- </listitem>
- <listitem open="0" type="813" id="hCCozGYEQBhw"/>
- <listitem open="0" type="813" id="2OUKpDmUU6Tg"/>
- <listitem open="0" type="813" id="PDzFlxMB73D7"/>
- <listitem open="0" type="813" id="CxVwuGjKYPlO"/>
- <listitem open="0" type="813" id="lmHNZqFB8Nj8"/>
- <listitem open="0" type="813" id="kooC0I8IkF1k">
- <listitem open="0" type="814" id="MSPW0bORYUMs"/>
- <listitem open="0" type="814" id="4bRqVlwcVPoa"/>
- <listitem open="0" type="814" id="j4ZX3m01ehFH"/>
- <listitem open="0" type="814" id="Zngo7fg9F50k"/>
- <listitem open="0" type="814" id="qwKJJ8t2CTZE"/>
- <listitem open="0" type="814" id="SEUhKSP8PjSi"/>
- <listitem open="0" type="814" id="pLlzmIBzqOr3"/>
- <listitem open="0" type="814" id="pzp2mQLEcovw"/>
- <listitem open="0" type="814" id="GI5f1VMoo7nb"/>
- <listitem open="0" type="814" id="NzaCLPFAN3B9"/>
- <listitem open="0" type="814" id="RWN3IGyZW1CV"/>
- <listitem open="0" type="814" id="WYJKf6t13UDP"/>
- <listitem open="0" type="814" id="rQXERiNsDiuV"/>
- <listitem open="0" type="814" id="wq4SrHxLpGfT"/>
- <listitem open="0" type="814" id="JxYpsEM9xWub"/>
- <listitem open="0" type="814" id="JXPFIAgz5MJu"/>
- <listitem open="0" type="814" id="AXAYvicEdA1T"/>
- <listitem open="0" type="814" id="HMoWMarc8Qsx"/>
- <listitem open="0" type="814" id="fIZddmejZuth"/>
- <listitem open="0" type="815" id="kjwpsBsKYDVA"/>
- <listitem open="0" type="815" id="uCoTe8JPrGEk"/>
- <listitem open="0" type="815" id="R72zIX7svlbt"/>
- <listitem open="0" type="815" id="jYE8r2VkFHBr"/>
- <listitem open="0" type="815" id="VBgQwIJgoVmd"/>
- <listitem open="0" type="815" id="K3ts3zgWBNu5"/>
- <listitem open="0" type="815" id="yc5zTBjlFcbI"/>
- <listitem open="0" type="815" id="DkbSKCiuSUc5"/>
- <listitem open="0" type="815" id="AQJ4wwczcOih"/>
- <listitem open="0" type="815" id="BdjXdjNqRyHm"/>
- <listitem open="0" type="815" id="8xeZSGecfweb"/>
- <listitem open="0" type="815" id="sFYUdEAortKU"/>
- <listitem open="0" type="815" id="ahJ0dYmjVOIx"/>
- <listitem open="0" type="815" id="bMrSDBvmqCmR"/>
- <listitem open="0" type="815" id="NFHOWKrVnBiw"/>
- <listitem open="0" type="815" id="LJul1NAOaPk4"/>
- <listitem open="0" type="815" id="3UdcrOgZ0E2l"/>
- <listitem open="0" type="815" id="URuAoQzkExjU"/>
- <listitem open="0" type="815" id="UTGShGDCg6KU"/>
- <listitem open="0" type="815" id="cspTzc7T5Lum"/>
- <listitem open="0" type="815" id="rXxHkNsMDhnC"/>
- <listitem open="0" type="815" id="KqWrmuedPauA"/>
- <listitem open="0" type="815" id="VDI8EOxZFSO1"/>
- <listitem open="0" type="815" id="gzVrwZIPkYVz"/>
- <listitem open="0" type="815" id="Om2g8eSodxdX"/>
- <listitem open="0" type="815" id="cktXZl2vV2bd"/>
- <listitem open="0" type="815" id="8vjzeIhE0YlZ"/>
- <listitem open="0" type="815" id="pZWhID3Q7mQj"/>
- <listitem open="0" type="815" id="88jEvVHk2oPK"/>
- <listitem open="0" type="815" id="UomwtUB1cuDX"/>
- <listitem open="0" type="815" id="cCSpxfdPTOMK"/>
- <listitem open="0" type="815" id="qrbuJy9t9Zg6"/>
- <listitem open="0" type="815" id="EKUigo2WJMyg"/>
- <listitem open="0" type="815" id="twPt8WCyMlqf"/>
- <listitem open="0" type="815" id="ixYrXFvjXPRD"/>
- <listitem open="0" type="815" id="3iePRU49Sa0x"/>
- <listitem open="0" type="815" id="I7gihefVYKpq"/>
- <listitem open="0" type="815" id="ONJubGCVL5xw"/>
- <listitem open="0" type="815" id="MesuwiiK31Ec"/>
- <listitem open="0" type="815" id="sWzhalxf12xL"/>
- <listitem open="0" type="815" id="jeFkgC6BZQbo"/>
- <listitem open="0" type="815" id="C0EBnuxLhyas"/>
- <listitem open="0" type="815" id="RbuTZc1JEE3v"/>
- <listitem open="0" type="815" id="qokWkKOCwIdV"/>
- <listitem open="0" type="815" id="kw7NswohkYDV"/>
- <listitem open="0" type="815" id="6pgrMtKDSxyI"/>
- <listitem open="0" type="815" id="FE29Dtu2kvhf"/>
- <listitem open="0" type="815" id="6mJFxKE19tqT"/>
- <listitem open="0" type="815" id="mAgD5cVJrVS2"/>
- <listitem open="0" type="815" id="KiTSbJvOSaZX"/>
- <listitem open="0" type="815" id="C4q1ZG4vY7zl"/>
- <listitem open="0" type="815" id="rg2LhYn1HGTq"/>
- <listitem open="0" type="815" id="RHZgV1W1Oj0L"/>
- <listitem open="0" type="815" id="UTSKnbgJmwP4"/>
- <listitem open="0" type="815" id="CjQYSQrxsJFd"/>
- <listitem open="0" type="815" id="miLUqmIF4Mp6"/>
- <listitem open="0" type="815" id="m041la1QGicY"/>
- <listitem open="0" type="815" id="WOLI6fzsId4V"/>
- <listitem open="0" type="815" id="ubxT7hdob1It"/>
- <listitem open="0" type="815" id="ZCvoicom5P8Q"/>
- <listitem open="0" type="815" id="PCJLv0HglTc0"/>
- <listitem open="0" type="815" id="41vxmbYlMoBI"/>
- <listitem open="0" type="815" id="YH3eH1QfEhy7"/>
- <listitem open="0" type="815" id="iFnTjOTnPNiB"/>
- <listitem open="0" type="815" id="yHuK34acLdGa"/>
- <listitem open="0" type="815" id="dgFpMDw4ThVA"/>
- </listitem>
- <listitem open="0" type="813" id="Kd2vdgexbsmt">
- <listitem open="0" type="814" id="AG2SxqbqTRBU"/>
- <listitem open="0" type="814" id="UZ6on8MB4gMB"/>
- <listitem open="0" type="814" id="mx3Mg8qoMtGJ"/>
- <listitem open="0" type="814" id="hr98IJcksgZd"/>
- <listitem open="0" type="814" id="pvmrc72M25ji"/>
- <listitem open="0" type="814" id="BZUXQio6ZwEp"/>
- <listitem open="0" type="814" id="Fra5X9gK2TBe"/>
- <listitem open="0" type="814" id="YEzaHiGRFiwg"/>
- <listitem open="0" type="814" id="QlkxfymspMxL"/>
- <listitem open="0" type="814" id="TdfU4p6a158I"/>
- <listitem open="0" type="814" id="nMh14efSNPP0"/>
- <listitem open="0" type="814" id="NCsBWpWyQ9ST"/>
- <listitem open="0" type="814" id="wY1xeAEPUvOX"/>
- <listitem open="0" type="814" id="X3zsSNsoZkz3"/>
- <listitem open="0" type="814" id="ZT1yaRPX0QUc"/>
- <listitem open="0" type="814" id="Ygz3cOa7RX0s"/>
- <listitem open="0" type="814" id="useRdbTA2S6c"/>
- <listitem open="0" type="814" id="uV7suaSSGRVq"/>
- <listitem open="0" type="814" id="p3yFZy5RohrR"/>
- <listitem open="0" type="814" id="IKaKkgueA0U4"/>
- <listitem open="0" type="814" id="awWoM0fB1dOY"/>
- <listitem open="0" type="814" id="ZR0N8pnQ7Nir"/>
- <listitem open="0" type="814" id="1dWBdyFBtkzF"/>
- <listitem open="0" type="814" id="ieOhFnGoCECL"/>
- <listitem open="0" type="814" id="3zjAKS1L3VXe"/>
- <listitem open="0" type="814" id="SkpLSmaARyse"/>
- <listitem open="0" type="814" id="KjgU387lTfM4"/>
- <listitem open="0" type="814" id="SXVBdch4R92A"/>
- <listitem open="0" type="814" id="ahSdaFNuw4Mz"/>
- <listitem open="0" type="815" id="j6TwKdFLayVu"/>
- <listitem open="0" type="815" id="dL42Hug1y7vI"/>
- <listitem open="0" type="815" id="kAbK66CTYSsW"/>
- <listitem open="0" type="815" id="AuwdkfXL0ZNG"/>
- <listitem open="0" type="815" id="R2HP9AhuKGCO"/>
- <listitem open="0" type="815" id="MPrspkPzeJbM"/>
- <listitem open="0" type="815" id="z8ixf5D67SVF"/>
- <listitem open="0" type="815" id="cA9uQJJkiAcV"/>
- <listitem open="0" type="815" id="szVWJ4rGCZBp"/>
- <listitem open="0" type="815" id="cNvkpQxQY4Ky"/>
- <listitem open="0" type="815" id="Nbg4kIZcI27Z"/>
- <listitem open="0" type="815" id="6ypGXy59LyrB"/>
- <listitem open="0" type="815" id="MoZusrqETWID"/>
- <listitem open="0" type="815" id="npn3sucwsPDN"/>
- <listitem open="0" type="815" id="NGVjFMsZ9PU1"/>
- <listitem open="0" type="815" id="GIFhpVsaLgdB"/>
- <listitem open="0" type="815" id="cULltnk86ynt"/>
- <listitem open="0" type="815" id="TgToM4zuH7Jr"/>
- <listitem open="0" type="815" id="N4mwJPgvt0el"/>
- <listitem open="0" type="815" id="FaXUhoJ5q6zA"/>
- <listitem open="0" type="815" id="Ve3Mei5R7wJS"/>
- <listitem open="0" type="815" id="nGCcKAmnopAS"/>
- <listitem open="0" type="815" id="VFrcA82jAJaP"/>
- <listitem open="0" type="815" id="6B5syFIUS84a"/>
- <listitem open="0" type="815" id="G7JQOsnYud9u"/>
- <listitem open="0" type="815" id="u3hMBmxRrEsF"/>
- <listitem open="0" type="815" id="4dlxGurcnYud"/>
- <listitem open="0" type="815" id="YNtPbjeeMNbb"/>
- <listitem open="0" type="815" id="ISB5y5gcc9Tn"/>
- <listitem open="0" type="815" id="huv1IWcawldu"/>
- <listitem open="0" type="815" id="pIURRxCqX5Us"/>
- <listitem open="0" type="815" id="qqnmbQhQg9p8"/>
- <listitem open="0" type="815" id="70we5QUW1EcY"/>
- <listitem open="0" type="815" id="cbsJlfPsfLUl"/>
- <listitem open="0" type="815" id="kyFjDrIUs4gC"/>
- <listitem open="0" type="815" id="tbVXvzGfvVM8"/>
- <listitem open="0" type="815" id="KeaAhEKnJgkc"/>
- <listitem open="0" type="815" id="wyqrRC0mpYuW"/>
- <listitem open="0" type="815" id="nFJ4v1hs7BhP"/>
- <listitem open="0" type="815" id="NuTCSOgDbxIW"/>
- <listitem open="0" type="815" id="zxN484U1E5BM"/>
- <listitem open="0" type="815" id="Bttmq9Hn6cqE"/>
- <listitem open="0" type="815" id="gIDuNMFjseMW"/>
- <listitem open="0" type="815" id="teBzG1BxJNpe"/>
- <listitem open="0" type="815" id="h2NXgh3fPatt"/>
- <listitem open="0" type="815" id="VWlmtZQabl8G"/>
- <listitem open="0" type="815" id="T9vqknh4YDy3"/>
- <listitem open="0" type="815" id="oOiN7qda0XRi"/>
- <listitem open="0" type="815" id="K8kqKgrRvI8e"/>
- <listitem open="0" type="815" id="1bqz6FhOMREe"/>
- <listitem open="0" type="815" id="8651ODePoSjf"/>
- <listitem open="0" type="815" id="dyIxOWbUagVy"/>
- <listitem open="0" type="815" id="t9Lga4LpDYAZ"/>
- <listitem open="0" type="815" id="FMxp3RmuY7a8"/>
- <listitem open="0" type="815" id="AtvLS4uEomnw"/>
- <listitem open="0" type="815" id="qigPoHVw8RHY"/>
- <listitem open="0" type="815" id="VAmHuXDpjund"/>
- <listitem open="0" type="815" id="pO7wpMUIUFZO"/>
- <listitem open="0" type="815" id="kkBTez6zEq5v"/>
- <listitem open="0" type="815" id="Wmk1zHPj1ZDg"/>
- <listitem open="0" type="815" id="YHdm8hgfe7bA"/>
- <listitem open="0" type="815" id="anCcMNGsetck"/>
- <listitem open="0" type="815" id="aINDNyNmctsS"/>
- <listitem open="0" type="815" id="AA7o1kXa0unO"/>
- <listitem open="0" type="815" id="rAAT20ufQjl8"/>
- <listitem open="0" type="815" id="yb1yToMKzUmz"/>
- <listitem open="0" type="815" id="UeevNN1EkP5r"/>
- <listitem open="0" type="815" id="hC99QDYMmaKF"/>
- <listitem open="0" type="815" id="OfYL9KIewwXJ"/>
- <listitem open="0" type="815" id="KYX2xbrcl0j9"/>
- <listitem open="0" type="815" id="mGwfH4GlRyrH"/>
- <listitem open="0" type="815" id="eeB3a1KcfRtF"/>
- <listitem open="0" type="815" id="70J7yst8fTa3"/>
- <listitem open="0" type="815" id="Cx1k7cEEcXJY"/>
- <listitem open="0" type="815" id="3eQakWDTr7mj"/>
- <listitem open="0" type="815" id="WRvK8CSUMkAa"/>
- <listitem open="0" type="815" id="mkESDsbuUd5h"/>
- <listitem open="0" type="815" id="VUHK1ajgE3p9"/>
- <listitem open="0" type="815" id="t0J373cnViQ8"/>
- </listitem>
- <listitem open="0" type="813" id="uHdgUvjiSZG6">
- <listitem open="0" type="814" id="Yyh5FtRuHHXU"/>
- <listitem open="0" type="814" id="gMWpiyFzxNga"/>
- <listitem open="0" type="815" id="qlEY5IQdG7gV"/>
- <listitem open="0" type="815" id="83x5QdeEMsmS"/>
- <listitem open="0" type="815" id="AA3OFitDoHPB"/>
- <listitem open="0" type="815" id="v7fHzPj7ZlVo"/>
- <listitem open="0" type="815" id="TNzFePOoUYDm"/>
- <listitem open="0" type="815" id="0qsXZLJ0gGFK"/>
- <listitem open="0" type="815" id="fd68BKuhu4Er"/>
- <listitem open="0" type="815" id="OXC5oPNR3SZC"/>
- </listitem>
- <listitem open="0" type="813" id="gjYrACSC9BuB">
- <listitem open="0" type="814" id="M2LZCyY6pGdk"/>
- <listitem open="0" type="814" id="CK2gDNwU6enG"/>
- <listitem open="0" type="814" id="131qHeYSxZ6A"/>
- <listitem open="0" type="814" id="aFQc6PzmnrBh"/>
- <listitem open="0" type="814" id="d4vdm39XH5iE"/>
- <listitem open="0" type="814" id="mBRb0wQvPAtZ"/>
- <listitem open="0" type="815" id="0X10zUZAnpwn"/>
- <listitem open="0" type="815" id="KsBy2uT9wopo"/>
- <listitem open="0" type="815" id="7TE2jX8Ma10K"/>
- <listitem open="0" type="815" id="uvcJ4TrBw5Bf"/>
- <listitem open="0" type="815" id="rFBZBjF5cpNg"/>
- <listitem open="0" type="815" id="tUvwobDdoOAz"/>
- <listitem open="0" type="815" id="9ZiQQhyHAtDw"/>
- <listitem open="0" type="815" id="TQaHmiFq6IUI"/>
- <listitem open="0" type="815" id="gqkGyQ57xlXN"/>
- <listitem open="0" type="815" id="JWCFIicjCFIX"/>
- <listitem open="0" type="815" id="4nMIrOGdf2TE"/>
- <listitem open="0" type="815" id="KcPOVqRmKc1a"/>
- <listitem open="0" type="815" id="KeHWrZ1vLLBC"/>
- <listitem open="0" type="815" id="pZ8899iTn0xc"/>
- <listitem open="0" type="815" id="6zKyySKmzQu9"/>
- <listitem open="0" type="815" id="ZcaLcWxATT2j"/>
- <listitem open="0" type="815" id="eFrcfjjEKJZu"/>
- <listitem open="0" type="815" id="pM5wa20DHppw"/>
- <listitem open="0" type="815" id="vlL3Rm7G8CDj"/>
- <listitem open="0" type="815" id="CEdN2RWxCr0d"/>
- <listitem open="0" type="815" id="2HoHnEKxQvKS"/>
- <listitem open="0" type="815" id="5U9Jo3YqLK66"/>
- <listitem open="0" type="815" id="8NAXODETgMlU"/>
- <listitem open="0" type="815" id="PJKidQn9op68"/>
- <listitem open="0" type="815" id="b7CFTxjrG3Xr"/>
- <listitem open="0" type="815" id="SIyE55KFZ6co"/>
- <listitem open="0" type="815" id="HjSVlyKBGJNM"/>
- </listitem>
- <listitem open="0" type="813" id="vSu5lsg0a7WJ">
- <listitem open="0" type="815" id="LbXsqqCDrQXh"/>
- <listitem open="0" type="815" id="ULvVrrbCQ62E"/>
- <listitem open="0" type="815" id="wFSmfxTawuTH"/>
- <listitem open="0" type="815" id="83mpM46qOzJF"/>
- </listitem>
- <listitem open="0" type="813" id="emjq7Xks8DWW">
- <listitem open="0" type="815" id="DNXsEDC2K4mJ"/>
- <listitem open="0" type="815" id="fmyMYtyjGWbT"/>
- <listitem open="0" type="815" id="jlV1nGKAzisQ"/>
- <listitem open="0" type="815" id="M52bZb4GNXHA"/>
- </listitem>
- <listitem open="0" type="813" id="DhQX2rY6wPDZ"/>
- <listitem open="0" type="813" id="TJe4s63xXy2f"/>
- <listitem open="0" type="813" id="E4ek4y1U3HLE"/>
- <listitem open="0" type="813" id="tWAq6KHaeveU"/>
- <listitem open="0" type="813" id="YFYivL7lKsyo"/>
- <listitem open="0" type="813" id="6Qx7AaWcHvu9"/>
- <listitem open="0" type="813" id="YkJeSfDyIVQI"/>
- <listitem open="0" type="813" id="eKZEv9oVXM34"/>
- <listitem open="0" type="813" id="UgPIutO5ambc"/>
- <listitem open="0" type="813" id="axOd2PMcsqyz"/>
- <listitem open="0" type="813" id="2yOeu36ujWRN"/>
- <listitem open="1" type="813" id="O8DTzb5kluKg"/>
- <listitem open="0" type="813" id="9uUW4XZ5t7nP"/>
- <listitem open="0" type="813" id="0o4m5sr9WEj3"/>
- <listitem open="0" type="813" id="uUiFf2iFHkBJ"/>
- <listitem open="0" type="813" id="0lRF51Cex1tP"/>
- <listitem open="0" type="813" id="dBvvR3kpanaF">
- <listitem open="0" type="814" id="DNaf2fosEYp6"/>
- <listitem open="0" type="814" id="yCEYCVwasJEM"/>
- <listitem open="0" type="814" id="lK5p4wmHHMxI"/>
- <listitem open="0" type="814" id="zjADHzJD9XkJ"/>
- <listitem open="0" type="814" id="3gtty6EhQJUU"/>
- <listitem open="0" type="814" id="frhxJACauh8Z"/>
- <listitem open="0" type="814" id="SgvPQYIQNKxu"/>
- <listitem open="0" type="814" id="fV8suH9Y6rVO"/>
- <listitem open="0" type="814" id="1fyvN4SpkND9"/>
- <listitem open="0" type="814" id="tVZFpU9SzFLr"/>
- <listitem open="0" type="814" id="VSPZJuxIatDv"/>
- <listitem open="0" type="814" id="91lljHb4Hsc9"/>
- <listitem open="0" type="815" id="ydigyvpsOM5B"/>
- <listitem open="0" type="815" id="qCenSxfvP4Uh"/>
- <listitem open="0" type="815" id="7RFUTkBQABvR"/>
- <listitem open="0" type="815" id="LRUTaPuslbzF"/>
- <listitem open="0" type="815" id="EqjdLb7V6YYi"/>
- <listitem open="0" type="815" id="jwULXkPs9tJi"/>
- <listitem open="0" type="815" id="GDaznZC1Qvcj"/>
- <listitem open="0" type="815" id="XiEbElJyhlJC"/>
- <listitem open="0" type="815" id="Tg2dXLJoWrnJ"/>
- <listitem open="0" type="815" id="R0JpttWOZkzo"/>
- <listitem open="0" type="815" id="THk801KUiM5F"/>
- <listitem open="0" type="815" id="hO1EFpVenmRg"/>
- <listitem open="0" type="815" id="gx5Dg2z9HjII"/>
- <listitem open="0" type="815" id="jcmRxreeDgqQ"/>
- <listitem open="0" type="815" id="TK3G6UukSxy6"/>
- <listitem open="0" type="815" id="0vFHfVZO6Jn3"/>
- <listitem open="0" type="815" id="HhdhcZncU1s7"/>
- <listitem open="0" type="815" id="WPTahGdpgHBl"/>
- <listitem open="0" type="815" id="r8eVPpF8iXfO"/>
- <listitem open="0" type="815" id="Z2MF31ZaRTar"/>
- <listitem open="0" type="815" id="3lBSDmJRU4ln"/>
- <listitem open="0" type="815" id="MwxlldaMWUgw"/>
- <listitem open="0" type="815" id="8DSaFDNb7JNs"/>
- <listitem open="0" type="815" id="uvFRNvNPHFzh"/>
- <listitem open="0" type="815" id="KA88X19dCZES"/>
- <listitem open="0" type="815" id="mZ3tsOjnJwCf"/>
- <listitem open="0" type="815" id="rBk96wovRq0C"/>
- <listitem open="0" type="815" id="qjF3ZQkOi5PZ"/>
- <listitem open="0" type="815" id="cXMIalqDa0ys"/>
- <listitem open="0" type="815" id="be0L4GBQLu9E"/>
- <listitem open="0" type="815" id="410d0wVZaTue"/>
- <listitem open="0" type="815" id="k323xCFXJCYa"/>
- <listitem open="0" type="815" id="o1FOV73DA5G6"/>
- <listitem open="0" type="815" id="HTdZfC9Yjdda"/>
- <listitem open="0" type="815" id="wZg4fwAuPmT3"/>
- <listitem open="0" type="815" id="ybZfCADSfgM1"/>
- <listitem open="0" type="815" id="hv9ikhBeHsgu"/>
- <listitem open="0" type="815" id="uORX2lYkhfQP"/>
- <listitem open="0" type="815" id="NZ3cRhUCWIM7"/>
- <listitem open="0" type="815" id="VDtCtJbErcoI"/>
- <listitem open="0" type="815" id="JISqYov5LWOa"/>
- <listitem open="0" type="815" id="JjiQSPbxaV7T"/>
- <listitem open="0" type="815" id="mihdIVuanMQK"/>
- <listitem open="0" type="815" id="cSKBEqveaO2g"/>
- <listitem open="0" type="815" id="klmZIFWoPiEg"/>
- </listitem>
- <listitem open="0" type="813" id="ElUvZ3tKAVPh">
- <listitem open="0" type="814" id="pVfTLcQeTxif"/>
- <listitem open="0" type="814" id="qRmZG8r3bVXu"/>
- <listitem open="0" type="814" id="7vWZtDEjIDoA"/>
- <listitem open="0" type="814" id="ogt6tgErZqSi"/>
- <listitem open="0" type="814" id="vCeSg7DHR3TF"/>
- <listitem open="0" type="815" id="PXAg6cosGfw7"/>
- <listitem open="0" type="815" id="JBzt1RZxbDNH"/>
- <listitem open="0" type="815" id="QqY13tHMTn64"/>
- <listitem open="0" type="815" id="l33GAhrr6JmA"/>
- <listitem open="0" type="815" id="LVxmG1r14uHE"/>
- <listitem open="0" type="815" id="Z73dQnn8aHSO"/>
- <listitem open="0" type="815" id="HWTpntDqDoR0"/>
- <listitem open="0" type="815" id="siJmA25RZYHK"/>
- <listitem open="0" type="815" id="cH4EIJO9zft9"/>
- <listitem open="0" type="815" id="vvnvaf4IdbV8"/>
- <listitem open="0" type="815" id="JPOuuyFW6wYo"/>
- <listitem open="0" type="815" id="9CRGc0zjZwQl"/>
- <listitem open="0" type="815" id="PELx2ZHMwfGq"/>
- <listitem open="0" type="815" id="skNRenB21Uz4"/>
- <listitem open="0" type="815" id="4EOytcnS577T"/>
- <listitem open="0" type="815" id="0Yy1RjgJT1j5"/>
- <listitem open="0" type="815" id="q8dtFjMDHKEi"/>
- <listitem open="0" type="815" id="3t0UujajbhVv"/>
- <listitem open="0" type="815" id="mLI6XdFNlsG0"/>
- <listitem open="0" type="815" id="eibPZrP8QbxK"/>
- <listitem open="0" type="815" id="FXVyyOFEdfuU"/>
- <listitem open="0" type="815" id="HtaR5IRIowGm"/>
- <listitem open="0" type="815" id="HmoZj7300eR5"/>
- <listitem open="0" type="815" id="uqOineU68U0I"/>
- <listitem open="0" type="815" id="NPSAAS2PFpzy"/>
- <listitem open="0" type="815" id="zHkGrUnn4Onb"/>
- </listitem>
- <listitem open="0" type="813" id="FGkVafnZOxkd"/>
- <listitem open="0" type="813" id="A2J7LcYakjsI"/>
- <listitem open="0" type="813" id="uNcSkNqyAxHb"/>
- <listitem open="0" type="813" id="4xqo1eJwmBM3">
- <listitem open="0" type="814" id="zRkSwGNALXUk"/>
- <listitem open="0" type="814" id="7ZaQNgZJ8zsD"/>
- <listitem open="0" type="814" id="fHVjp6noe6bA"/>
- <listitem open="0" type="814" id="lyCfKZjGyLKp"/>
- <listitem open="0" type="815" id="vDy8rHM8FLMJ"/>
- <listitem open="0" type="815" id="sNo5i8Pxn6R7"/>
- <listitem open="0" type="815" id="RUGdflJGlQBk"/>
- <listitem open="0" type="815" id="UmjHrAMIcdtF"/>
- <listitem open="0" type="815" id="ODW7bhsfVXYu"/>
- <listitem open="0" type="815" id="G5CKQa6sKq79"/>
- <listitem open="0" type="815" id="yUSZ5LoTWKb7"/>
- <listitem open="0" type="815" id="LhgpzFvzefRZ"/>
- <listitem open="0" type="815" id="umjFKCxPlYn8"/>
- <listitem open="0" type="815" id="CNRKKIXdzBTw"/>
- <listitem open="0" type="815" id="kNlTyXsQ4Zd6"/>
- <listitem open="0" type="815" id="zYKpWQFd8x41"/>
- <listitem open="0" type="815" id="1fMphZ3m8uJa"/>
- <listitem open="0" type="815" id="bb88X3GmDev9"/>
- </listitem>
- <listitem open="0" type="813" id="Afzv7B0Suvrw"/>
- <listitem open="0" type="813" id="G1jpotlnS9ne">
- <listitem open="0" type="814" id="QZy3tkEiVyrj"/>
- <listitem open="0" type="814" id="9z5XItpgSU9I"/>
- <listitem open="0" type="814" id="kg9gnapBAlF1"/>
- <listitem open="0" type="814" id="gvR6OYO8EVm2"/>
- <listitem open="0" type="814" id="6bDEKSFntwmJ"/>
- <listitem open="0" type="814" id="URqzCwkqqBwC"/>
- <listitem open="0" type="814" id="bJkVFWmhwce8"/>
- <listitem open="0" type="814" id="WBTxq6Gb2zWH"/>
- <listitem open="0" type="814" id="MZpzb47soYu0"/>
- <listitem open="0" type="815" id="WOyKZsWGAoBu"/>
- <listitem open="0" type="815" id="hAxdkbjHzfbW"/>
- <listitem open="0" type="815" id="X8kguwan5LGN"/>
- <listitem open="0" type="815" id="7OAAjQXo9lz3"/>
- <listitem open="0" type="815" id="D69Lp6MCVzMJ"/>
- <listitem open="0" type="815" id="n06YPmsCvKSH"/>
- <listitem open="0" type="815" id="PrEK9hahkEtd"/>
- <listitem open="0" type="815" id="UPfn20wlhH0M"/>
- <listitem open="0" type="815" id="TPRDdKo7jTvj"/>
- <listitem open="0" type="815" id="8PfqrYZIO4RV"/>
- <listitem open="0" type="815" id="uCUp03L9S0zH"/>
- <listitem open="0" type="815" id="wML8jBCbMeOM"/>
- <listitem open="0" type="815" id="hjV8iSPH1zCc"/>
- <listitem open="0" type="815" id="zajvUM1OiNWR"/>
- <listitem open="0" type="815" id="Wh1sJPDz9i7r"/>
- <listitem open="0" type="815" id="BU6ASGkRqRKI"/>
- <listitem open="0" type="815" id="cyXQNsgBCLft"/>
- <listitem open="0" type="815" id="VY2LT6TnLaEH"/>
- <listitem open="0" type="815" id="oWNVsabSY9sw"/>
- <listitem open="0" type="815" id="zY5Bsi2NG4gh"/>
- <listitem open="0" type="815" id="dbUBkK5jrAsj"/>
- <listitem open="0" type="815" id="su67xmo4uHWf"/>
- <listitem open="0" type="815" id="x9DoH6XAybFv"/>
- <listitem open="0" type="815" id="M3zGIUtGi3Mx"/>
- <listitem open="0" type="815" id="DWrz7uT51grJ"/>
- <listitem open="0" type="815" id="nihWGnXmwzjn"/>
- <listitem open="0" type="815" id="lYt1WmvcoWrL"/>
- <listitem open="0" type="815" id="J5fMAZjBuuSy"/>
- <listitem open="0" type="815" id="oRuH6AKNExiO"/>
- </listitem>
- <listitem open="0" type="813" id="OvNqoCObl8CH">
- <listitem open="0" type="814" id="wv2nq1dXlwOr"/>
- <listitem open="0" type="814" id="JZxkV8It3gis"/>
- <listitem open="0" type="814" id="q4RZCeq8XqtN"/>
- <listitem open="0" type="814" id="rWtaRFRioORJ"/>
- <listitem open="0" type="814" id="bai6gzkJrv6v"/>
- <listitem open="0" type="814" id="3xtAgo722W76"/>
- <listitem open="0" type="815" id="VhAYNsOBwok8"/>
- <listitem open="0" type="815" id="QaEvR8JGeAp3"/>
- <listitem open="0" type="815" id="9cuqN4xFUJk3"/>
- <listitem open="0" type="815" id="UJ0ub7w5f7Rr"/>
- <listitem open="0" type="815" id="wSTbZuSTtwFq"/>
- <listitem open="0" type="815" id="3mTujgkCKgsH"/>
- <listitem open="0" type="815" id="ADDSt3kO7Kc6"/>
- <listitem open="0" type="815" id="OYfTsHZqw9TB"/>
- <listitem open="0" type="815" id="3jUGUiy3Ig9w"/>
- <listitem open="0" type="815" id="Z6vG07cqOFLm"/>
- <listitem open="0" type="815" id="7VcDt5NQBGg9"/>
- <listitem open="0" type="815" id="NHzjWJUIlUrm"/>
- <listitem open="0" type="815" id="kyjvEN4ae2H8"/>
- </listitem>
- <listitem open="0" type="813" id="0vcc95kxWWVn"/>
- <listitem open="0" type="813" id="bBWfkvMSUBzc">
- <listitem open="0" type="814" id="HtfMPGWnHlFz"/>
- <listitem open="0" type="814" id="nwSF6dZuRDQn"/>
- <listitem open="0" type="814" id="NvFxdPxsIcEf"/>
- <listitem open="0" type="814" id="qiT8Tg7FdZSj"/>
- <listitem open="0" type="814" id="vfgxkuIaTgbH"/>
- <listitem open="0" type="814" id="OoUldHki4oSH"/>
- <listitem open="0" type="815" id="B1eaE4OZxbUY"/>
- <listitem open="0" type="815" id="642hbURmV3Ni"/>
- <listitem open="0" type="815" id="5jF2KkZLB0dB"/>
- <listitem open="0" type="815" id="ba2x0yl42lme"/>
- <listitem open="0" type="815" id="i6Mjs6N6FjnR"/>
- <listitem open="0" type="815" id="bqWoZIF4Tx0H"/>
- <listitem open="0" type="815" id="yBOWhtxIjR7J"/>
- <listitem open="0" type="815" id="jKLCIJRD0tyX"/>
- <listitem open="0" type="815" id="OFm6erNMCiWU"/>
- <listitem open="0" type="815" id="kVdX0x3MAqSp"/>
- <listitem open="0" type="815" id="bvLa2iQlD1IB"/>
- <listitem open="0" type="815" id="n0jQzBvY7H67"/>
- <listitem open="0" type="815" id="zWsAYBJVVqcd"/>
- <listitem open="0" type="815" id="gldn0ktxEl5k"/>
- <listitem open="0" type="815" id="3BuFu0ypMBCZ"/>
- <listitem open="0" type="815" id="zBZIc4IANfpB"/>
- <listitem open="0" type="815" id="qWgmpwjq5c4z"/>
- <listitem open="0" type="815" id="a2mwBxU983Rk"/>
- <listitem open="0" type="815" id="5hsTKfcACGxz"/>
- <listitem open="0" type="815" id="AeoFEsDouzj3"/>
- <listitem open="0" type="815" id="6CP0C634JE7V"/>
- <listitem open="0" type="815" id="MAwjmvEfZsaJ"/>
- <listitem open="0" type="815" id="LVYuN9B8z5JW"/>
- <listitem open="0" type="815" id="1XR0bkU9WtxF"/>
- <listitem open="0" type="815" id="prxjViUQjhSS"/>
- <listitem open="0" type="815" id="ym0h8ycxnZgI"/>
- <listitem open="0" type="815" id="F8izq8PLR5MW"/>
- <listitem open="0" type="815" id="dPfz7KV2Nze1"/>
- </listitem>
- <listitem open="0" type="813" id="kNRjwgcIhcX0">
- <listitem open="0" type="814" id="oumiUxElXTPK"/>
- <listitem open="0" type="814" id="fGGAifVQGjcS"/>
- <listitem open="0" type="814" id="mQLltAsASv30"/>
- <listitem open="0" type="814" id="5xgKFy2bIrWG"/>
- <listitem open="0" type="815" id="4zK7hMcKdqVL"/>
- <listitem open="0" type="815" id="h3l7wm70lP5Q"/>
- <listitem open="0" type="815" id="mfjNVCizARin"/>
- <listitem open="0" type="815" id="ltCTNP54QqCM"/>
- <listitem open="0" type="815" id="dHKMfPlR2SoX"/>
- <listitem open="0" type="815" id="eUVmtBXf2j6P"/>
- <listitem open="0" type="815" id="6BSW0cqbrAxW"/>
- <listitem open="0" type="815" id="XgxZ8j5kDYW5"/>
- <listitem open="0" type="815" id="h3ijno6r0YO0"/>
- <listitem open="0" type="815" id="uVCs2Ys8lR88"/>
- <listitem open="0" type="815" id="wb071QOAvQTw"/>
- <listitem open="0" type="815" id="xrcVx1qqV0iX"/>
- <listitem open="0" type="815" id="H2dm1JHasusr"/>
- <listitem open="0" type="815" id="gIl1gnNV9uEv"/>
- <listitem open="0" type="815" id="RrpOsLQDNVtL"/>
- <listitem open="0" type="815" id="82E8dP9eMOkB"/>
- <listitem open="0" type="815" id="dv4eGrk78MU4"/>
- </listitem>
- <listitem open="0" type="813" id="idECE5nt0Vr7"/>
- <listitem open="0" type="813" id="0xotfbj8uz9G"/>
- <listitem open="0" type="813" id="MuLM2exc7eeX"/>
- <listitem open="0" type="813" id="Ab0NMXybAfZU"/>
- <listitem open="0" type="813" id="3DGvGCGP6it9"/>
- <listitem open="0" type="813" id="K1iCj3mMQwQL"/>
- <listitem open="0" type="813" id="D3DUDdA4BXcR">
- <listitem open="0" type="815" id="jSV1dsLPmSGq"/>
- </listitem>
- <listitem open="1" type="813" id="EXCTf5VmCpZP"/>
- <listitem open="0" type="813" id="fuM43CRtzagH"/>
- <listitem open="0" type="813" id="CFHqNaZGkqY1"/>
- <listitem open="1" type="813" id="C6sJEmNl1TfP"/>
- <listitem open="0" type="813" id="vhhynCUKwjdK">
- <listitem open="0" type="815" id="0BooQ7oB3gBu"/>
- </listitem>
- <listitem open="0" type="813" id="4DbehFMvfWp7">
- <listitem open="0" type="815" id="tAHWfrR369KI"/>
- </listitem>
- <listitem open="1" type="813" id="4mmdfk3zM4Cq"/>
- <listitem open="0" type="813" id="TTjyPYhZVm6n"/>
- <listitem open="0" type="813" id="pkwx1nQd15WY"/>
- <listitem open="0" type="813" id="oJLfSqWPBi3z"/>
- <listitem open="0" type="813" id="XlAIxWJ0t2q4"/>
- <listitem open="0" type="813" id="sWYhCThWlDFP"/>
- <listitem open="0" type="813" id="4F2mG2WvecbT"/>
- <listitem open="0" type="813" id="8RfL5UmYopms"/>
- <listitem open="0" type="813" id="Ny9n9LLzEhXo"/>
- <listitem open="0" type="813" id="qzlFUs4gsJKl"/>
- <listitem open="0" type="813" id="yfv0x3wqUorr"/>
- <listitem open="0" type="813" id="SU7oJl8r1vpC"/>
- <listitem open="0" type="818" id="dIDTyvYIWngb">
- <listitem open="0" type="813" id="bfhvSo8YsYdy"/>
- </listitem>
- <listitem open="0" type="818" id="MCSt8TslaFsB">
- <listitem open="0" type="813" id="4LgRjEB5I6jc"/>
- <listitem open="0" type="813" id="F1TYNacxByRT"/>
- <listitem open="0" type="813" id="SAh1zCEmUab7"/>
- <listitem open="0" type="813" id="BBlq3c2ugtt6"/>
- <listitem open="0" type="813" id="Tf9yq5dCbZ1m"/>
- </listitem>
- <listitem open="0" type="829" id="I2tMfCdvE4TZ"/>
- <listitem open="0" type="829" id="bJtzCEyKnKFK"/>
- <listitem open="0" type="829" id="JUKVeIsFclEo"/>
- <listitem open="1" type="829" id="812hl7Twm80d"/>
- <listitem open="1" type="829" id="6PMoYeoBvXGW"/>
- <listitem open="1" type="829" id="PwWdyuRfg8qc"/>
- <listitem open="0" type="829" id="WO0VJglkKJD1"/>
- <listitem open="0" type="829" id="iYfdxrJ7viR4"/>
- <listitem open="0" type="829" id="WHPnnVHQeFGi"/>
- <listitem open="1" type="829" id="rNYhJGFqdJWf"/>
- <listitem open="0" type="829" id="eL818LAcaZPN"/>
- <listitem open="0" type="830" id="Datatypes">
- <listitem open="0" type="829" id="Dk5pczPnz6Yr"/>
- <listitem open="0" type="829" id="Egoy0uRTnPKa"/>
- <listitem open="0" type="829" id="CVhnimyi5KYN"/>
- <listitem open="0" type="829" id="nHLqdVHOsxNM"/>
- <listitem open="0" type="829" id="eqNqcEputAw7"/>
- <listitem open="0" type="829" id="HrAPc4wZ9mox"/>
- <listitem open="0" type="829" id="FM9MFyrLE5ts"/>
- <listitem open="0" type="829" id="AtFJ5jDgvMWr"/>
- <listitem open="0" type="829" id="taPZHCs4KBPK"/>
- <listitem open="0" type="829" id="JCIhsw1mHbC2"/>
- <listitem open="0" type="829" id="1PQGjZx0iexb"/>
- <listitem open="0" type="829" id="h0fjFQ6XJMWi"/>
- <listitem open="0" type="829" id="xqe85s2v3X76"/>
- <listitem open="0" type="829" id="qcb8l3xv8TRt"/>
- <listitem open="0" type="829" id="Dc4onmiEKP73"/>
- <listitem open="0" type="829" id="DEOmV9sHIiVw"/>
- <listitem open="0" type="829" id="T3wGzLaOdJRi"/>
- <listitem open="0" type="829" id="TXhtlZjMAp7C"/>
- <listitem open="0" type="829" id="r4r1RcqCQswh"/>
- <listitem open="0" type="829" id="E5x9L9RNrd6t"/>
- <listitem open="0" type="829" id="g55iEgjQlzYA"/>
- <listitem open="0" type="829" id="j0sNksMuhVaF"/>
- <listitem open="0" type="829" id="eFtlt57PInXt"/>
- <listitem open="0" type="829" id="U4mQnNTnRzFr"/>
- <listitem open="0" type="829" id="dxoHI48VOHpd"/>
- <listitem open="0" type="829" id="10N6r5hp62ve"/>
- <listitem open="0" type="829" id="u6I3QBCIKjNh"/>
- <listitem open="0" type="829" id="QR5iQfL4cAJs"/>
- <listitem open="0" type="829" id="w18nsvnfKlCn"/>
- <listitem open="0" type="829" id="iP4BuKaU6MFG"/>
- <listitem open="0" type="829" id="4XSkb7G7HX8a"/>
- <listitem open="0" type="829" id="XNEzxlV9pJ9M"/>
- <listitem open="0" type="829" id="ihg5BF2ckirV"/>
- <listitem open="0" type="829" id="j5EvHIixdpql"/>
- <listitem open="0" type="829" id="vFBbZkjwm4Vx"/>
- <listitem open="0" type="829" id="i2UaJmLAA6SB"/>
- <listitem open="0" type="829" id="3McdnqE6JCta"/>
- <listitem open="0" type="829" id="hHn4fFvgbLYX"/>
- <listitem open="0" type="829" id="s715so7RcDV9"/>
- <listitem open="0" type="829" id="xXbKcOH2nKjB"/>
- <listitem open="0" type="829" id="1p2XZLYDDR9J"/>
- <listitem open="0" type="829" id="lNFLPGC5GcjE"/>
- <listitem open="0" type="829" id="nBSGMFfRdnbK"/>
- <listitem open="0" type="829" id="INoSbjQmME1a"/>
- <listitem open="0" type="829" id="jIKxm4xqfB4z"/>
- <listitem open="0" type="829" id="cKqCpL4vHbUA"/>
- <listitem open="0" type="829" id="8HFYeCh1V2Tr"/>
- <listitem open="0" type="829" id="II4tXBwM3i4V"/>
- <listitem open="0" type="829" id="44n6UGK0XgsS"/>
- <listitem open="0" type="829" id="bQxm3RYu0b9f"/>
- <listitem open="1" type="829" id="4Kduenu6BUBZ"/>
- <listitem open="1" type="829" id="ctnUq2PsE48l"/>
- <listitem open="0" type="829" id="66nkQj7RUTGt"/>
- <listitem open="0" type="829" id="VewgxsCIjx8s"/>
- <listitem open="0" type="829" id="O0Y4e7L2YuKE"/>
- <listitem open="0" type="829" id="w1WmyaR6BJwY"/>
- <listitem open="0" type="829" id="GvaXRE3v0jhy"/>
- <listitem open="0" type="829" id="t8K2eKmlJWeX"/>
- <listitem open="0" type="829" id="MbP7gzMpbiS8"/>
- <listitem open="0" type="829" id="2A0kHciAJN94"/>
- <listitem open="0" type="829" id="0gZfFH6nfJoC"/>
- <listitem open="0" type="829" id="LmSODUAk50Mh"/>
- <listitem open="0" type="829" id="8DcrWo7HU0iD"/>
- <listitem open="0" type="829" id="ZcxOLFwJIm1Z"/>
- <listitem open="0" type="829" id="pE9AJY0D36ZX"/>
- <listitem open="0" type="829" id="vl7nx6lzHKbw"/>
- <listitem open="0" type="829" id="TrV97VV12IZA"/>
- <listitem open="0" type="829" id="qj7xSczKuwTq"/>
- <listitem open="0" type="829" id="Q7aANH0SNANP"/>
- <listitem open="0" type="829" id="58Cx3O5oNLy7"/>
- <listitem open="0" type="829" id="IdrZNJ0YPvUj"/>
- <listitem open="0" type="829" id="bHSmNf4TkzTc"/>
- <listitem open="0" type="829" id="gFFNUwPz4TDC"/>
- <listitem open="0" type="829" id="WqvJ0Bi64K7w"/>
- <listitem open="0" type="829" id="VwQtQ1TIoAvq"/>
- <listitem open="0" type="829" id="W4aE1i6TfajT"/>
- <listitem open="0" type="829" id="vTwaNogqWwk6"/>
- <listitem open="0" type="829" id="WKXaz2THzK1G"/>
- <listitem open="0" type="829" id="VcPcOcsgjQbo"/>
- <listitem open="0" type="829" id="bB3bDXILtLrz"/>
- <listitem open="0" type="829" id="cSRv6d9bhfgi"/>
- <listitem open="0" type="829" id="nNX5UmpiITKY"/>
- <listitem open="0" type="829" id="Fls26ZE3bRdo"/>
- <listitem open="0" type="829" id="G9Fc21bZFJYw"/>
- <listitem open="0" type="829" id="Ks2QuFd1iYTQ"/>
- <listitem open="0" type="829" id="FVFtK4cB028u"/>
- <listitem open="0" type="829" id="8JusFMjAgM0v"/>
- <listitem open="0" type="829" id="pwe3pKqZPxkb"/>
- <listitem open="0" type="829" id="ee5ipO9TkcLk"/>
- <listitem open="0" type="829" id="0cEqYhKKEcTV"/>
- <listitem open="0" type="829" id="iJSN8ewspTX1"/>
- <listitem open="0" type="829" id="O12pIiPVGutd"/>
- <listitem open="0" type="829" id="UxIGEVkWi0NJ"/>
- <listitem open="0" type="829" id="QYpsIm6ImSYT"/>
- <listitem open="0" type="829" id="U3HSI0riWfYo"/>
- <listitem open="0" type="829" id="s0nXwm2aK1kb"/>
- <listitem open="0" type="829" id="nLEyCkrlHPQw"/>
- <listitem open="0" type="829" id="eOTt0WSUZhur"/>
- <listitem open="0" type="829" id="ASmFlCHQXF31"/>
- <listitem open="0" type="829" id="02OHgpv6iwv9"/>
- <listitem open="0" type="829" id="xSzXJBSHo8yn"/>
- <listitem open="0" type="829" id="KLj6UftWOUuW"/>
- <listitem open="0" type="829" id="KaWkbzz0V7eb"/>
- <listitem open="0" type="829" id="pX24l2l5CrBj"/>
- <listitem open="0" type="829" id="7YtOMToL1Xs9"/>
- <listitem open="0" type="829" id="erAlIci9mSIq"/>
- <listitem open="0" type="829" id="dsRw8nRMsxE8"/>
- <listitem open="0" type="829" id="lvIXi2Pxh0fK"/>
- <listitem open="0" type="829" id="EknMLJBAPpgo"/>
- <listitem open="0" type="829" id="GgjUKN39BDXg"/>
- <listitem open="0" type="829" id="7jGBwdRbnPDW"/>
- <listitem open="0" type="829" id="nMhUhBvBqw4A"/>
- <listitem open="0" type="829" id="VBixqziBqrhe"/>
- <listitem open="0" type="829" id="MvpHChZ2rJOW"/>
- <listitem open="0" type="829" id="ZZfK0mQuNQ1O"/>
- <listitem open="0" type="829" id="8Eb0NWUsBQSJ"/>
- <listitem open="0" type="829" id="3lgc1KcaMAny"/>
- <listitem open="0" type="829" id="vteoFJru7xrN"/>
- <listitem open="0" type="829" id="eptOVybOJnpM"/>
- <listitem open="0" type="829" id="xdn6dFqV85mT"/>
- <listitem open="0" type="829" id="PFhzx975rDDm"/>
- <listitem open="0" type="829" id="pJsfgcYj7OSg"/>
- <listitem open="0" type="829" id="EQrcJtA2vC7c"/>
- <listitem open="0" type="829" id="wZnZ9lZYcork"/>
- <listitem open="0" type="829" id="9U1uI8HJT0Jf"/>
- <listitem open="0" type="829" id="trv86yL4jfeS"/>
- <listitem open="0" type="829" id="vQ1S2XzSPBqN"/>
- <listitem open="0" type="829" id="Hfgxfxm85LAR"/>
- <listitem open="0" type="829" id="QXEg7cwSFt0l"/>
- <listitem open="0" type="829" id="ylvhNGRUzc7S"/>
- <listitem open="0" type="829" id="t2asNnHh8wsl"/>
- <listitem open="0" type="829" id="S02STVfDWPXk"/>
- <listitem open="0" type="829" id="Z3mduvueNb9d"/>
- <listitem open="0" type="829" id="O74yXfkidyrR"/>
- <listitem open="0" type="829" id="qtOabrV06r8H"/>
- <listitem open="0" type="829" id="qZLXuibBNXID"/>
- <listitem open="0" type="829" id="rHbXHZa03W4n"/>
- <listitem open="1" type="829" id="vfi9josl6Tfk"/>
- <listitem open="1" type="829" id="nJsED87p1vHp"/>
- <listitem open="1" type="829" id="UOc7OI8LRuFv"/>
- <listitem open="1" type="829" id="w7Hw0ZjtEP2v"/>
- <listitem open="1" type="829" id="HXoQ2zynGq1U"/>
- <listitem open="0" type="829" id="Kevzvq2lEsL7"/>
- <listitem open="0" type="829" id="yHm6ssfdnOOK"/>
- <listitem open="0" type="829" id="C9cGTLSO5pln"/>
- <listitem open="0" type="829" id="ViIuaCbFO4Rh"/>
- <listitem open="0" type="829" id="drESmKOpFHzv"/>
- <listitem open="0" type="829" id="SuGBQogD9iYR"/>
- <listitem open="0" type="829" id="HYl1HlhGNnFB"/>
- <listitem open="0" type="829" id="rRJOS4Ahavgr"/>
- <listitem open="1" type="829" id="QBMG0J8pDlsx"/>
- <listitem open="0" type="829" id="fL9t737j70re"/>
- <listitem open="0" type="829" id="FYDrFS8mDoaL"/>
- <listitem open="0" type="829" id="ObMobD4JO6Fx"/>
- <listitem open="0" type="829" id="2UqTU88CwGoW"/>
- <listitem open="0" type="829" id="LrX6DxQMEnp2"/>
- <listitem open="1" type="829" id="DshIKK2Zspzs"/>
- <listitem open="0" type="829" id="BlnbH3oVPPjZ"/>
- <listitem open="1" type="829" id="LIcXhcTtT8Bn"/>
- <listitem open="0" type="829" id="iB4yZDFSik45"/>
- <listitem open="1" type="829" id="ovf5keXejoaj"/>
- <listitem open="0" type="829" id="TYfZTukOB7DK"/>
- </listitem>
- <listitem open="0" type="831" id="XmVg46uC4n8q">
- <listitem open="0" type="839" id="yqnkun1Klbqp"/>
- <listitem open="0" type="839" id="cgI6gA8Duerx"/>
- <listitem open="0" type="839" id="il9mWHdU5OFy"/>
- </listitem>
- <listitem open="0" type="831" id="tn89GJwm2DQU">
- <listitem open="0" type="839" id="sdR87rQfnnIn"/>
- <listitem open="0" type="839" id="CcN2TL1K87UM"/>
- <listitem open="0" type="839" id="OQ9QdXtT9KbG"/>
- <listitem open="0" type="839" id="9zvwmBjyo60H"/>
- <listitem open="0" type="839" id="PzbW43sTTzt4"/>
- </listitem>
- <listitem open="0" type="831" id="60clcAU0xnx5">
- <listitem open="0" type="839" id="qw0upkshD7Ws"/>
- <listitem open="0" type="839" id="08eZuDdvpOX0"/>
- <listitem open="0" type="839" id="qXvcVzRJvRDi"/>
- <listitem open="0" type="839" id="94PMBtCB1riw"/>
- </listitem>
- <listitem open="0" type="831" id="BEIun6kQm0UQ">
- <listitem open="0" type="839" id="8cd3ES0xB9jh"/>
- <listitem open="0" type="839" id="OKASiNQsZgmN"/>
- <listitem open="0" type="839" id="mUlWTFxbpYe4"/>
- </listitem>
- <listitem open="0" type="831" id="acFbRvXTEMIs">
- <listitem open="0" type="839" id="i8ParVwZ1aAz"/>
- <listitem open="0" type="839" id="RT4K9VOj5bLU"/>
- <listitem open="0" type="839" id="UqxgBEZrKwRB"/>
- <listitem open="0" type="839" id="PMiRwsQLJUdS"/>
- <listitem open="0" type="839" id="x1A1aTV4JTiS"/>
- <listitem open="0" type="839" id="hHK1DjAd5s2z"/>
- <listitem open="0" type="839" id="iSIzuvPruZsS"/>
- </listitem>
- <listitem open="0" type="831" id="R7NTfdMjVLA2">
- <listitem open="0" type="839" id="aeXFWoccpQhV"/>
- <listitem open="0" type="839" id="IA247mFWrcyW"/>
- <listitem open="0" type="839" id="DKFidOkD2FRW"/>
- <listitem open="0" type="839" id="239pRqLjyLo3"/>
- <listitem open="0" type="839" id="71ZwdVSqogWR"/>
- <listitem open="0" type="839" id="2Hf2U6ZW7iMZ"/>
- <listitem open="0" type="839" id="WfIU04X6542i"/>
- <listitem open="0" type="839" id="aTWO73p9ISBm"/>
- </listitem>
- <listitem open="0" type="831" id="6EgMC1YWquF9">
- <listitem open="0" type="839" id="Yb1b7UtyzhI6"/>
- <listitem open="0" type="839" id="h7pvvBbzNHKX"/>
- <listitem open="0" type="839" id="Is37kIGIsFrx"/>
- <listitem open="0" type="839" id="jlviQEm7JZ0D"/>
- <listitem open="0" type="839" id="kbC7rWe7MgE7"/>
- <listitem open="0" type="839" id="wSNohFlQ0h6O"/>
- <listitem open="0" type="839" id="tsUCSUNA4aGt"/>
- <listitem open="0" type="839" id="4s0RYFWVhtHP"/>
- <listitem open="0" type="839" id="63n4iuTZmxjC"/>
- </listitem>
- <listitem open="0" type="831" id="bicD6yqnVUa7">
- <listitem open="0" type="839" id="rCA5pRoxT62m"/>
- <listitem open="0" type="839" id="iaNQJFitwI60"/>
- <listitem open="0" type="839" id="FvnkPMrHW0KJ"/>
- <listitem open="0" type="839" id="P7GtDHftr0J9"/>
- <listitem open="0" type="839" id="Ez28I68X1uFP"/>
- </listitem>
- <listitem open="0" type="831" id="4ptGPmSL1mv9">
- <listitem open="0" type="839" id="Y0MT25hU2ytQ"/>
- <listitem open="0" type="839" id="CmcECHAH43VT"/>
- <listitem open="0" type="839" id="oxmpiiwGiIji"/>
- <listitem open="0" type="839" id="LPCLN6lZqLl2"/>
- <listitem open="0" type="839" id="ctHevk8jgsWO"/>
- <listitem open="0" type="839" id="YTeEjLx3i7O5"/>
- </listitem>
- <listitem open="0" type="831" id="B8d1TM24GHiB">
- <listitem open="0" type="839" id="2qsihO6FpiUX"/>
- <listitem open="0" type="839" id="3RamYwpi4QjY"/>
- <listitem open="0" type="839" id="nja31IE374lo"/>
- <listitem open="0" type="839" id="Sp3GXXlawJKT"/>
- <listitem open="0" type="839" id="F8BKYuqLcQMd"/>
- <listitem open="0" type="839" id="iYgncPb3EfJl"/>
- </listitem>
- <listitem open="0" type="831" id="obHtTJr9l96f">
- <listitem open="0" type="839" id="3VUv5LO7hsRU"/>
- <listitem open="0" type="839" id="5CyYIPE40VyR"/>
- <listitem open="0" type="839" id="mnaVwg8xBctE"/>
- <listitem open="0" type="839" id="vHMc9l6Dx2lE"/>
- <listitem open="0" type="839" id="RxIRQEsC1Qhw"/>
- </listitem>
- <listitem open="0" type="831" id="zczAjgq81yYh">
- <listitem open="0" type="839" id="JyXscIDMmysF"/>
- <listitem open="0" type="839" id="BnrzKT1J60Rn"/>
- <listitem open="0" type="839" id="gFvfBRLUNsNz"/>
- <listitem open="0" type="839" id="AaLvXE8gzxfH"/>
- <listitem open="0" type="839" id="RgYVg0ILDC0P"/>
- </listitem>
- <listitem open="0" type="831" id="yD8lVM51i3U1">
- <listitem open="0" type="839" id="jFk2Zv1qPLL1"/>
- <listitem open="0" type="839" id="dDHFxT1vgAg9"/>
- <listitem open="0" type="839" id="UjACmfDUsvWR"/>
- </listitem>
- </listitem>
- <listitem open="1" type="802" id="Use Case View"/>
- <listitem open="1" type="821" id="Component View"/>
- <listitem open="1" type="827" id="Deployment View"/>
- <listitem open="1" type="836" id="Entity Relationship Model"/>
- </listitem>
- </listview>
- <codegeneration>
- <codegenerator language="C++"/>
- </codegeneration>
- </XMI.extensions>
-</XMI>
diff --git a/cesar/maximus/doc/fulminata_maximus_user_guide.xmi b/cesar/maximus/doc/fulminata_maximus_user_guide.xmi
deleted file mode 100644
index cac8fe3e1b..0000000000
--- a/cesar/maximus/doc/fulminata_maximus_user_guide.xmi
+++ /dev/null
@@ -1,950 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2008-03-18T12:22:05" xmi.version="1.2" >
- <XMI.header>
- <XMI.documentation>
- <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
- <XMI.exporterVersion>1.5.6</XMI.exporterVersion>
- <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
- </XMI.documentation>
- <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
- </XMI.header>
- <XMI.content>
- <UML:Model isSpecification="false" isLeaf="false" isRoot="false" xmi.id="m1" isAbstract="false" name="UML Model" >
- <UML:Namespace.ownedElement>
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="folder" isRoot="false" isAbstract="false" name="folder" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="datatype" isRoot="false" isAbstract="false" name="datatype" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="interface" isRoot="false" isAbstract="false" name="interface" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="constructor" isRoot="false" isAbstract="false" name="constructor" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="enum" isRoot="false" isAbstract="false" name="enum" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="struct" isRoot="false" isAbstract="false" name="struct" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="typedef" isRoot="false" isAbstract="false" name="typedef" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="friend" isRoot="false" isAbstract="false" name="friend" />
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Logical View" isRoot="false" isAbstract="false" name="Logical View" >
- <UML:Namespace.ownedElement>
- <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Datatypes" isRoot="false" isAbstract="false" name="Datatypes" >
- <UML:Namespace.ownedElement>
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="4Y3pj29RWeiE" isRoot="false" isAbstract="false" name="int" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="r7DWE0eHIdyU" isRoot="false" isAbstract="false" name="char" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="jEmP36b8eexL" isRoot="false" isAbstract="false" name="bool" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="e4mAiTMYaY2m" isRoot="false" isAbstract="false" name="float" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="Wh4oK0G1C0OG" isRoot="false" isAbstract="false" name="double" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="60MkeH6JLqR1" isRoot="false" isAbstract="false" name="short" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="JmXtIagoHiaZ" isRoot="false" isAbstract="false" name="long" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="gobqox6sxQcc" isRoot="false" isAbstract="false" name="unsigned int" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="hgt0XK0q4XiM" isRoot="false" isAbstract="false" name="unsigned short" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="7MAM2iuiWTYI" isRoot="false" isAbstract="false" name="unsigned long" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="QdAO1lyjPrjw" isRoot="false" isAbstract="false" name="string" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="fuB56JYI4iD9" isRoot="false" isAbstract="false" name="CoreEngine*" elementReference="3cZNPG4Cidhc" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="sdbAE2jFpDFi" isRoot="false" isAbstract="false" name="const char*" elementReference="r7DWE0eHIdyU" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="dlNG20SXVnem" isRoot="false" isAbstract="false" name="Sta&amp;" elementReference="ep8pvWB0srsZ" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="g6pCtTynyrSu" isRoot="false" isAbstract="false" name="const std::string&amp;" elementReference="QdAO1lyjPrjw" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="xodDUGXAMLKD" isRoot="false" isAbstract="false" name="Msg&amp;" elementReference="QDgInxgZQCAU" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="N5IkQdvEtuz1" isRoot="false" isAbstract="false" name="const tick_t" elementReference="DlAv42zir8Xn" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="fDwAiS87UREb" isRoot="false" isAbstract="false" name="SystemManager*" elementReference="iqALD0zLpMtS" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="iCrqJxTw8N6o" isRoot="false" isAbstract="false" name="FunctionCallManager*" elementReference="QLFCWED8oZX2" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="FmijvtGb37QM" isRoot="false" isAbstract="false" name="NetworkClockProcessor*" elementReference="dhiFOKw4B6PM" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="y48XzI6F2mwy" isRoot="false" isAbstract="false" name="PhyProcessor*" elementReference="5MiuiZM7uaJQ" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="cMzADDNCFTjF" isRoot="false" isAbstract="false" name="SciServer*" elementReference="oVWa43dfiLu6" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="heG5Hkz2HbX4" isRoot="false" isAbstract="false" name="FunctionSciMsg*" elementReference="OSpq2dnTY35U" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="Q0UsbF8ykFHb" isRoot="false" isAbstract="false" name="const unsigned long" elementReference="7MAM2iuiWTYI" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="x1PhEfJEggJw" isRoot="false" isAbstract="false" name="const unsigned char*" elementReference="b7QGcuF2sksT" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="p0IbDUZ3xnb6" isRoot="false" isAbstract="false" name="T const&amp;" elementReference="vmoDNQ6rF2Dm" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="DxG6tZBJQHh4" isRoot="false" isAbstract="false" name="const cb_t&amp;" elementReference="wnXcVmSSha0e" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="JnsSgq9sjXim" isRoot="false" isAbstract="false" name="unsigned long&amp;" elementReference="7MAM2iuiWTYI" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="pcXZS4JlpBBT" isRoot="false" isAbstract="false" name="unsigned char*" elementReference="b7QGcuF2sksT" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="VPg2hVetD85b" isRoot="false" isAbstract="false" name="T&amp;" elementReference="s5UhEg9EzVwp" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="2CPeV2SQpVK6" isRoot="false" isAbstract="false" name="Station*" elementReference="vRs8ZxhLHVQP" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="8tZZKzS1K06t" isRoot="false" isAbstract="false" name="std::vector&lt; Msg * >" elementReference="hNV9xKhyiJ0h" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="bRgJkgzqXYQq" isRoot="false" isAbstract="false" name="std::vector&lt; Sta * >" elementReference="hNV9xKhyiJ0h" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="m2WuMpndsVSl" isRoot="false" isAbstract="false" name="char*" elementReference="r7DWE0eHIdyU" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="7Px2h6lKHGvZ" isRoot="false" isAbstract="false" name="PhySciMsgMpdu*" elementReference="iNY7Y0bMhGEA" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="6ZCYZGid4Ay7" isRoot="false" isAbstract="false" name="EtherSciMsg*" elementReference="RYa1BtTCB0W9" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="5AQH9uODRbl0" isRoot="false" isAbstract="false" name="EtherSciMsg&amp;" elementReference="RYa1BtTCB0W9" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="THhIOpi4zEEB" isRoot="false" isAbstract="false" name="const bool" elementReference="jEmP36b8eexL" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="1nRAhhrW78Cm" isRoot="false" isAbstract="false" name="ISystem*" elementReference="RCBIr5aEF5nl" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="v6Ix8Dv7zKFg" isRoot="false" isAbstract="false" name="IFunctionCall*" elementReference="t3SV6Sb72ZAp" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="xnFXxdAshQqp" isRoot="false" isAbstract="false" name="INetworkClock*" elementReference="wfaWTHxdQDUU" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="qASXaGKCzFk2" isRoot="false" isAbstract="false" name="IPhy*" elementReference="j4JNar0VcD2Z" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="3OLgcMDSWdy5" isRoot="false" isAbstract="false" name="ISci*" elementReference="nhhsSQ8LUaqY" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="7JKPViEW7ZAh" isRoot="false" isAbstract="false" name="IChannel*" elementReference="3Qe3zotuRRQu" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="v9K0jVhcro2q" isRoot="false" isAbstract="false" name="IEthernet*" elementReference="haieT6uYNCxq" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="uBMjyNZssFA6" isRoot="false" isAbstract="false" name="const Network_Clock_Tick" elementReference="yw5ob124gIWX" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="T5xCWzXyj7oa" isRoot="false" isAbstract="false" name="const Sta&amp;" elementReference="ep8pvWB0srsZ" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="U0nk5GKAeh4g" isRoot="false" isAbstract="false" name="Maximus*" elementReference="ehlWWc3xpjDc" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="waDrHSxs6vlj" isRoot="false" isAbstract="false" name="const Msg&amp;" elementReference="QDgInxgZQCAU" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="Qkc9xke12bLH" isRoot="false" isAbstract="false" name="const cb_t" elementReference="wnXcVmSSha0e" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="bwt1amS1hrT1" isRoot="false" isAbstract="false" name="const FunctionSciMsg&amp;" elementReference="OSpq2dnTY35U" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="gfEyyxURjjPy" isRoot="false" isAbstract="false" name="const float" elementReference="e4mAiTMYaY2m" />
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="iqALD0zLpMtS" isRoot="false" isAbstract="false" name="SystemManager" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="QLFCWED8oZX2" isRoot="false" isAbstract="false" name="FunctionCallManager" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="dhiFOKw4B6PM" isRoot="false" isAbstract="false" name="NetworkClockProcessor" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="5MiuiZM7uaJQ" isRoot="false" isAbstract="false" name="PhyProcessor" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="oVWa43dfiLu6" isRoot="false" isAbstract="false" name="SciServer" />
- <UML:Package isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="FalPmYKPIgfK" isRoot="false" isAbstract="false" name="std" >
- <UML:Namespace.ownedElement>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="FalPmYKPIgfK" xmi.id="hNV9xKhyiJ0h" isRoot="false" isAbstract="false" name="vector" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="FalPmYKPIgfK" xmi.id="UfIUtWfrdaT6" isRoot="false" isAbstract="false" name="ofstream" />
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="OSpq2dnTY35U" isRoot="false" isAbstract="false" name="FunctionSciMsg" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="HwHnzLGezUjF" isRoot="false" isAbstract="false" name="ParametersList" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="mYkl2R0EAIiQ" isRoot="false" isAbstract="false" name="Sci_Msg_Station_Id" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="b7QGcuF2sksT" isRoot="false" isAbstract="false" name="unsigned char" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="vmoDNQ6rF2Dm" isRoot="false" isAbstract="false" name="T const" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="s5UhEg9EzVwp" isRoot="false" isAbstract="false" name="T" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="vRs8ZxhLHVQP" isRoot="false" isAbstract="false" name="Station" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="7idxC3iqoit2" isRoot="false" isAbstract="false" name="PhyMpduCb" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="0OMn4FpAAKoD" isRoot="false" isAbstract="false" name="EtherCb" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="RYa1BtTCB0W9" isRoot="false" isAbstract="false" name="EtherSciMsg" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="yw5ob124gIWX" isRoot="false" isAbstract="false" name="Network_Clock_Tick" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="j4JNar0VcD2Z" isRoot="false" isAbstract="false" name="IPhy" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="haieT6uYNCxq" isRoot="false" isAbstract="false" name="IEthernet" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="g4QJcYzcXCwe" isRoot="false" isAbstract="false" name="Function_Call_Msg_Id" />
- <UML:Class stereotype="typedef" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Z7QPu1pTKEg0" isRoot="false" isAbstract="false" name="cb_t" />
- <UML:Class stereotype="typedef" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="fvd3d4zkVezE" isRoot="false" isAbstract="false" name="StaCounter" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="3cZNPG4Cidhc" isRoot="false" isAbstract="false" name="CoreEngine" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="RCBIr5aEF5nl" isRoot="false" isAbstract="false" name="ISystem" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="t3SV6Sb72ZAp" isRoot="false" isAbstract="false" name="IFunctionCall" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="wfaWTHxdQDUU" isRoot="false" isAbstract="false" name="INetworkClock" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="nhhsSQ8LUaqY" isRoot="false" isAbstract="false" name="ISci" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="3Qe3zotuRRQu" isRoot="false" isAbstract="false" name="IChannel" />
- <UML:Class comment="class Sta" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="ep8pvWB0srsZ" isRoot="false" isAbstract="false" name="Sta" >
- <UML:Classifier.feature>
- <UML:Attribute comment="// private attributes// " isSpecification="false" visibility="private" xmi.id="oVFnCUboi4pC" type="1nRAhhrW78Cm" name="mpSystemManager" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="go2VOfxnTEbJ" type="mYkl2R0EAIiQ" name="mStationId" />
- <UML:Attribute comment="Each 'Sta' instance points to an eCos process (via 'mStationId').
-When a 'Sta' is created from a Python script,
-the 'Sta' copy constructor is called by the Boost.Python interface.
-Thus, several 'Sta' instances point to the same eCos process.
-The eCos process has to be stopped only when the last 'Sta' pointing to it is deleted,
-i.e. when the station counter defined below equals 1." isSpecification="false" visibility="private" xmi.id="KbeAQSpFv205" type="fvd3d4zkVezE" name="mStaCounter" ownerScope="classifier" />
- <UML:Attribute comment="// private attributes// // used for 'Maximus::process()' method only" isSpecification="false" visibility="private" xmi.id="k7cXtMnjJfrh" type="U0nk5GKAeh4g" name="mpMaximus" />
- <UML:Operation comment="Empty Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="djSSCnZepQOH" isRoot="false" isAbstract="false" isQuery="false" name="~ Sta" />
- <UML:Operation comment="// public methods// /**" isSpecification="false" isLeaf="false" visibility="public" xmi.id="4Ba9o2mMAkDn" isRoot="false" isAbstract="false" isQuery="false" name="remove" />
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8RQh2fjgMB8Z" isRoot="false" isAbstract="false" isQuery="false" name="deactivate" />
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="yfBn3a25jdFW" isRoot="false" isAbstract="false" isQuery="false" name="activate" />
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="d1snm4YsTwXW" isRoot="false" isAbstract="false" isQuery="false" name="debug" />
- <UML:Operation comment="@return Sci_Msg_Station_Id" isSpecification="false" isLeaf="false" visibility="private" xmi.id="bGAySGXOugAx" isRoot="false" isAbstract="false" isQuery="false" name="getStationId" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Fl3PdQWisfyG" type="mYkl2R0EAIiQ" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" comment="Copy constructors" isSpecification="false" isLeaf="false" visibility="public" xmi.id="Y88A5MrArpjK" isRoot="false" isAbstract="false" isQuery="false" name="Sta" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="5MNdxlGUtOew" value="" type="T5xCWzXyj7oa" name="sta" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// public methods// /**
-@return Sta &amp;
-@param sta" isSpecification="false" isLeaf="false" visibility="public" xmi.id="oUJVb76eSRGN" isRoot="false" isAbstract="false" isQuery="false" name="operator =" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="V9OTd5FmFvKi" type="dlNG20SXVnem" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="AWr3tUxby39F" value="" type="T5xCWzXyj7oa" name="sta" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Indicate if the station is IDLE or not." isSpecification="false" isLeaf="false" visibility="public" xmi.id="RqGnq62Lsrne" isRoot="false" isAbstract="false" isQuery="false" name="is_idle" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1XAJHUqWFttr" type="THhIOpi4zEEB" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// private methods// // private attribute accessor methods// /**
-@return ISystem *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="XbtDfhQJTQpp" isRoot="false" isAbstract="false" isQuery="false" name="getSystemManager" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KQZA3WQYfp1G" type="1nRAhhrW78Cm" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool" isSpecification="false" isLeaf="false" visibility="private" xmi.id="3kcWyBnGnSPD" isRoot="false" isAbstract="false" isQuery="false" name="resetStationId" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="sE069Ko8rwR6" type="jEmP36b8eexL" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Set the station name." isSpecification="false" isLeaf="false" visibility="public" xmi.id="7b2NjvRqt15k" isRoot="false" isAbstract="false" isQuery="false" name="set_name" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="dD3nVU3pN8oE" value="" type="g6pCtTynyrSu" name="station_name" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" comment="// Constructors/Destructors// /**
-Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="5sTnbHce4Hug" isRoot="false" isAbstract="false" isQuery="false" name="Sta" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="XfPuec2kCPSA" value="" type="U0nk5GKAeh4g" name="p_maximus" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="5EYVNjmScFGB" value="" type="1nRAhhrW78Cm" name="p_system_manager" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="UqoX8iBfNbXz" value="" type="g6pCtTynyrSu" name="station_executable" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// private methods// // private attribute accessor methods// /**
-Gets a pointer to Maximus.
-@return mpMaximus" isSpecification="false" isLeaf="false" visibility="private" xmi.id="UWbeAOaxrZQu" isRoot="false" isAbstract="false" isQuery="false" name="getMaximus" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="RIdg9UVRu5bx" type="U0nk5GKAeh4g" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class comment="class Msg" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="QDgInxgZQCAU" isRoot="false" isAbstract="false" name="Msg" >
- <UML:Classifier.feature>
- <UML:Attribute comment="// private attributes// " isSpecification="false" visibility="private" xmi.id="10jayNoLndBo" type="heG5Hkz2HbX4" name="mpFunctionSciMsg" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="cg4PHDBY9TK6" type="wnXcVmSSha0e" name="mCallback" />
- <UML:Attribute comment="// private attributes// " isSpecification="false" visibility="private" xmi.id="L2vHZ83DCTWo" type="U0nk5GKAeh4g" name="mpMaximus" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="zTPVfL9qQ1Ol" type="v6Ix8Dv7zKFg" name="mpFunctionCallManager" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="iOtU5IDPI9gr" type="1nRAhhrW78Cm" name="mpSystemManager" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="Hj5RBZF83edg" type="jEmP36b8eexL" name="mResponseReceived" />
- <UML:Operation comment="Empty Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="BX5JpmjsyPiS" isRoot="false" isAbstract="false" isQuery="false" name="~ Msg" />
- <UML:Operation comment="// public methods// /**
-@param name" isSpecification="false" isLeaf="false" visibility="public" xmi.id="wGT7suZfVYaY" isRoot="false" isAbstract="false" isQuery="false" name="add_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="raMgKvXVSbnG" value="" type="g6pCtTynyrSu" name="name" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param name
-@param length
-@param value" isSpecification="false" isLeaf="false" visibility="public" xmi.id="NU8Ltpln5Fsv" isRoot="false" isAbstract="false" isQuery="false" name="add_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="7SYcy7BohXU1" value="" type="g6pCtTynyrSu" name="name" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="23P5GFyLfUye" value="" type="Q0UsbF8ykFHb" name="length" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="vHHZlDBLKbbu" value="" type="x1PhEfJEggJw" name="value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="VrwMZppWoDE0" isRoot="false" isAbstract="false" isQuery="false" name="add_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="sVEY9VS2khbV" value="" type="g6pCtTynyrSu" name="name" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="G190jiUcVInq" value="" type="p0IbDUZ3xnb6" name="value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param name" isSpecification="false" isLeaf="false" visibility="public" xmi.id="gthvuuhhtyJ6" isRoot="false" isAbstract="false" isQuery="false" name="remove_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="Qs8OehUujbvQ" value="" type="g6pCtTynyrSu" name="name" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param user_cb" isSpecification="false" isLeaf="false" visibility="public" xmi.id="KP2nfndMhLFZ" isRoot="false" isAbstract="false" isQuery="false" name="set_cb" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="yAwhlp73E7qs" value="" type="DxG6tZBJQHh4" name="user_cb" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="vUEanT9yOP3H" isRoot="false" isAbstract="false" isQuery="false" name="remove_cb" />
- <UML:Operation comment="@param sta" isSpecification="false" isLeaf="false" visibility="public" xmi.id="xCZNTGPROL7A" isRoot="false" isAbstract="false" isQuery="false" name="set_sta" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="BCBNK0FDUTnF" value="" type="dlNG20SXVnem" name="sta" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="vwBJJCZGO8dr" isRoot="false" isAbstract="false" isQuery="false" name="send_async" />
- <UML:Operation comment="@param sta" isSpecification="false" isLeaf="false" visibility="public" xmi.id="M0HlMMtVY4sq" isRoot="false" isAbstract="false" isQuery="false" name="send_async" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="463WXojSivk2" value="" type="dlNG20SXVnem" name="sta" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="5HIUPuJluYUE" isRoot="false" isAbstract="false" isQuery="false" name="send" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Z2TCpSQhgRnp" type="xodDUGXAMLKD" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param sta" isSpecification="false" isLeaf="false" visibility="public" xmi.id="uNjTQaJUgNzB" isRoot="false" isAbstract="false" isQuery="false" name="send" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="laybWNhxdIcn" type="xodDUGXAMLKD" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="9iesbMuhdA90" value="" type="dlNG20SXVnem" name="sta" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool
-@param name" isSpecification="false" isLeaf="false" visibility="public" xmi.id="4SlxzE9tbtM1" isRoot="false" isAbstract="false" isQuery="false" name="is_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="n7EhAqdjq6tf" type="jEmP36b8eexL" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="ReU5zTG89s0j" value="" type="g6pCtTynyrSu" name="name" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return unsigned char *
-@param name
-@param length" isSpecification="false" isLeaf="false" visibility="public" xmi.id="EsOp3Xp5xZ2w" isRoot="false" isAbstract="false" isQuery="false" name="bind_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZKKDj81Uix3C" type="pcXZS4JlpBBT" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="nCoO38OUmsXj" value="" type="g6pCtTynyrSu" name="name" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="2Xry4ssr4gE5" value="" type="JnsSgq9sjXim" name="length" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="zLMiq2UtXKrc" isRoot="false" isAbstract="false" isQuery="false" name="bind_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KlAy3kjqrxW0" type="VPg2hVetD85b" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="CjTEOhJDJomj" value="" type="g6pCtTynyrSu" name="name" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" comment="// Constructors/Destructors// /**
-Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="gPchRmqJUY7B" isRoot="false" isAbstract="false" isQuery="false" name="Msg" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="WXyjBwQsK2Xl" value="" type="U0nk5GKAeh4g" name="p_maximus" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="oO5HuAQMAD7D" value="" type="v6Ix8Dv7zKFg" name="p_function_call_manager" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="RPN64PkYwgF8" value="" type="1nRAhhrW78Cm" name="p_system_manager" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="dfyvfVgStjjm" value="" type="g6pCtTynyrSu" name="name" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" comment="Copy constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="r98zLDCmcXqe" isRoot="false" isAbstract="false" isQuery="false" name="Msg" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="OPBG9s200A0L" value="" type="waDrHSxs6vlj" name="msg" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// public methods// /**
-@return Msg &amp;
-@param msg" isSpecification="false" isLeaf="false" visibility="public" xmi.id="EObIHK2ekDut" isRoot="false" isAbstract="false" isQuery="false" name="operator =" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="l7hbBbEktZwc" type="xodDUGXAMLKD" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="4ur42rNO0SLg" value="" type="waDrHSxs6vlj" name="msg" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return Msg &amp;
-@param name
-@param value
-Add a parameter named name to an existing message.
-Its length is set to the size of value string and its value is set to value.
-Return the message." isSpecification="false" isLeaf="false" visibility="public" xmi.id="7GMVrNKHVaOb" isRoot="false" isAbstract="false" isQuery="false" name="add_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="fx4Lu8XErhAs" type="xodDUGXAMLKD" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="KGTxD7teCVT0" value="" type="g6pCtTynyrSu" name="name" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="cM9uIgRNulsl" value="" type="g6pCtTynyrSu" name="value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return unsigned char *
-@param name
-@param length
-@param p_data
-Retrieve contents of the parameter named name.
-Return updated length of the received parameter via length and a pointer to its value via p_data.
-Return NULL if the parameter named name does not exist in the message, else return p_data.
-Note that user has to allocate enough memory for parameter value.
-If parameter value length is unknown, user has to allocate FUNCTION_CALL_PARAM_MAX_SIZE bytes." isSpecification="false" isLeaf="false" visibility="public" xmi.id="ZuHAW1eJWiPc" isRoot="false" isAbstract="false" isQuery="false" name="bind_param" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PrhFpDFYIw8T" type="pcXZS4JlpBBT" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="AzhmtMHXmeFr" value="" type="g6pCtTynyrSu" name="name" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="mXjW1RrbL9lq" value="" type="JnsSgq9sjXim" name="length" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="8P7e5WEFWv1N" value="" type="pcXZS4JlpBBT" name="p_data" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return Function_Call_Msg_Id
-Return mpFunctionSciMsg->mSpecializedSciMsgId." isSpecification="false" isLeaf="false" visibility="public" xmi.id="n4hHygeCvXCo" isRoot="false" isAbstract="false" isQuery="false" name="get_tx_msg_id" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VMCMv8yY51tz" type="g4QJcYzcXCwe" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return Function_Call_Msg_Id
-Return mpFunctionSciMsg->mpSpecializedSciMsgHeader->msg_id." isSpecification="false" isLeaf="false" visibility="public" xmi.id="C5saMj28nhPj" isRoot="false" isAbstract="false" isQuery="false" name="get_rx_msg_id" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9RBy6KqWBXl0" type="g4QJcYzcXCwe" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// private methods// // private attributes accessor methods///**
-@return Maximus *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="xmUOmt9SH2wL" isRoot="false" isAbstract="false" isQuery="false" name="getMaximus" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="iyX0sfUO1gkv" type="U0nk5GKAeh4g" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return IFunctionCall *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="IAkZHOQY5TzE" isRoot="false" isAbstract="false" isQuery="false" name="getFunctionCallManager" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="mhTriLopmzlq" type="v6Ix8Dv7zKFg" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return ISystem *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="3CN4p0imlDAX" isRoot="false" isAbstract="false" isQuery="false" name="getSystemManager" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JbKV93Tr1yqu" type="1nRAhhrW78Cm" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return cb_t" isSpecification="false" isLeaf="false" visibility="private" xmi.id="6HxLHueY2M7J" isRoot="false" isAbstract="false" isQuery="false" name="getCallback" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="dKGdyyWidxXJ" type="wnXcVmSSha0e" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool
-@param cb_t" isSpecification="false" isLeaf="false" visibility="private" xmi.id="kXrqzo220P4p" isRoot="false" isAbstract="false" isQuery="false" name="setCallback" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="IL62IrtaTD5a" type="jEmP36b8eexL" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="VzpXMwq4SfuR" value="" type="Qkc9xke12bLH" name="callback" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return FunctionSciMsg *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="TvRSKTFiDpr9" isRoot="false" isAbstract="false" isQuery="false" name="getFunctionSciMsg" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="HWPGVF86XOjT" type="heG5Hkz2HbX4" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool
-@param function_sci_msg " isSpecification="false" isLeaf="false" visibility="private" xmi.id="aVAa7VraTf8p" isRoot="false" isAbstract="false" isQuery="false" name="setFunctionSciMsg" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LFByBiIT3MWM" type="jEmP36b8eexL" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="KhiYWZh65peA" value="" type="bwt1amS1hrT1" name="function_sci_msg" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool" isSpecification="false" isLeaf="false" visibility="private" xmi.id="JUkm9qbklSmL" isRoot="false" isAbstract="false" isQuery="false" name="isResponseReceived" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ENwfYzFnTe4w" type="jEmP36b8eexL" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool
-@param bool" isSpecification="false" isLeaf="false" visibility="private" xmi.id="ECKt4mtMTbuz" isRoot="false" isAbstract="false" isQuery="false" name="setResponseReceived" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="sC1PZktuy4q9" type="jEmP36b8eexL" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="8Z4BNgLgA4SJ" value="" type="THhIOpi4zEEB" name="response_received" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="u32fTmygyJZ0" isRoot="false" isAbstract="false" isQuery="false" name="receiveResponse" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="5SNY1FVAnXJA" value="" type="bwt1amS1hrT1" name="function_sci_msg" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="EfqOjIibJiHm" isRoot="false" isAbstract="false" isQuery="false" name="receiveAsynchronousResponse" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="UFSSW0RbQo7S" value="" type="bwt1amS1hrT1" name="function_sci_msg" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- <UML:Namespace.ownedElement>
- <UML:Class stereotype="typedef" isSpecification="false" isLeaf="false" visibility="public" namespace="QDgInxgZQCAU" xmi.id="wnXcVmSSha0e" isRoot="false" isAbstract="false" name="cb_t" />
- </UML:Namespace.ownedElement>
- </UML:Class>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="iNY7Y0bMhGEA" isRoot="false" isAbstract="false" name="PhySciMsgMpdu" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="tbNdw9toAjKQ" isRoot="false" isAbstract="false" name="Error" />
- <UML:Class stereotype="typedef" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="DlAv42zir8Xn" isRoot="false" isAbstract="false" name="tick_t" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="0hFgvRqcmJlk" isRoot="false" isAbstract="false" name="MsgsList" elementReference="8tZZKzS1K06t" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="WqrqqvhoauSV" isRoot="false" isAbstract="false" name="StasList" elementReference="bRgJkgzqXYQq" />
- <UML:Class comment="class Maximus" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="ehlWWc3xpjDc" isRoot="false" isAbstract="false" name="Maximus" >
- <UML:Classifier.feature>
- <UML:Attribute comment="// private attributes// " isSpecification="false" visibility="private" xmi.id="kBrcJNNv26PY" type="fuB56JYI4iD9" name="mpCoreEngine" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="oo85zzbRDPyQ" type="UfIUtWfrdaT6" name="mMaximusLogFile" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="n9PQjqWWedbc" type="yw5ob124gIWX" name="mMaxTickValue" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="cD1naxBYtEMT" type="yw5ob124gIWX" name="mWaitTickValue" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="GMVud1SQApos" type="0hFgvRqcmJlk" name="mListOfMsgs" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="fIOIvxsVAtGj" type="WqrqqvhoauSV" name="mListOfStas" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="JoCPn2GpDqfJ" type="jEmP36b8eexL" name="mIsWireshark" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="nI1ZbW1iujDH" type="xNg2o0bO89EZ" name="mEtherLogFileDescriptor" />
- <UML:Operation stereotype="constructor" comment="// Constructors/Destructors// /**
-Empty Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="iTTXAh9pZJtd" isRoot="false" isAbstract="false" isQuery="false" name="Maximus" />
- <UML:Operation comment="Empty Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="cRvh97orIdRb" isRoot="false" isAbstract="false" isQuery="false" name="~ Maximus" />
- <UML:Operation comment="// public methods// /**
-@param argc
-@param argv
-Initialize Maximus with main program arguments." isSpecification="false" isLeaf="false" visibility="public" xmi.id="H2irvAKHRSNz" isRoot="false" isAbstract="false" isQuery="false" name="init" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="KE8chbfq3XX2" value="" type="4Y3pj29RWeiE" name="argc" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="en25DN2XZA8G" value="" type="m2WuMpndsVSl" name="argv[]" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param interface_cb
-Initialize PHY with an interface callback function for PHY SCI message MPDU reception." isSpecification="false" isLeaf="false" visibility="public" xmi.id="kl7lIen3fIx1" isRoot="false" isAbstract="false" isQuery="false" name="init_phy" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="6vXf5dwpP3Zf" value="" type="7idxC3iqoit2" name="interface_cb" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param ether_cb
-Initialize Ethernet with an interface callback function for Ether SCI message reception." isSpecification="false" isLeaf="false" visibility="public" xmi.id="fMiKcdKkMxfY" isRoot="false" isAbstract="false" isQuery="false" name="init_ether" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="yk1Lla0OuhjX" value="" type="0OMn4FpAAKoD" name="interface_cb" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="UVM9G9s9kRJz" isRoot="false" isAbstract="false" isQuery="false" name="process" />
- <UML:Operation comment="@return Sta &amp;
-@param station_executable the station executable to run
-Create a new station.
-Return a reference on a station object." isSpecification="false" isLeaf="false" visibility="public" xmi.id="UAPjRB4a3YSy" isRoot="false" isAbstract="false" isQuery="false" name="create_sta" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="n8aoV68hR2M0" type="dlNG20SXVnem" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="y0UiLgJWH0BO" value="" type="g6pCtTynyrSu" name="station_executable" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param name" isSpecification="false" isLeaf="false" visibility="public" xmi.id="wUvfwCeODqfS" isRoot="false" isAbstract="false" isQuery="false" name="create_fc" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zZnTBrN32OTb" type="xodDUGXAMLKD" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="34IFsvf6TQVF" value="" type="g6pCtTynyrSu" name="name" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="oGzm7Pe9UuOM" isRoot="false" isAbstract="false" isQuery="false" name="create_probe" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="7MV3OLA9Skyv" type="xodDUGXAMLKD" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Creates a PHY SCI message MPDU.
-Returns a pointer to a PHY SCI message MPDU object.
-@return PhySciMsgMpdu *" isSpecification="false" isLeaf="false" visibility="public" xmi.id="MZbBuOy5Jiak" isRoot="false" isAbstract="false" isQuery="false" name="create_mpdu" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="p6aG9wG8T2Ze" type="7Px2h6lKHGvZ" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sends an already configured PHY SCI message MPDU.
-@param p_mpdu
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="sJWan23AafJS" isRoot="false" isAbstract="false" isQuery="false" name="send_mpdu" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="1IXKy545U25B" value="" type="7Px2h6lKHGvZ" name="p_mpdu" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Creates an Ether SCI message.
-Returns a pointer to an Ether SCI message object.
-@return EtherSciMsg *" isSpecification="false" isLeaf="false" visibility="public" xmi.id="6oUL5NuvgRVS" isRoot="false" isAbstract="false" isQuery="false" name="create_ether" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tvivH9UOVzPr" type="6ZCYZGid4Ay7" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sends an already configured Ether SCI message.
-@param ether
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="Xt2CIVej2CjD" isRoot="false" isAbstract="false" isQuery="false" name="send_ether" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="rRdvZc37T3Hl" value="" type="5AQH9uODRbl0" name="ether" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param value" isSpecification="false" isLeaf="false" visibility="public" xmi.id="n3QGRuWMi7ZA" isRoot="false" isAbstract="false" isQuery="false" name="wait" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="Kb8mWW6JXXYy" value="" type="N5IkQdvEtuz1" name="value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="R2L79sHWxZEN" isRoot="false" isAbstract="false" isQuery="false" name="wait" />
- <UML:Operation comment="Enable or disable the channel perturbation." isSpecification="false" isLeaf="false" visibility="public" xmi.id="Y4tsFILI41mT" isRoot="false" isAbstract="false" isQuery="false" name="disturb_channel" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="y8weVEK2JBsY" value="" type="THhIOpi4zEEB" name="enable" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Get the Network Clock current tick." isSpecification="false" isLeaf="false" visibility="public" xmi.id="SEoWFa0gqfyE" isRoot="false" isAbstract="false" isQuery="false" name="get_date" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JX1jIzc53CJA" type="N5IkQdvEtuz1" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Set the power line frequency." isSpecification="false" isLeaf="false" visibility="public" xmi.id="U53t9vRGg4Q9" isRoot="false" isAbstract="false" isQuery="false" name="set_freq" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="niATBGvGImNB" value="" type="gfEyyxURjjPy" name="frequency" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Get the power line frequency." isSpecification="false" isLeaf="false" visibility="public" xmi.id="BepE4zsiBre8" isRoot="false" isAbstract="false" isQuery="false" name="get_freq" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6YHZaqDTjtN1" type="gfEyyxURjjPy" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Set the SNR." isSpecification="false" isLeaf="false" visibility="public" xmi.id="MwtCRX39AKA7" isRoot="false" isAbstract="false" isQuery="false" name="set_snr" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="By6Ly5oqxsUF" value="" type="gfEyyxURjjPy" name="snr_value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="jXpA2MwMGpXh" isRoot="false" isAbstract="false" isQuery="false" name="set_snr" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="LapVszb1vhMt" value="" type="g6pCtTynyrSu" name="snr_file" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="k9hi1Avihkrh" isRoot="false" isAbstract="false" isQuery="false" name="set_snr_from_src" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="4n3Kca0v8nPy" value="" type="gfEyyxURjjPy" name="snr_value" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="k0zffMWPVD5U" value="" type="T5xCWzXyj7oa" name="src" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="N0C2i3jmol5R" value="" type="THhIOpi4zEEB" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="IyZz6U3gTDAX" isRoot="false" isAbstract="false" isQuery="false" name="stop" />
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="b1BU44BeVaul" isRoot="false" isAbstract="false" isQuery="false" name="wrapper" ownerScope="classifier" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="PkDB6kB4O1z9" value="" type="4Y3pj29RWeiE" name="n" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" comment="// public methods///**
-Constructor (FOR UNITARY TESTS ONLY)" isSpecification="false" isLeaf="false" visibility="public" xmi.id="aQPFGpsToNX0" isRoot="false" isAbstract="false" isQuery="false" name="Maximus" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="0gsvnJ0Pj8x4" value="" type="fuB56JYI4iD9" name="p_core_engine" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool
-@param wait_tick_value" isSpecification="false" isLeaf="false" visibility="private" xmi.id="DzV5Ef9sw8T5" isRoot="false" isAbstract="false" isQuery="false" name="setWaitTickValue" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="2rNVplN6IOpY" type="jEmP36b8eexL" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="eSAXLV47u5vj" value="" type="uBMjyNZssFA6" name="wait_tick_value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return Network_Clock_Tick" isSpecification="false" isLeaf="false" visibility="private" xmi.id="mP3noVXifsRd" isRoot="false" isAbstract="false" isQuery="false" name="getWaitTickValue" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NPdObxZfVqE5" type="yw5ob124gIWX" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// private methods// /**
-@return CoreEngine *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="rSHiec9syenZ" isRoot="false" isAbstract="false" isQuery="false" name="getCoreEngine" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ePWOJtNJjipY" type="fuB56JYI4iD9" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// private methods// /**
-@return SystemManager *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="AAa24X1M896e" isRoot="false" isAbstract="false" isQuery="false" name="getSystemManager" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="TCekYRItqwHP" type="fDwAiS87UREb" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return FunctionCallManager *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="KT7F0Mb9UBBW" isRoot="false" isAbstract="false" isQuery="false" name="getFunctionCallManager" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rq4KgGNJftfw" type="iCrqJxTw8N6o" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return NetworkClockProcessor *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="nEvFe7qwavBZ" isRoot="false" isAbstract="false" isQuery="false" name="getNetworkClockProcessor" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="l2GUi30CFcwn" type="FmijvtGb37QM" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return PhyProcessor *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="2rI9EMxzarEC" isRoot="false" isAbstract="false" isQuery="false" name="getPhyProcessor" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1Cep6vExkGFQ" type="y48XzI6F2mwy" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return SciServer *" isSpecification="false" isLeaf="false" visibility="private" xmi.id="dAZgHz0IqGR2" isRoot="false" isAbstract="false" isQuery="false" name="getSciServer" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Wch9UM4FOKh5" type="cMzADDNCFTjF" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets a pointer to Channel
-@return mpCoreEngine->mpChannel" isSpecification="false" isLeaf="false" visibility="private" xmi.id="tIFqVzqqwvOI" isRoot="false" isAbstract="false" isQuery="false" name="getChannel" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LhHaHBLINz5S" type="7JKPViEW7ZAh" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="qppge6EX6XFp" isRoot="false" isAbstract="false" isQuery="false" name="set_snr_to_dst" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="tJrGkITt9ElM" value="" type="gfEyyxURjjPy" name="snr_value" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="CxHryPPmCESq" value="" type="T5xCWzXyj7oa" name="dst" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="KgOOCbD5s3Md" value="" type="THhIOpi4zEEB" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return Network_Clock_Tick" isSpecification="false" isLeaf="false" visibility="private" xmi.id="uVhIFP9vxrXQ" isRoot="false" isAbstract="false" isQuery="false" name="getMaxTickValue" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="sJPcXf11Fi8j" type="yw5ob124gIWX" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@param snr_file the SNR file to read
-@param the SNR array read from the SNR file
-@return bool" isSpecification="false" isLeaf="false" visibility="private" xmi.id="DlLanVCUPxtb" isRoot="false" isAbstract="false" isQuery="false" name="readSnrFile" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="5CyRUdWpIlNZ" type="jEmP36b8eexL" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="OLAYvCo3K1i3" value="" type="g6pCtTynyrSu" name="snr_file" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="CU0rFb5SKO06" value="" type="e4mAiTMYaY2m" name="snr_array[][]" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets a pointer to Ethernet
-@return mpCoreEngine->mpEthernet" isSpecification="false" isLeaf="false" visibility="private" xmi.id="vO9Qz7VtOkjt" isRoot="false" isAbstract="false" isQuery="false" name="getEthernet" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uipGfuiYB7Ai" type="v9K0jVhcro2q" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="@return bool
-@param max_tick_value" isSpecification="false" isLeaf="false" visibility="private" xmi.id="vRwGbr6W1PUk" isRoot="false" isAbstract="false" isQuery="false" name="setMaxTickValue" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="k9hysqhx0eMV" type="jEmP36b8eexL" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="eJzbBWz4vvLW" value="" type="uBMjyNZssFA6" name="max_tick_value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="Ek7RSV2xuIlc" isRoot="false" isAbstract="false" isQuery="false" name="set_snr_from_src_to_dst" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="YM7bapjg2SgL" value="" type="g6pCtTynyrSu" name="snr_file" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="SkFQJn1XW7wy" value="" type="T5xCWzXyj7oa" name="src" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="awvUEe7nzCMZ" value="" type="T5xCWzXyj7oa" name="dst" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="03D2VtLvcbMt" value="" type="THhIOpi4zEEB" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="J3KSqjOajODO" isRoot="false" isAbstract="false" isQuery="false" name="set_snr_from_src" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="kjmDurhGsrIY" value="" type="g6pCtTynyrSu" name="snr_file" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="t0JhlM62PRSD" value="" type="T5xCWzXyj7oa" name="src" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="ArlsDyExh08Z" value="" type="THhIOpi4zEEB" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="LnUS2DoCA326" isRoot="false" isAbstract="false" isQuery="false" name="set_snr_to_dst" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="SRscdKSwzoIB" value="" type="g6pCtTynyrSu" name="snr_file" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="NUEGXYrqMJIO" value="" type="T5xCWzXyj7oa" name="dst" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="W4Yg7alXzb9b" value="" type="THhIOpi4zEEB" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="wZXtOp4jJIxo" isRoot="false" isAbstract="false" isQuery="false" name="set_snr_from_src_to_dst" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="rocB7uXbw5G1" value="" type="gfEyyxURjjPy" name="snr_value" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="e1YdcfCWFjPb" value="" type="T5xCWzXyj7oa" name="src" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="XRIoiGbX2DiA" value="" type="T5xCWzXyj7oa" name="dst" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="8Fj2Iz4w0aYb" value="" type="THhIOpi4zEEB" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Activate wrong preambles transmission.
-@param average_duration average number of ticks 25 MHz between two consecutive wrong preambles
-@param std_deviation the standard deviation" isSpecification="false" isLeaf="false" visibility="public" xmi.id="aHkiu4bSKQ6I" isRoot="false" isAbstract="false" isQuery="false" name="activate_false_alarm" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="cduGtfrk8f0K" value="" type="uBMjyNZssFA6" name="average_duration" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="xRGV97PjN7PH" value="" type="gfEyyxURjjPy" name="std_deviation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Deactivate wrong preambles transmission." isSpecification="false" isLeaf="false" visibility="public" xmi.id="lIKxxxsc6w87" isRoot="false" isAbstract="false" isQuery="false" name="deactivate_false_alarm" />
- <UML:Operation comment="Indicate if the station is IDLE or not.
-@param station_id the ID of the station
-@return 'true' if the station is IDLE, 'false' otherwise" isSpecification="false" isLeaf="false" visibility="public" xmi.id="XJG9MFuSSUG1" isRoot="false" isAbstract="false" isQuery="false" name="is_station_idle" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="HrIacg7XMxl2" type="THhIOpi4zEEB" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="OTVrceMEaVGG" value="" type="mYkl2R0EAIiQ" name="station_id" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Indicates if Wireshark is enabled or not.
-@return 'true' if Wireshark is enabled, 'false' otherwise" isSpecification="false" isLeaf="false" visibility="private" xmi.id="CCl2O58fBXuU" isRoot="false" isAbstract="false" isQuery="false" name="isWireshark" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="rTY3YgjJqRFg" type="THhIOpi4zEEB" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="xNg2o0bO89EZ" isRoot="false" isAbstract="false" name="File_Descriptor" />
- </UML:Namespace.ownedElement>
- <XMI.extension xmi.extender="umbrello" >
- <diagrams>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="894" snapy="10" showatts="1" xmi.id="3KzgC5IKgrME" documentation="" type="1" showops="1" showpackage="1" name="Maximus" localid="" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1040" >
- <widgets>
- <classwidget usesdiagramfillcolor="1" width="772" showattsigs="601" x="67" fillcolor="none" y="28" showopsigs="601" linewidth="none" height="1008" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="ehlWWc3xpjDc" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,75,0,0,0,0,0" linecolor="none" />
- </widgets>
- <messages/>
- <associations/>
- </diagram>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="910" snapy="10" showatts="1" xmi.id="EA3ynGSPFKAz" documentation="" type="1" showops="1" showpackage="1" name="Sta" localid="" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="824" >
- <widgets>
- <classwidget usesdiagramfillcolor="0" width="670" showattsigs="601" x="40" fillcolor="#ffffc0" y="27" showopsigs="601" linewidth="none" height="342" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="ep8pvWB0srsZ" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
- </widgets>
- <messages/>
- <associations/>
- </diagram>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="910" snapy="10" showatts="1" xmi.id="4Bvhu10J0ZVK" documentation="" type="1" showops="1" showpackage="1" name="Msg" localid="" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="824" >
- <widgets>
- <classwidget usesdiagramfillcolor="1" width="856" showattsigs="601" x="26" fillcolor="none" y="26" showopsigs="601" linewidth="none" height="720" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="QDgInxgZQCAU" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,75,0,0,0,0,0" linecolor="none" />
- </widgets>
- <messages/>
- <associations/>
- </diagram>
- </diagrams>
- </XMI.extension>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Use Case View" isRoot="false" isAbstract="false" name="Use Case View" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Component View" isRoot="false" isAbstract="false" name="Component View" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Deployment View" isRoot="false" isAbstract="false" name="Deployment View" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Entity Relationship Model" isRoot="false" isAbstract="false" name="Entity Relationship Model" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- </UML:Namespace.ownedElement>
- </UML:Model>
- </XMI.content>
- <XMI.extensions xmi.extender="umbrello" >
- <docsettings viewid="3KzgC5IKgrME" documentation="" uniqueid="rTY3YgjJqRFg" />
- <listview>
- <listitem open="1" type="800" label="Views" >
- <listitem open="1" type="801" id="Logical View" >
- <listitem open="0" type="813" id="3cZNPG4Cidhc" />
- <listitem open="0" type="813" id="tbNdw9toAjKQ" />
- <listitem open="0" type="813" id="0OMn4FpAAKoD" />
- <listitem open="0" type="813" id="RYa1BtTCB0W9" />
- <listitem open="0" type="813" id="xNg2o0bO89EZ" />
- <listitem open="0" type="813" id="QLFCWED8oZX2" />
- <listitem open="0" type="813" id="OSpq2dnTY35U" />
- <listitem open="0" type="813" id="g4QJcYzcXCwe" />
- <listitem open="0" type="813" id="3Qe3zotuRRQu" />
- <listitem open="0" type="813" id="haieT6uYNCxq" />
- <listitem open="0" type="813" id="t3SV6Sb72ZAp" />
- <listitem open="0" type="813" id="wfaWTHxdQDUU" />
- <listitem open="0" type="813" id="j4JNar0VcD2Z" />
- <listitem open="0" type="813" id="nhhsSQ8LUaqY" />
- <listitem open="0" type="813" id="RCBIr5aEF5nl" />
- <listitem open="0" type="813" id="ehlWWc3xpjDc" >
- <listitem open="0" type="814" id="kBrcJNNv26PY" />
- <listitem open="0" type="814" id="oo85zzbRDPyQ" />
- <listitem open="0" type="814" id="n9PQjqWWedbc" />
- <listitem open="0" type="814" id="cD1naxBYtEMT" />
- <listitem open="0" type="814" id="GMVud1SQApos" />
- <listitem open="0" type="814" id="fIOIvxsVAtGj" />
- <listitem open="0" type="814" id="JoCPn2GpDqfJ" />
- <listitem open="0" type="814" id="nI1ZbW1iujDH" />
- <listitem open="0" type="815" id="iTTXAh9pZJtd" />
- <listitem open="0" type="815" id="cRvh97orIdRb" />
- <listitem open="0" type="815" id="H2irvAKHRSNz" />
- <listitem open="0" type="815" id="kl7lIen3fIx1" />
- <listitem open="0" type="815" id="fMiKcdKkMxfY" />
- <listitem open="0" type="815" id="UVM9G9s9kRJz" />
- <listitem open="0" type="815" id="UAPjRB4a3YSy" />
- <listitem open="0" type="815" id="wUvfwCeODqfS" />
- <listitem open="0" type="815" id="oGzm7Pe9UuOM" />
- <listitem open="0" type="815" id="MZbBuOy5Jiak" />
- <listitem open="0" type="815" id="sJWan23AafJS" />
- <listitem open="0" type="815" id="6oUL5NuvgRVS" />
- <listitem open="0" type="815" id="Xt2CIVej2CjD" />
- <listitem open="0" type="815" id="n3QGRuWMi7ZA" />
- <listitem open="0" type="815" id="R2L79sHWxZEN" />
- <listitem open="0" type="815" id="Y4tsFILI41mT" />
- <listitem open="0" type="815" id="SEoWFa0gqfyE" />
- <listitem open="0" type="815" id="U53t9vRGg4Q9" />
- <listitem open="0" type="815" id="BepE4zsiBre8" />
- <listitem open="0" type="815" id="MwtCRX39AKA7" />
- <listitem open="0" type="815" id="jXpA2MwMGpXh" />
- <listitem open="0" type="815" id="k9hi1Avihkrh" />
- <listitem open="0" type="815" id="IyZz6U3gTDAX" />
- <listitem open="0" type="815" id="b1BU44BeVaul" />
- <listitem open="0" type="815" id="aQPFGpsToNX0" />
- <listitem open="0" type="815" id="DzV5Ef9sw8T5" />
- <listitem open="0" type="815" id="mP3noVXifsRd" />
- <listitem open="0" type="815" id="rSHiec9syenZ" />
- <listitem open="0" type="815" id="AAa24X1M896e" />
- <listitem open="0" type="815" id="KT7F0Mb9UBBW" />
- <listitem open="0" type="815" id="nEvFe7qwavBZ" />
- <listitem open="0" type="815" id="2rI9EMxzarEC" />
- <listitem open="0" type="815" id="dAZgHz0IqGR2" />
- <listitem open="0" type="815" id="tIFqVzqqwvOI" />
- <listitem open="0" type="815" id="qppge6EX6XFp" />
- <listitem open="0" type="815" id="uVhIFP9vxrXQ" />
- <listitem open="0" type="815" id="DlLanVCUPxtb" />
- <listitem open="0" type="815" id="vO9Qz7VtOkjt" />
- <listitem open="0" type="815" id="vRwGbr6W1PUk" />
- <listitem open="0" type="815" id="Ek7RSV2xuIlc" />
- <listitem open="0" type="815" id="J3KSqjOajODO" />
- <listitem open="0" type="815" id="LnUS2DoCA326" />
- <listitem open="0" type="815" id="wZXtOp4jJIxo" />
- <listitem open="0" type="815" id="aHkiu4bSKQ6I" />
- <listitem open="0" type="815" id="lIKxxxsc6w87" />
- <listitem open="0" type="815" id="XJG9MFuSSUG1" />
- <listitem open="0" type="815" id="CCl2O58fBXuU" />
- </listitem>
- <listitem open="0" type="813" id="QDgInxgZQCAU" >
- <listitem open="0" type="813" id="wnXcVmSSha0e" />
- <listitem open="0" type="814" id="10jayNoLndBo" />
- <listitem open="0" type="814" id="cg4PHDBY9TK6" />
- <listitem open="0" type="814" id="L2vHZ83DCTWo" />
- <listitem open="0" type="814" id="zTPVfL9qQ1Ol" />
- <listitem open="0" type="814" id="iOtU5IDPI9gr" />
- <listitem open="0" type="814" id="Hj5RBZF83edg" />
- <listitem open="0" type="815" id="BX5JpmjsyPiS" />
- <listitem open="0" type="815" id="wGT7suZfVYaY" />
- <listitem open="0" type="815" id="NU8Ltpln5Fsv" />
- <listitem open="0" type="815" id="VrwMZppWoDE0" />
- <listitem open="0" type="815" id="gthvuuhhtyJ6" />
- <listitem open="0" type="815" id="KP2nfndMhLFZ" />
- <listitem open="0" type="815" id="vUEanT9yOP3H" />
- <listitem open="0" type="815" id="xCZNTGPROL7A" />
- <listitem open="0" type="815" id="vwBJJCZGO8dr" />
- <listitem open="0" type="815" id="M0HlMMtVY4sq" />
- <listitem open="0" type="815" id="5HIUPuJluYUE" />
- <listitem open="0" type="815" id="uNjTQaJUgNzB" />
- <listitem open="0" type="815" id="4SlxzE9tbtM1" />
- <listitem open="0" type="815" id="EsOp3Xp5xZ2w" />
- <listitem open="0" type="815" id="zLMiq2UtXKrc" />
- <listitem open="0" type="815" id="gPchRmqJUY7B" />
- <listitem open="0" type="815" id="r98zLDCmcXqe" />
- <listitem open="0" type="815" id="EObIHK2ekDut" />
- <listitem open="0" type="815" id="7GMVrNKHVaOb" />
- <listitem open="0" type="815" id="ZuHAW1eJWiPc" />
- <listitem open="0" type="815" id="n4hHygeCvXCo" />
- <listitem open="0" type="815" id="C5saMj28nhPj" />
- <listitem open="0" type="815" id="xmUOmt9SH2wL" />
- <listitem open="0" type="815" id="IAkZHOQY5TzE" />
- <listitem open="0" type="815" id="3CN4p0imlDAX" />
- <listitem open="0" type="815" id="6HxLHueY2M7J" />
- <listitem open="0" type="815" id="kXrqzo220P4p" />
- <listitem open="0" type="815" id="TvRSKTFiDpr9" />
- <listitem open="0" type="815" id="aVAa7VraTf8p" />
- <listitem open="0" type="815" id="JUkm9qbklSmL" />
- <listitem open="0" type="815" id="ECKt4mtMTbuz" />
- <listitem open="0" type="815" id="u32fTmygyJZ0" />
- <listitem open="0" type="815" id="EfqOjIibJiHm" />
- </listitem>
- <listitem open="0" type="813" id="dhiFOKw4B6PM" />
- <listitem open="0" type="813" id="yw5ob124gIWX" />
- <listitem open="0" type="813" id="HwHnzLGezUjF" />
- <listitem open="0" type="813" id="7idxC3iqoit2" />
- <listitem open="0" type="813" id="5MiuiZM7uaJQ" />
- <listitem open="0" type="813" id="iNY7Y0bMhGEA" />
- <listitem open="0" type="813" id="oVWa43dfiLu6" />
- <listitem open="0" type="813" id="mYkl2R0EAIiQ" />
- <listitem open="0" type="813" id="ep8pvWB0srsZ" >
- <listitem open="0" type="814" id="oVFnCUboi4pC" />
- <listitem open="0" type="814" id="go2VOfxnTEbJ" />
- <listitem open="0" type="814" id="KbeAQSpFv205" />
- <listitem open="0" type="814" id="k7cXtMnjJfrh" />
- <listitem open="0" type="815" id="djSSCnZepQOH" />
- <listitem open="0" type="815" id="4Ba9o2mMAkDn" />
- <listitem open="0" type="815" id="8RQh2fjgMB8Z" />
- <listitem open="0" type="815" id="yfBn3a25jdFW" />
- <listitem open="0" type="815" id="d1snm4YsTwXW" />
- <listitem open="0" type="815" id="bGAySGXOugAx" />
- <listitem open="0" type="815" id="Y88A5MrArpjK" />
- <listitem open="0" type="815" id="oUJVb76eSRGN" />
- <listitem open="0" type="815" id="RqGnq62Lsrne" />
- <listitem open="0" type="815" id="XbtDfhQJTQpp" />
- <listitem open="0" type="815" id="3kcWyBnGnSPD" />
- <listitem open="0" type="815" id="7b2NjvRqt15k" />
- <listitem open="0" type="815" id="5sTnbHce4Hug" />
- <listitem open="0" type="815" id="UWbeAOaxrZQu" />
- </listitem>
- <listitem open="0" type="813" id="fvd3d4zkVezE" />
- <listitem open="0" type="813" id="vRs8ZxhLHVQP" />
- <listitem open="0" type="813" id="iqALD0zLpMtS" />
- <listitem open="0" type="813" id="s5UhEg9EzVwp" />
- <listitem open="0" type="813" id="vmoDNQ6rF2Dm" />
- <listitem open="0" type="813" id="Z7QPu1pTKEg0" />
- <listitem open="0" type="813" id="DlAv42zir8Xn" />
- <listitem open="0" type="813" id="b7QGcuF2sksT" />
- <listitem open="0" type="818" id="FalPmYKPIgfK" >
- <listitem open="0" type="813" id="UfIUtWfrdaT6" />
- <listitem open="0" type="813" id="hNV9xKhyiJ0h" />
- </listitem>
- <listitem open="0" type="829" id="0hFgvRqcmJlk" />
- <listitem open="0" type="829" id="WqrqqvhoauSV" />
- <listitem open="0" type="830" id="Datatypes" >
- <listitem open="0" type="829" id="fuB56JYI4iD9" />
- <listitem open="0" type="829" id="5AQH9uODRbl0" />
- <listitem open="0" type="829" id="6ZCYZGid4Ay7" />
- <listitem open="0" type="829" id="iCrqJxTw8N6o" />
- <listitem open="0" type="829" id="heG5Hkz2HbX4" />
- <listitem open="0" type="829" id="7JKPViEW7ZAh" />
- <listitem open="0" type="829" id="v9K0jVhcro2q" />
- <listitem open="0" type="829" id="v6Ix8Dv7zKFg" />
- <listitem open="0" type="829" id="xnFXxdAshQqp" />
- <listitem open="0" type="829" id="qASXaGKCzFk2" />
- <listitem open="0" type="829" id="3OLgcMDSWdy5" />
- <listitem open="0" type="829" id="1nRAhhrW78Cm" />
- <listitem open="0" type="829" id="U0nk5GKAeh4g" />
- <listitem open="0" type="829" id="xodDUGXAMLKD" />
- <listitem open="0" type="829" id="FmijvtGb37QM" />
- <listitem open="0" type="829" id="y48XzI6F2mwy" />
- <listitem open="0" type="829" id="7Px2h6lKHGvZ" />
- <listitem open="0" type="829" id="cMzADDNCFTjF" />
- <listitem open="0" type="829" id="dlNG20SXVnem" />
- <listitem open="0" type="829" id="2CPeV2SQpVK6" />
- <listitem open="0" type="829" id="fDwAiS87UREb" />
- <listitem open="0" type="829" id="p0IbDUZ3xnb6" />
- <listitem open="0" type="829" id="VPg2hVetD85b" />
- <listitem open="1" type="829" id="jEmP36b8eexL" />
- <listitem open="1" type="829" id="r7DWE0eHIdyU" />
- <listitem open="0" type="829" id="m2WuMpndsVSl" />
- <listitem open="0" type="829" id="bwt1amS1hrT1" />
- <listitem open="0" type="829" id="waDrHSxs6vlj" />
- <listitem open="0" type="829" id="uBMjyNZssFA6" />
- <listitem open="0" type="829" id="T5xCWzXyj7oa" />
- <listitem open="0" type="829" id="THhIOpi4zEEB" />
- <listitem open="0" type="829" id="Qkc9xke12bLH" />
- <listitem open="0" type="829" id="DxG6tZBJQHh4" />
- <listitem open="0" type="829" id="sdbAE2jFpDFi" />
- <listitem open="0" type="829" id="gfEyyxURjjPy" />
- <listitem open="0" type="829" id="g6pCtTynyrSu" />
- <listitem open="0" type="829" id="N5IkQdvEtuz1" />
- <listitem open="0" type="829" id="x1PhEfJEggJw" />
- <listitem open="0" type="829" id="Q0UsbF8ykFHb" />
- <listitem open="1" type="829" id="Wh4oK0G1C0OG" />
- <listitem open="1" type="829" id="e4mAiTMYaY2m" />
- <listitem open="1" type="829" id="4Y3pj29RWeiE" />
- <listitem open="1" type="829" id="JmXtIagoHiaZ" />
- <listitem open="1" type="829" id="60MkeH6JLqR1" />
- <listitem open="0" type="829" id="8tZZKzS1K06t" />
- <listitem open="0" type="829" id="bRgJkgzqXYQq" />
- <listitem open="1" type="829" id="QdAO1lyjPrjw" />
- <listitem open="0" type="829" id="pcXZS4JlpBBT" />
- <listitem open="1" type="829" id="gobqox6sxQcc" />
- <listitem open="1" type="829" id="7MAM2iuiWTYI" />
- <listitem open="0" type="829" id="JnsSgq9sjXim" />
- <listitem open="1" type="829" id="hgt0XK0q4XiM" />
- </listitem>
- </listitem>
- <listitem open="1" type="802" id="Use Case View" />
- <listitem open="1" type="821" id="Component View" />
- <listitem open="1" type="827" id="Deployment View" />
- <listitem open="1" type="836" id="Entity Relationship Model" />
- </listitem>
- </listview>
- <codegeneration>
- <codegenerator language="C++" />
- </codegeneration>
- </XMI.extensions>
-</XMI>
diff --git a/cesar/maximus/ethernet/Module b/cesar/maximus/ethernet/Module
deleted file mode 100644
index e23e01431c..0000000000
--- a/cesar/maximus/ethernet/Module
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES := EthernetProcessor.cpp EtherSciMsg.cpp
-ifdef UNITTEST
-SOURCES += EthernetProcessorTest.cpp EtherSciMsgTest.cpp
-endif
-HOST_INCLUDES += maximus/ethernet/inc
diff --git a/cesar/maximus/ethernet/inc/EtherSciMsg.h b/cesar/maximus/ethernet/inc/EtherSciMsg.h
deleted file mode 100644
index 6ed35f82a8..0000000000
--- a/cesar/maximus/ethernet/inc/EtherSciMsg.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/************************************************************************
- EtherSciMsg.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/ethernet/inc/EtherSciMsg.h
-**************************************************************************/
-
-#ifndef ETHERSCIMSG_H
-#define ETHERSCIMSG_H
-
-#include "SciMsg.h"
-
-#include "ethernet_types.h"
-
-class IEthernet;
-
-
-/**
- * class EtherSciMsg
- */
-
-class EtherSciMsg : public SciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
-protected:
-
- // protected attributes
- //
-
- // Get from specialized SCI msg header
- //
- Ethernet_Type mSpecializedSciMsgType;
- Ethernet_Flags mFlags;
-
- // Specialized SCI msg header
- //
- Ethernet_Header mSpecializedSciMsgHeader;
-
- IEthernet * mpEthernet;
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- EtherSciMsg ( IEthernet * p_ethernet );
-
- /**
- * Empty Destructor
- */
- virtual ~EtherSciMsg ( );
-
- // public methods
- //
-
- /**
- * Creates an Ether SCI message.
- * @return SciMsg *
- */
- SciMsg * create ( ) const;
-
- /**
- * Handles a received Ether SCI message.
- * @return bool
- */
- bool dispatchMsg ( );
-
- /**
- * When receiving an Ether SCI message,
- * extracts the Ether SCI message header from the received SCI message data.
- * @return bool
- */
- bool identifySpecializedSciMsgHeader ( );
-
- /**
- * Checks that software versions are compatible,
- * i.e. checks specialized SCI msg compatibility (check specialized SCI msg version).
- * @return bool
- */
- bool checkCompatibility ( ) const;
-
- /**
- * Checks Ether SCI message header values ranges,
- * i.e. checks specialized SCI msg validity (check specialized SCI msg header coherence).
- * @return bool
- */
- bool checkValidity ( ) const;
-
- /**
- * Displays the Ether SCI message header contents.
- */
- void displaySpecializedSciMsgHeader ( ) const;
-
- /**
- * Display the specialized SCI message type.
- */
- void displaySpecializedSciMsgType ( int log_level ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- // protected attribute accessor methods
- //
-
- /**
- * Gets a pointer to the Ether SCI message header.
- * @return mSpecializedSciMsgHeader into a void pointer
- */
- void * returnSpecializedSciMsgHeader ( ) const;
-
- /**
- * Gets the Ether SCI message header.
- * @return mSpecializedSciMsgHeader
- */
- const Ethernet_Header & getSpecializedSciMsgHeader ( ) const;
-
- /**
- * Sets the value of the Ethernet SCI message header.
- * @return bool
- * @param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader
- */
- bool setSpecializedSciMsgHeader ( const Ethernet_Header & specialized_sci_msg_header );
-
- /**
- * Gets the Ether SCI message type.
- * @return mSpecializedSciMsgType
- */
- Ethernet_Type getSpecializedSciMsgType ( ) const;
-
- /**
- * Sets the Ether SCI message type.
- * @return bool
- * @param type the new value of mSpecializedSciMsgType
- */
- bool setSpecializedSciMsgType ( const Ethernet_Type type );
-
- /**
- * Gets the Ether SCI message flags.
- * @return mFlags
- */
- Ethernet_Flags getFlags ( ) const;
-
- /**
- * Sets the Ether SCI message flags.
- * @return bool
- * @param flags the new value of mFlags
- */
- bool setFlags ( const Ethernet_Flags flags );
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the Ether SCI message class attributes.
- */
- void initAttributes ( );
-
- /**
- * Gets a pointer to the Ethernet processor.
- * @return mpEthernet
- */
- IEthernet * getEthernet ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // ETHERSCIMSG_H
diff --git a/cesar/maximus/ethernet/inc/EtherSciMsgTest.h b/cesar/maximus/ethernet/inc/EtherSciMsgTest.h
deleted file mode 100644
index 64bc494a7d..0000000000
--- a/cesar/maximus/ethernet/inc/EtherSciMsgTest.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-#ifndef ETHERSCIMSGTEST_H
-#define ETHERSCIMSGTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class EtherSciMsg;
-class IEthernet;
-class ISci;
-
-
-class EtherSciMsgTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (EtherSciMsgTest);
- CPPUNIT_TEST (createTest);
- CPPUNIT_TEST (dispatchMsgTest);
- CPPUNIT_TEST (identifySpecializedSciMsgHeaderTest);
- CPPUNIT_TEST (checkCompatibilityTest);
- CPPUNIT_TEST (checkValidityTest);
- CPPUNIT_TEST (displaySpecializedSciMsgHeaderTest);
- CPPUNIT_TEST (displaySpecializedSciMsgTypeTest);
- CPPUNIT_TEST (returnSpecializedSciMsgHeaderTest);
- CPPUNIT_TEST (setSpecializedSciMsgHeaderTest);
- CPPUNIT_TEST (setSpecializedSciMsgTypeTest);
- CPPUNIT_TEST (setFlagsTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void createTest (void);
- void dispatchMsgTest (void);
- void identifySpecializedSciMsgHeaderTest (void);
- void checkCompatibilityTest (void);
- void checkValidityTest (void);
- void displaySpecializedSciMsgHeaderTest (void);
- void displaySpecializedSciMsgTypeTest(void);
- void returnSpecializedSciMsgHeaderTest (void);
- void setSpecializedSciMsgHeaderTest (void);
- void setSpecializedSciMsgTypeTest (void);
- void setFlagsTest (void);
-
-private:
-
- EtherSciMsg * mpEtherSciMsg;
- IEthernet * mpEthernet;
- ISci * mpSci;
-
-};
-
-
-#endif // ETHERSCIMSGTEST_H
diff --git a/cesar/maximus/ethernet/inc/EthernetProcessor.h b/cesar/maximus/ethernet/inc/EthernetProcessor.h
deleted file mode 100644
index 9d389aa247..0000000000
--- a/cesar/maximus/ethernet/inc/EthernetProcessor.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/************************************************************************
- EthernetProcessor.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/ethernet/inc/EthernetProcessor.h
-**************************************************************************/
-
-#ifndef ETHERNETPROCESSOR_H
-#define ETHERNETPROCESSOR_H
-
-#include "IEthernet.h"
-
-#include "ethernet_types.h"
-
-class ISci;
-
-
-/**
- * class EthernetProcessor
- */
-
-class EthernetProcessor : public IEthernet
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
- ISci * mpSci;
- EtherCb mInterfaceCb;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- EthernetProcessor ( ISci * p_sci );
-
- /**
- * Empty Destructor
- */
- virtual ~EthernetProcessor ( );
-
- // public methods
- //
-
- /**
- * Initializes Ethernet with an interface callback function for Ether SCI message reception.
- * @param interface_cb
- * @return bool
- */
- bool init ( EtherCb interface_cb );
-
- /**
- * Creates an Ether SCI message.
- * @return EtherSciMsg *
- */
- EtherSciMsg * createEther ( );
-
- /**
- * Sends an Ether SCI message.
- * This message has to be configured before transmission.
- * @param ether_sci_msg
- * @return bool
- */
- bool sendEther ( EtherSciMsg & ether_sci_msg );
-
- /**
- * Called when an Ether SCI message is received.
- * @param ether_sci_msg
- * @return bool
- */
- bool receiveEther ( EtherSciMsg & ether_sci_msg );
-
- /**
- * Creates a TAP.
- * @param dev name of the TAP file
- * @return the created TAP file descriptor
- */
- File_Descriptor allocTap ( char * dev ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the Ethernet processor class attributes.
- */
- void initAttributes ( );
-
- /**
- * Registers the Ether SCI message creation function to the SCI server.
- */
- void registerEtherSciMsg ( );
-
- /**
- * Fills the Ether SCI message to send.
- * @return bool
- * @param ether_sci_msg
- */
- bool fillEther ( EtherSciMsg & ether_sci_msg ) const;
-
- /**
- * Gets a pointer to SCI.
- * @return mpSci
- */
- ISci * getSci ( ) const;
-
- /**
- * Gets the interface callback function for Ether SCI message reception.
- * @return mInterfaceCb
- */
- EtherCb getInterfaceCb ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // ETHERNETPROCESSOR_H
diff --git a/cesar/maximus/ethernet/inc/EthernetProcessorTest.h b/cesar/maximus/ethernet/inc/EthernetProcessorTest.h
deleted file mode 100644
index 138c7f4f18..0000000000
--- a/cesar/maximus/ethernet/inc/EthernetProcessorTest.h
+++ /dev/null
@@ -1,44 +0,0 @@
-
-#ifndef ETHERNETPROCESSORTEST_H
-#define ETHERNETPROCESSORTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class EthernetProcessor;
-class CoreEngine;
-
-
-class EthernetProcessorTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (EthernetProcessorTest);
- CPPUNIT_TEST (initTest);
- CPPUNIT_TEST (createEtherTest);
- CPPUNIT_TEST (sendEtherTest);
- CPPUNIT_TEST (receiveEtherTest);
- CPPUNIT_TEST (allocTapTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void initTest (void);
- void createEtherTest (void);
- void sendEtherTest (void);
- void receiveEtherTest (void);
- void allocTapTest (void);
-
-private:
-
- EthernetProcessor * mpEthernetProcessor;
- CoreEngine * mpCoreEngine;
-
-};
-
-
-#endif // ETHERNETPROCESSORTEST_H
diff --git a/cesar/maximus/ethernet/inc/IEthernet.h b/cesar/maximus/ethernet/inc/IEthernet.h
deleted file mode 100644
index b5b6a44b19..0000000000
--- a/cesar/maximus/ethernet/inc/IEthernet.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/************************************************************************
- IEthernet.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/IEthernet.h
-**************************************************************************/
-
-#ifndef IETHERNET_H
-#define IETHERNET_H
-
-#include "system_types.h" // for 'File_Descriptor'
-
-#include <boost/function.hpp> // for 'EtherCb'
-
-class EtherSciMsg;
-
-typedef boost::function <void (EtherSciMsg &)> EtherCb;
-
-
-/**
- * class IEthernet
- */
-
-class IEthernet
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- IEthernet ( ) { }
-
- /**
- * Empty Destructor
- */
- virtual ~IEthernet ( ) { }
-
- // public methods
- //
-
- /**
- * Initializes Ethernet with an interface callback function for Ether SCI message reception.
- * @param interface_cb
- * @return bool
- */
- virtual bool init ( EtherCb interface_cb ) = 0;
-
- /**
- * Creates an Ether SCI message.
- * @return EtherSciMsg *
- */
- virtual EtherSciMsg * createEther ( ) = 0;
-
- /**
- * Sends an Ether SCI message.
- * This message has to be configured before transmission.
- * @param ether_sci_msg
- * @return bool
- */
- virtual bool sendEther ( EtherSciMsg & ether_sci_msg ) = 0;
-
- /**
- * Called when an Ether SCI message is received.
- * @param ether_sci_msg
- * @return bool
- */
- virtual bool receiveEther ( EtherSciMsg & ether_sci_msg ) = 0;
-
- /**
- * Creates a TAP.
- * @param dev name of the TAP file
- * @return the created TAP file descriptor
- */
- virtual File_Descriptor allocTap ( char * dev ) const = 0;
-};
-
-
-#endif // IETHERNET_H
diff --git a/cesar/maximus/ethernet/src/EtherSciMsg.cpp b/cesar/maximus/ethernet/src/EtherSciMsg.cpp
deleted file mode 100644
index 2ce3b162f3..0000000000
--- a/cesar/maximus/ethernet/src/EtherSciMsg.cpp
+++ /dev/null
@@ -1,335 +0,0 @@
-/************************************************************************
- EtherSciMsg.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/src/EtherSciMsg.cpp
-**************************************************************************/
-
-#include "EtherSciMsg.h"
-#include "IEthernet.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iomanip> // for 'setfill()' and 'setw()'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-EtherSciMsg::EtherSciMsg ( IEthernet * p_ethernet ):
-mSpecializedSciMsgType(ETHERNET_TYPE_NONE),
-mFlags(ETHERNET_FLAG_NONE),
-mpEthernet(NULL)
-{
- logFunction();
-
- if (NULL == p_ethernet)
- {
- throw Error(__PRETTY_FUNCTION__, "Ethernet processor pointer is NULL");
- }
-
- mpEthernet = p_ethernet;
- initAttributes ();
-}
-
-
-void EtherSciMsg::initAttributes ( )
-{
- logFunction();
-
- mSpecializedSciMsgHeader.version = ETHERNET_VERSION;
- mSpecializedSciMsgHeader.type = ETHERNET_TYPE_NONE;
- mSpecializedSciMsgHeader.flags = ETHERNET_FLAG_NONE;
- mSpecializedSciMsgHeader.reserved = 0x00000000;
-}
-
-
-EtherSciMsg::~EtherSciMsg ( )
-{
- logFunction();
-
- if (NULL != mpEthernet)
- {
- mpEthernet = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-SciMsg * EtherSciMsg::create ( ) const
-{
- logFunction();
-
- return new EtherSciMsg (getEthernet());
-}
-
-
-bool EtherSciMsg::dispatchMsg ( )
-{
- logFunction();
-
- bool bDispatch = getEthernet()->receiveEther(*this);
-
- if (!bDispatch)
- {
- throw Error(__PRETTY_FUNCTION__, "error while receiving Ether SCI message");
- }
-
- return bDispatch;
-}
-
-
-bool EtherSciMsg::identifySpecializedSciMsgHeader ( )
-{
- logFunction();
- bool bIdentifyHeader = false;
-
- if (NULL != SciMsg::getSciMsgData())
- {
- // Set specialized SCI msg header size
- //
- SciMsg::setSpecializedSciMsgHeaderSize((unsigned long)sizeof(struct Ethernet_Header));
-
- // Get specialized SCI message header contents
- //
- if (SciMsg::getSciMsgDataLength() >= SciMsg::getSpecializedSciMsgHeaderSize()) // check that there are enough data to get the specialized SCI message header
- {
- setSpecializedSciMsgHeader(*((Ethernet_Header*)SciMsg::getSciMsgData()));
-
- // Set specialized SCI msg attributes from specialized SCI msg header
- //
- setSpecializedSciMsgType (static_cast<Ethernet_Type>(getSpecializedSciMsgHeader().type));
- setFlags (static_cast<Ethernet_Flags>(getSpecializedSciMsgHeader().flags));
- displaySpecializedSciMsgHeader();
- bIdentifyHeader = true;
- }
- else
- {
- errno = ENODATA;
- throw Error(__PRETTY_FUNCTION__, "Not enough data to get the specialized SCI message header", errno);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI message data pointer is NULL");
- }
-
- return bIdentifyHeader;
-}
-
-
-bool EtherSciMsg::checkCompatibility ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- if (ETHERNET_VERSION == getSpecializedSciMsgHeader().version)
- {
- bCheck = SciMsg::checkCompatibility();
- }
-
- return bCheck;
-}
-
-
-bool EtherSciMsg::checkValidity ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- // Check header values ranges
- //
- if ((ETHERNET_TYPE_NB > getSpecializedSciMsgHeader().type)
- && (ETHERNET_TYPE_NONE < getSpecializedSciMsgHeader().type)
- && (ETHERNET_FLAG_MAX >= getSpecializedSciMsgHeader().flags))
- {
- bCheck = SciMsg::checkValidity();
- }
-
- return bCheck;
-}
-
-
-void EtherSciMsg::displaySpecializedSciMsgHeader ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "Ether SCI message header = " << endl;
- clog << logger(LOG_INFO) << "\tversion = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().version) << endl;
- displaySpecializedSciMsgType(LOG_INFO);
- clog << logger(LOG_INFO) << "\tflags = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().flags) << endl;
- clog << logger(LOG_INFO) << "\treserved = 0x" << setfill('0') << setw(8) << uppercase << hex << getSpecializedSciMsgHeader().reserved << endl;
-#endif /* CONFIG_LOG */
-}
-
-
-void EtherSciMsg::displaySpecializedSciMsgType ( int log_level ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- switch (getSpecializedSciMsgHeader().type)
- {
- case 0:
- clog << logger(log_level) << "\ttype = ETHERNET_TYPE_NONE" << endl;
- break;
- case 1:
- clog << logger(log_level) << "\ttype = ETHERNET_TYPE_DATA" << endl;
- break;
- case 2:
- clog << logger(log_level) << "\ttype = ETHERNET_TYPE_MME" << endl;
- break;
- case 3:
- clog << logger (log_level) << "\ttype = ETHERNET_TYPE_BUFFER_ADD" << endl;
- break;
- case 4:
- clog << logger(log_level) << "\ttype = ETHERNET_TYPE_BUFFER_RELEASED" << endl;
- break;
- default:
- clog << logger(log_level) << "\ttype = unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-// protected attribute accessor methods
-//
-
-
-void * EtherSciMsg::returnSpecializedSciMsgHeader ( ) const
-{
- return (void*)&mSpecializedSciMsgHeader;
-}
-
-
-const Ethernet_Header & EtherSciMsg::getSpecializedSciMsgHeader ( ) const
-{
- return mSpecializedSciMsgHeader;
-}
-
-
-bool EtherSciMsg::setSpecializedSciMsgHeader ( const Ethernet_Header & specialized_sci_msg_header )
-{
- logFunction();
-
- mSpecializedSciMsgHeader = specialized_sci_msg_header;
- displaySpecializedSciMsgHeader();
-
- return true;
-}
-
-
-IEthernet * EtherSciMsg::getEthernet ( ) const
-{
- if (NULL == mpEthernet)
- {
- throw Error(__PRETTY_FUNCTION__, "Ethernet processor pointer is NULL");
- }
-
- return mpEthernet;
-}
-
-
-Ethernet_Type EtherSciMsg::getSpecializedSciMsgType ( ) const
-{
- return mSpecializedSciMsgType;
-}
-
-
-bool EtherSciMsg::setSpecializedSciMsgType ( const Ethernet_Type type )
-{
- if ((ETHERNET_TYPE_NB <= type) || (ETHERNET_TYPE_NONE >= type))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Ether SCI message header type is out-of-range", errno);
- }
- mSpecializedSciMsgType = type;
-
- return true;
-}
-
-
-Ethernet_Flags EtherSciMsg::getFlags ( ) const
-{
- if (ETHERNET_FLAG_MAX < mFlags)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Ether SCI message header flags are out-of-range", errno);
- }
-
- return mFlags;
-}
-
-
-bool EtherSciMsg::setFlags ( const Ethernet_Flags flags )
-{
- if (ETHERNET_FLAG_MAX < flags)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Ether SCI message header flags are out-of-range", errno);
- }
- mFlags = flags;
-
- return true;
-}
-
diff --git a/cesar/maximus/ethernet/src/EtherSciMsgTest.cpp b/cesar/maximus/ethernet/src/EtherSciMsgTest.cpp
deleted file mode 100644
index afba4f373d..0000000000
--- a/cesar/maximus/ethernet/src/EtherSciMsgTest.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-
-#include "EtherSciMsgTest.h"
-
-#include "EtherSciMsg.h"
-#include "EthernetProcessor.h"
-#include "SciServer.h"
-#include "SystemManager.h"
-#include "PhyProcessor.h"
-#include "NetworkClockProcessor.h"
-#include "FunctionCallManager.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (EtherSciMsgTest);
-
-
-void EtherSciMsgTest::setUp (void)
-{
- logTest();
-
- mpSci = new SciServer();
- mpEthernet = new EthernetProcessor (mpSci);
- mpEtherSciMsg = new EtherSciMsg (mpEthernet);
- CPPUNIT_ASSERT_MESSAGE("EtherSciMsg pointer is NULL", NULL != mpEtherSciMsg);
-
- unsigned long frameLength = 1500;
- unsigned char frame[frameLength];
- memset(frame, 'F', frameLength);
- mpEtherSciMsg->setSpecializedSciMsgDataLength(frameLength);
- mpEtherSciMsg->setSpecializedSciMsgData(frame);
-
- Ethernet_Header header;
- header.version = ETHERNET_VERSION;
- header.type = ETHERNET_TYPE_BUFFER_ADD;
- header.flags = ETHERNET_FLAG_NONE;
- header.reserved = 0x12;
- mpEtherSciMsg->setSpecializedSciMsgHeader(header);
-}
-
-
-void EtherSciMsgTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpEtherSciMsg)
- {
- delete (mpEtherSciMsg);
- mpEtherSciMsg = NULL;
- }
- if (NULL != mpEthernet)
- {
- delete (mpEthernet);
- mpEthernet = NULL;
- }
- if (NULL != mpSci)
- {
- delete (mpSci);
- mpSci = NULL;
- }
-}
-
-
-void EtherSciMsgTest::createTest (void)
-{
- logTest();
-
- SciMsg * pSciMsg = NULL;
- pSciMsg = mpEtherSciMsg->create();
- CPPUNIT_ASSERT_MESSAGE("createTest failed", NULL != pSciMsg);
-
- delete (pSciMsg);
- pSciMsg = NULL;
-}
-
-
-void EtherSciMsgTest::dispatchMsgTest (void)
-{
- logTest();
-
- ISystem * pSystem = new SystemManager(mpSci);
- CPPUNIT_ASSERT_MESSAGE("ISystem pointer is NULL", NULL != pSystem);
-
- IFunctionCall * pFunctionCall = new FunctionCallManager (mpSci);
- IPhy * pPhy = new PhyProcessor (mpSci);
- INetworkClock * pNetworkClock = new NetworkClockProcessor (mpSci, pSystem, pFunctionCall, pPhy, mpEthernet);
- pSystem->setNetworkClock(pNetworkClock);
-
- pSystem->createStation(pSystem->getDefaultStationExecutable());
- CPPUNIT_ASSERT_MESSAGE("dispatchMsg failed", mpEtherSciMsg->dispatchMsg());
-
- delete (pSystem);
- pSystem = NULL;
-
- if (NULL != pFunctionCall)
- {
- delete (pFunctionCall);
- pFunctionCall = NULL;
- }
- if (NULL != pPhy)
- {
- delete (pPhy);
- pPhy = NULL;
- }
- if (NULL != pNetworkClock)
- {
- delete (pNetworkClock);
- pNetworkClock = NULL;
- }
-}
-
-
-void EtherSciMsgTest::identifySpecializedSciMsgHeaderTest (void)
-{
- logTest();
-
- unsigned long frameLength = 1500;
- unsigned char frame[frameLength];
- memset(frame, 0x00, frameLength);
- frame[0] = 0x02; // version
- frame[1] = 0x01; // type
- mpEtherSciMsg->setSciMsgDataLength(frameLength);
- mpEtherSciMsg->setSciMsgData(frame);
- CPPUNIT_ASSERT_MESSAGE("identifySpecializedSciMsgHeader failed",
- mpEtherSciMsg->identifySpecializedSciMsgHeader());
-}
-
-
-void EtherSciMsgTest::checkCompatibilityTest (void)
-{
- logTest();
-
- Sci_Msg_Header header;
- header.version = SCI_MSG_VERSION;
- mpEtherSciMsg->setSciMsgHeader(header);
- CPPUNIT_ASSERT_MESSAGE("checkCompatibility failed",
- mpEtherSciMsg->checkCompatibility());
-}
-
-
-void EtherSciMsgTest::checkValidityTest (void)
-{
- logTest();
-
- Sci_Msg_Header header;
- header.magic_id = mpEtherSciMsg->getDefinedSciMsgMagicId();
- header.msg_id = 0x8000;
- mpEtherSciMsg->setSciMsgHeader(header);
- CPPUNIT_ASSERT_MESSAGE("checkValidity failed",
- mpEtherSciMsg->checkValidity());
-}
-
-
-void EtherSciMsgTest::displaySpecializedSciMsgHeaderTest (void)
-{
- logTest();
-
- mpEtherSciMsg->displaySpecializedSciMsgHeader();
-}
-
-
-void EtherSciMsgTest::displaySpecializedSciMsgTypeTest (void)
-{
- logTest();
-
- mpEtherSciMsg->displaySpecializedSciMsgType(LOG_INFO);
-}
-
-
-void EtherSciMsgTest::returnSpecializedSciMsgHeaderTest (void)
-{
- logTest();
-
- void * vpHeader = NULL;
- vpHeader = mpEtherSciMsg->returnSpecializedSciMsgHeader();
- CPPUNIT_ASSERT_MESSAGE("void pointer is NULL", NULL != vpHeader);
- Ethernet_Header * pHeader = (Ethernet_Header *)vpHeader;
- CPPUNIT_ASSERT_MESSAGE("returnSpecializedSciMsgHeader failed",
- (mpEtherSciMsg->getSpecializedSciMsgHeader().version == pHeader->version)
- && (mpEtherSciMsg->getSpecializedSciMsgHeader().type == pHeader->type)
- && (mpEtherSciMsg->getSpecializedSciMsgHeader().flags == pHeader->flags)
- && (mpEtherSciMsg->getSpecializedSciMsgHeader().reserved == pHeader->reserved));
-}
-
-
-void EtherSciMsgTest::setSpecializedSciMsgHeaderTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE("setSpecializedSciMsgHeader failed",
- ETHERNET_TYPE_BUFFER_ADD == mpEtherSciMsg->getSpecializedSciMsgHeader ().type);
-}
-
-
-void EtherSciMsgTest::setSpecializedSciMsgTypeTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE("setSpecializedSciMsgType failed",
- mpEtherSciMsg->setSpecializedSciMsgType(ETHERNET_TYPE_DATA)
- && (ETHERNET_TYPE_DATA == mpEtherSciMsg->getSpecializedSciMsgType()));
-}
-
-
-void EtherSciMsgTest::setFlagsTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE("setFlags failed",
- mpEtherSciMsg->setFlags(ETHERNET_FLAG_MAX)
- && (ETHERNET_FLAG_MAX == mpEtherSciMsg->getFlags()));
-}
-
diff --git a/cesar/maximus/ethernet/src/EthernetProcessor.cpp b/cesar/maximus/ethernet/src/EthernetProcessor.cpp
deleted file mode 100644
index 1d7c7267ef..0000000000
--- a/cesar/maximus/ethernet/src/EthernetProcessor.cpp
+++ /dev/null
@@ -1,305 +0,0 @@
-/************************************************************************
- EthernetProcessor.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/ethernet/src/EthernetProcessor.cpp
-**************************************************************************/
-
-#include "EthernetProcessor.h"
-
-#include "EtherSciMsg.h"
-#include "ISci.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <sys/socket.h> // for 'struct sockaddr'
-#include <linux/if.h>
-#include <linux/if_tun.h>
-#include <sys/ioctl.h>
-#include <fcntl.h> // for 'O_RDWR'
-#include <unistd.h> // for 'system()'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-EthernetProcessor::EthernetProcessor ( ISci * p_sci ):
-mpSci(NULL),
-mInterfaceCb(NULL)
-{
- logFunction();
-
- if (NULL == p_sci)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI pointer is NULL", errno);
- }
- mpSci = p_sci;
- initAttributes();
-}
-
-
-void EthernetProcessor::initAttributes ( )
-{
- logFunction();
-
- registerEtherSciMsg();
-}
-
-
-EthernetProcessor::~EthernetProcessor ( )
-{
- logFunction();
-
- if (NULL != mpSci)
- {
- mpSci = NULL;
- }
- if (NULL != mInterfaceCb)
- {
- mInterfaceCb = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool EthernetProcessor::init ( EtherCb interface_cb )
-{
- logFunction();
-
- if (NULL == interface_cb)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Callback function address is NULL", errno);
- }
- mInterfaceCb = interface_cb;
-
- return true;
-}
-
-
-EtherSciMsg * EthernetProcessor::createEther ( )
-{
- logFunction();
-
- return new EtherSciMsg(this);
-}
-
-
-bool EthernetProcessor::sendEther ( EtherSciMsg & ether_sci_msg )
-{
- logFunction();
- bool bSend = false;
-
- if ( fillEther(ether_sci_msg) && (0 != ether_sci_msg.getSciMsgStationId()) )
- {
- bSend = getSci()->sendSciMsg(ether_sci_msg);
- }
- if (!bSend)
- {
- throw Error(__PRETTY_FUNCTION__, "cannot send Ether SCI message", errno);
- }
-
- return bSend;
-}
-
-
-bool EthernetProcessor::receiveEther ( EtherSciMsg & ether_sci_msg )
-{
- logFunction();
-
- // Check Ether SCI message data length and data
- if ( (0 == ether_sci_msg.getSpecializedSciMsgDataLength())
- || (NULL == ether_sci_msg.getSpecializedSciMsgData()) )
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "received Ether SCI message is incorrect", errno);
- }
-
- // Go back up to user
- if (NULL != getInterfaceCb())
- {
- getInterfaceCb()(ether_sci_msg);
- }
-
- return true;
-}
-
-
-File_Descriptor EthernetProcessor::allocTap ( char * dev ) const
-{
- logFunction();
- int etherLogFileDescriptor = -1;
-
- if (0 > (etherLogFileDescriptor = open("/dev/net/tun", O_RDWR)))
- {
- throw Error(__PRETTY_FUNCTION__, "open /dev/net/tun failed", errno);
- }
- else
- {
- struct ifreq ifr;
- memset(&ifr, 0, sizeof(ifr));
- /* Flags:
- * IFF_TUN - TUN device (no Ethernet headers)
- * IFF_TAP - TAP device
- * IFF_NO_PI - Do not provide packet information
- */
- ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
- if (* dev)
- {
- strncpy(ifr.ifr_name, dev, IFNAMSIZ);
- }
- if (0 > ioctl(etherLogFileDescriptor, TUNSETIFF, (void *)&ifr))
- {
- close(etherLogFileDescriptor);
- etherLogFileDescriptor = -1;
- if (EPERM == errno)
- {
- throw Error(__PRETTY_FUNCTION__, "please launch the program with root rights", errno);
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "ioctl failed", errno);
- }
- }
- else
- {
- /* Set persistent status */
- if (0 > ioctl(etherLogFileDescriptor, TUNSETPERSIST, 1))
- {
- throw Error(__PRETTY_FUNCTION__, "enabling TUNSETPERSIST failed", errno);
- }
-
- /* We don't need checksums calculated for packets coming in this device */
- ioctl(etherLogFileDescriptor, TUNSETNOCSUM, 1);
-
- //system("wireshark");
- strcpy(dev, ifr.ifr_name);
- }
- }
-
- return etherLogFileDescriptor;
-}
-
-
-// private methods
-//
-
-
-void EthernetProcessor::registerEtherSciMsg ( )
-{
- logFunction();
-
- if (!getSci()->registerSpecializedSciMsg(SCI_MSG_TYPE_ETHERNET, new EtherSciMsg((IEthernet *)this)))
- {
- throw Error(__PRETTY_FUNCTION__, "cannot register Ether SCI message to SCI");
- }
-}
-
-
-bool EthernetProcessor::fillEther ( EtherSciMsg & ether_sci_msg ) const
-{
- logFunction();
- bool bFill = false;
-
- // Fill specialized SCI msg header
- //
- struct Ethernet_Header ethernetHeader;
- ethernetHeader.version = ether_sci_msg.getSpecializedSciMsgHeader().version;
- ethernetHeader.type = ether_sci_msg.getSpecializedSciMsgType();
- ethernetHeader.flags = ether_sci_msg.getFlags();
- ethernetHeader.reserved = ether_sci_msg.getSpecializedSciMsgHeader().reserved;
-
- // Set specialized SCI msg header
- //
- bFill = ether_sci_msg.setSpecializedSciMsgHeader(ethernetHeader);
-
- // Fill specialized SCI msg attributes:
- // - header size
- //
- bFill &= ether_sci_msg.setSpecializedSciMsgHeaderSize(sizeof(struct Ethernet_Header));
-
- // Fill SCI msg attributes:
- // - type
- //
- bFill &= ether_sci_msg.setSciMsgType(SCI_MSG_TYPE_ETHERNET);
- bFill &= getSci()->fillSciMsg(ether_sci_msg);
-
- return bFill;
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-ISci * EthernetProcessor::getSci ( ) const
-{
- if (NULL == mpSci)
- {
- throw Error(__PRETTY_FUNCTION__, "SCI pointer is NULL");
- }
-
- return mpSci;
-}
-
-
-EtherCb EthernetProcessor::getInterfaceCb ( ) const
-{
- return mInterfaceCb;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/ethernet/src/EthernetProcessorTest.cpp b/cesar/maximus/ethernet/src/EthernetProcessorTest.cpp
deleted file mode 100644
index 8fee360a58..0000000000
--- a/cesar/maximus/ethernet/src/EthernetProcessorTest.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-
-#include "EthernetProcessorTest.h"
-
-#include "EthernetProcessor.h"
-#include "CoreEngine.h"
-#include "ISystem.h"
-#include "EtherSciMsg.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (EthernetProcessorTest);
-
-bool bTest = false;
-
-void interfaceCbTest ( EtherSciMsg & ether )
-{
- logTest();
-
- bTest = true;
-}
-
-
-void EthernetProcessorTest::setUp (void)
-{
- logTest();
-
- mpCoreEngine = new CoreEngine();
- mpEthernetProcessor = (EthernetProcessor *)mpCoreEngine->getEthernet();
- CPPUNIT_ASSERT_MESSAGE ( "Ethernet processor pointer is NULL", NULL != mpEthernetProcessor );
-}
-
-
-void EthernetProcessorTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpEthernetProcessor)
- {
- mpEthernetProcessor = NULL;
- }
- if (NULL != mpCoreEngine)
- {
- delete (mpCoreEngine);
- mpCoreEngine = NULL;
- }
-}
-
-
-void EthernetProcessorTest::initTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE ( "init failed", mpEthernetProcessor->init(&interfaceCbTest) );
-}
-
-
-void EthernetProcessorTest::createEtherTest (void)
-{
- logTest();
-
- EtherSciMsg * pEtherSciMsg = mpEthernetProcessor->createEther();
- CPPUNIT_ASSERT_MESSAGE ( "createEther failed", NULL != pEtherSciMsg );
-
- delete (pEtherSciMsg);
- pEtherSciMsg = NULL;
-}
-
-
-void EthernetProcessorTest::sendEtherTest (void)
-{
- logTest();
-
- EtherSciMsg * pEtherSciMsg = mpEthernetProcessor->createEther();
- CPPUNIT_ASSERT_MESSAGE ( "Ether SCI message pointer is NULL", NULL != pEtherSciMsg );
-
- // create the destination station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
- mpCoreEngine->getSystem()->updateStationStatus(stationId, MAXIMUS_STATION_STATUS_IDLE);
- pEtherSciMsg->setSciMsgStationId(stationId);
-
- CPPUNIT_ASSERT_MESSAGE ( "Ether SCI message has not been sent", mpEthernetProcessor->sendEther(*pEtherSciMsg) );
-
- mpCoreEngine->getSystem()->removeStation(stationId);
-
- if (NULL != pEtherSciMsg)
- {
- delete (pEtherSciMsg);
- pEtherSciMsg = NULL;
- }
-}
-
-
-void EthernetProcessorTest::receiveEtherTest (void)
-{
- logTest();
-
- EtherSciMsg * pEtherSciMsg = mpEthernetProcessor->createEther();
-
- unsigned long length = 100;
- unsigned char payload[length];
- memset(payload, 'M', length);
- pEtherSciMsg->setSpecializedSciMsgDataLength(length);
- pEtherSciMsg->setSpecializedSciMsgData(payload);
-
- // create the destination station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveEther failed",
- mpEthernetProcessor->receiveEther(*pEtherSciMsg) );
-
- mpCoreEngine->getSystem()->removeStation(stationId);
-
- if (NULL != pEtherSciMsg)
- {
- delete (pEtherSciMsg);
- pEtherSciMsg = NULL;
- }
-}
-
-
-void EthernetProcessorTest::allocTapTest (void)
-{
- logTest();
-
- try
- {
- char dev[] = "tap0\0";
- CPPUNIT_ASSERT_MESSAGE ( "allocTap failed",
- 0 <= mpEthernetProcessor->allocTap(dev) );
- }
- catch (...)
- {
- CPPUNIT_ASSERT_MESSAGE ( "allocTap failed", (EPERM == errno) || (EACCES == errno) );
- }
-}
-
diff --git a/cesar/maximus/functioncall/Module b/cesar/maximus/functioncall/Module
deleted file mode 100644
index 061de8e25d..0000000000
--- a/cesar/maximus/functioncall/Module
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES := FunctionCallManager.cpp FunctionSciMsg.cpp FunctionCallParameter.cpp
-ifdef UNITTEST
-SOURCES += FunctionCallManagerTest.cpp FunctionSciMsgTest.cpp IFunctionCallTest.cpp FunctionCallParameterTest.cpp
-endif
-HOST_INCLUDES += maximus/functioncall/inc
diff --git a/cesar/maximus/functioncall/inc/FunctionCallManager.h b/cesar/maximus/functioncall/inc/FunctionCallManager.h
deleted file mode 100644
index b7027285b6..0000000000
--- a/cesar/maximus/functioncall/inc/FunctionCallManager.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/************************************************************************
- FunctionCallManager.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/functioncall/inc/FunctionCallManager.h
-**************************************************************************/
-
-#ifndef FUNCTIONCALLMANAGER_H
-#define FUNCTIONCALLMANAGER_H
-
-#include "IFunctionCall.h"
-
-#include "networkclock_types.h"
-
-class FunctionSciMsg;
-class ISci;
-
-
-/**
- * class FunctionCallManager
- */
-
-class FunctionCallManager : public IFunctionCall
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
- CallbacksList mListOfCallbacks;
- ISci * mpSciServer;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- FunctionCallManager ( ISci * p_sci_server );
-
- /**
- * Empty Destructor
- */
- virtual ~FunctionCallManager ( );
-
- // public methods
- //
-
- /**
- * @return FunctionSciMsg *
- */
- FunctionSciMsg * createMsg ( );
-
- /**
- * @return bool
- * @param msg_id
- * @param callback_address
- */
- bool registerCallback ( Function_Call_Msg_Id msg_id, const CallbackFunction & callback_address );
-
- /**
- * @return bool
- * @param p_function_sci_msg
- */
- bool sendMsg ( FunctionSciMsg * p_function_sci_msg_to_send );
-
- /**
- * @return bool
- * @param function_sci_msg
- */
- bool sendMsg ( FunctionSciMsg & function_sci_msg_to_send );
-
- /**
- * @return bool
- * @param function_sci_msg
- */
- bool receiveMsg ( const FunctionSciMsg & function_sci_msg );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return pointer to mListOfCallbacks
- */
- CallbacksList * getListOfCallbacks ( );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( );
-
- bool registerFunctionSciMsg ( );
-
- void displayListOfCallbacks ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // FUNCTIONCALLMANAGER_H
diff --git a/cesar/maximus/functioncall/inc/FunctionCallManagerTest.h b/cesar/maximus/functioncall/inc/FunctionCallManagerTest.h
deleted file mode 100644
index 944b32d857..0000000000
--- a/cesar/maximus/functioncall/inc/FunctionCallManagerTest.h
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#ifndef FUNCTIONCALLMANAGERTEST_H
-#define FUNCTIONCALLMANAGERTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class FunctionCallManager;
-class SciServer;
-class FunctionSciMsg;
-
-void userFunction1 ( const FunctionSciMsg & function_sci_msg );
-void userFunction2 ( const FunctionSciMsg & function_sci_msg );
-void userFunction3 ( const FunctionSciMsg & function_sci_msg );
-
-
-class FunctionCallManagerTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (FunctionCallManagerTest);
- CPPUNIT_TEST (registerCallbackTest);
- CPPUNIT_TEST (receiveMsgTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void registerCallbackTest (void);
- void receiveMsgTest (void);
-
-private:
-
- FunctionCallManager * mpFunctionCallManager;
- SciServer * mpSciServer;
-
-};
-
-
-#endif // FUNCTIONCALLMANAGERTEST_H
diff --git a/cesar/maximus/functioncall/inc/FunctionCallParameter.h b/cesar/maximus/functioncall/inc/FunctionCallParameter.h
deleted file mode 100644
index f96b5c75b0..0000000000
--- a/cesar/maximus/functioncall/inc/FunctionCallParameter.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/************************************************************************
- FunctionCallParameter.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/functioncall/inc/FunctionCallParameter.h
-**************************************************************************/
-
-#ifndef FUNCTIONCALLPARAMETER_H
-#define FUNCTIONCALLPARAMETER_H
-
-#include <string>
-
-
-/**
- * class FunctionCallParameter
- */
-
-class FunctionCallParameter
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- std::string mName;
- unsigned long mValueLength;
- unsigned char * mpValue;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- FunctionCallParameter ( );
-
- /**
- * Copy Constructor
- */
- FunctionCallParameter ( const FunctionCallParameter & parameter );
-
- /**
- * Constructor
- */
- FunctionCallParameter ( std::string name,
- unsigned long value_length,
- unsigned char * p_value );
-
- /**
- * Empty Destructor
- */
- virtual ~FunctionCallParameter ( );
-
- // public methods
- //
-
- bool operator== ( const FunctionCallParameter & parameter ) const;
-
- FunctionCallParameter & operator= ( const FunctionCallParameter & parameter );
-
- void displayParameter ( ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Get the value of mName
- * @return the value of mName
- */
- std::string getName ( ) const;
-
- /**
- * Set the value of mName
- * @return bool
- * @param name the new value of mName
- */
- bool setName ( const std::string name );
-
- /**
- * Set the value of mName
- * @return bool
- * @param name the new value of mName
- */
- bool setName ( const char * p_name );
-
- /**
- * Get the value of mValue Length
- * @return the value of mValueLength
- */
- unsigned long getValueLength ( ) const;
-
- /**
- * Set the value of mValueLength
- * @return bool
- * @param value_length the new value of mValueLength
- */
- bool setValueLength ( const unsigned long value_length );
-
- /**
- * @return mpValue
- */
- unsigned char * getValue ( ) const;
-
- /**
- * @return bool
- * @param p_value the new value of mpValue
- */
- bool setValue ( const unsigned char * p_value );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( );
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // FUNCTIONCALLPARAMETER_H
diff --git a/cesar/maximus/functioncall/inc/FunctionCallParameterTest.h b/cesar/maximus/functioncall/inc/FunctionCallParameterTest.h
deleted file mode 100644
index 147d6e8fb3..0000000000
--- a/cesar/maximus/functioncall/inc/FunctionCallParameterTest.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#ifndef FUNCTIONCALLPARAMETERTEST_H
-#define FUNCTIONCALLPARAMETERTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class FunctionCallParameter;
-
-
-class FunctionCallParameterTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (FunctionCallParameterTest);
- CPPUNIT_TEST (setNameTest);
- CPPUNIT_TEST (setValueTest);
- CPPUNIT_TEST (setValueLengthTest);
- CPPUNIT_TEST (constructorsTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void setNameTest (void);
- void setValueTest (void);
- void setValueLengthTest (void);
- void constructorsTest (void);
-
-private:
-
- FunctionCallParameter * mpFunctionCallParameter;
-
-};
-
-
-#endif // FUNCTIONCALLPARAMETERTEST_H
diff --git a/cesar/maximus/functioncall/inc/FunctionSciMsg.h b/cesar/maximus/functioncall/inc/FunctionSciMsg.h
deleted file mode 100644
index 85c900945b..0000000000
--- a/cesar/maximus/functioncall/inc/FunctionSciMsg.h
+++ /dev/null
@@ -1,332 +0,0 @@
-/************************************************************************
- FunctionSciMsg.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/functioncall/inc/FunctionSciMsg.h
-**************************************************************************/
-
-#ifndef FUNCTIONSCIMSG_H
-#define FUNCTIONSCIMSG_H
-
-#include "SciMsg.h"
-
-#include "functioncall_types.h"
-#include "sci_types.h"
-
-#include <vector>
-#include <string>
-#include <ostream>
-
-class IFunctionCall;
-class FunctionCallParameter;
-
-typedef std::vector<FunctionCallParameter> ParametersList;
-
-
-/**
- * class FunctionSciMsg
- */
-
-class FunctionSciMsg : public SciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- // Get from specialized SCI message header
- //
- Function_Call_Type mSpecializedSciMsgType;
- static Function_Call_Msg_Id mSpecializedSciMsgId; // to send to station
- Function_Call_Parameters_Number mSpecializedSciMsgParametersNumber;
- Function_Call_Flags mSpecializedSciMsgFlags;
-
- // Specialized SCI msg header
- //
- Function_Call_Header mSpecializedSciMsgHeader;
-
- // Unique string identifier for function call
- //
- std::string mFunctionName;
-
- // Function parameters
- //
- ParametersList mListOfParameters;
-
- IFunctionCall * mpFunctionCallManager;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- FunctionSciMsg ( IFunctionCall * p_function_call_manager );
-
- /**
- * Copy Constructors
- */
- FunctionSciMsg ( const FunctionSciMsg & function_sci_msg );
-
- /**
- * Empty Destructor
- */
- virtual ~FunctionSciMsg ( );
-
- // public methods
- //
-
- /**
- * @return SciMsg *
- */
- SciMsg * create ( ) const;
-
- /**
- * return bool
- */
- bool dispatchMsg ( );
-
- /**
- * @return bool
- */
- bool identifySpecializedSciMsgHeader ( );
-
- /**
- * @return bool
- */
- bool checkCompatibility ( ) const;
-
- /**
- * @return bool
- * @param function_argument_to_add
- */
- bool addParameter ( const FunctionCallParameter & function_argument_to_add );
-
- /**
- * @return bool
- * @param name
- * Remove the parameter named name from the function SCI message.
- */
- bool removeParameter ( const std::string & name );
-
- /**
- * @return bool
- * @param name_of_parameter_to_get
- * @param p_data
- */
- bool bindParameter ( const std::string name_of_parameter_to_get, unsigned long & data_length, unsigned char * p_data ) const;
-
- /**
- * @return bool
- */
- bool identifyFunctionName ( );
-
- /**
- * @return bool
- */
- bool identifyParameters ( );
-
- /**
- * @return bool
- */
- bool fillSpecializedSciMsgToSend ( );
-
- void displaySpecializedSciMsgHeader ( ) const;
-
- /**
- * Display the specialized SCI message type.
- */
- void displaySpecializedSciMsgType ( int log_level ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Get the value of mSpecializedSciMsgType
- * @return the value of mSpecializedSciMsgType
- */
- Function_Call_Type getSpecializedSciMsgType ( ) const;
-
- /**
- * Set the value of mSpecializedSciMsgType
- * @return bool
- * @param type the new value of mSpecializedSciMsgType
- */
- bool setSpecializedSciMsgType ( const Function_Call_Type type );
-
- /**
- * Get the value of mSpecializedSciMsgHeader.msg_id
- * @return the value of mSpecializedSciMsgHeader.msg_id
- */
- Function_Call_Msg_Id getMsgId ( ) const;
-
- /**
- * Set the value of mSpecializedSciMsgHeader.msg_id
- * @return bool
- */
- bool setMsgId ( const Function_Call_Msg_Id msg_id );
-
- /**
- * Get the value of mSpecializedSciMsgId
- * @return the value of mSpecializedSciMsgId
- */
- Function_Call_Msg_Id getSpecializedSciMsgId ( ) const;
-
- /**
- * Increment the value of mSpecializedSciMsgId
- * @return bool
- */
- bool incrementSpecializedSciMsgId ( );
-
- /**
- * Get the value of mSpecializedSciMsgParametersNumber
- * @return the value of mSpecializedSciMsgParametersNumber
- */
- Function_Call_Parameters_Number getSpecializedSciMsgParametersNumber ( ) const;
-
- /**
- * Set the value of mSpecializedSciMsgParametersNumber
- * @return bool
- * @param number_of_parameters the new value of mSpecializedSciMsgParametersNumber
- */
- bool setSpecializedSciMsgParametersNumber ( const Function_Call_Parameters_Number number_of_parameters );
-
- /**
- * Get the value of mSpecializedSciMsgFlags
- * @return the value of mSpecializedSciMsgFlags
- */
- Function_Call_Flags getSpecializedSciMsgFlags ( ) const;
-
- /**
- * Set the value of mSpecializedSciMsgFlags
- * @return bool
- * @param flags the new value of mSpecializedSciMsgFlags
- */
- bool setSpecializedSciMsgFlags ( const Function_Call_Flags flags );
-
- /**
- * Set the value of mSpecializedSciMsgHeader.reserved
- * @return bool
- */
- bool setReserved ( const uint16_t reserved );
-
- /**
- * Get the value of mSpecializedSciMsgHeader
- * @return the value of mSpecializedSciMsgHeader into a void pointer
- */
- void * returnSpecializedSciMsgHeader ( ) const;
-
- /**
- * @return mSpecializedSciMsgHeader
- */
- const Function_Call_Header & getSpecializedSciMsgHeader ( ) const;
-
- /**
- * @return bool
- * @param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader
- */
- bool setSpecializedSciMsgHeader ( const Function_Call_Header & specialized_sci_msg_header );
-
- /**
- * Get the value of mFunctionName
- * @return the value of mFunctionName
- */
- std::string getFunctionName ( ) const;
-
- /**
- * Set the value of mFunctionName
- * @return bool
- * @param name the new value of mFunctionName
- */
- bool setFunctionName ( const std::string name );
-
- /**
- * Get the value of mListOfParameters
- * @return the value of mListOfParameters
- */
- const ParametersList & getListOfParameters ( ) const;
-
- /**
- * Set the value of mListOfParameters
- * @return bool
- * @param list_of_parameters the new value of mListOfParameters
- */
- bool setListOfParameters ( const ParametersList & list_of_parameters );
-
- /**
- * Get the value of mpFunctionCallManager
- * @return mpFunctionCallManager
- */
- IFunctionCall * getFunctionCallManager () const;
-
- /**
- * Set the value of mpFunctionCallManager
- * @return bool
- * @param p_function_call_manager the new value of mpFunctionCallManager
- */
- bool setFunctionCallManager ( IFunctionCall * p_function_call_manager );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( );
-
- void displayFunctionName ( ) const;
-
- void displayParameter ( unsigned int parameter_iterator ) const;
-
- void displayListOfParameters ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // FUNCTIONSCIMSG_H
diff --git a/cesar/maximus/functioncall/inc/FunctionSciMsgTest.h b/cesar/maximus/functioncall/inc/FunctionSciMsgTest.h
deleted file mode 100644
index 98fb97e785..0000000000
--- a/cesar/maximus/functioncall/inc/FunctionSciMsgTest.h
+++ /dev/null
@@ -1,44 +0,0 @@
-
-#ifndef FUNCTIONSCIMSGTEST_H
-#define FUNCTIONSCIMSGTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class FunctionSciMsg;
-class FunctionCallManager;
-class SciServer;
-
-
-class FunctionSciMsgTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (FunctionSciMsgTest);
- CPPUNIT_TEST (addParameterTest);
- CPPUNIT_TEST (bindParameterTest);
- CPPUNIT_TEST (fillSpecializedSciMsgToSendTest);
- CPPUNIT_TEST (setSpecializedSciMsgFlagsTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void addParameterTest (void);
- void bindParameterTest (void);
- void fillSpecializedSciMsgToSendTest (void);
- void setSpecializedSciMsgFlagsTest (void);
-
-private:
-
- FunctionSciMsg * mpFunctionSciMsg;
- FunctionCallManager * mpFunctionCallManager;
- SciServer * mpSciServer;
-
-};
-
-
-#endif // FUNCTIONSCIMSGTEST_H
diff --git a/cesar/maximus/functioncall/inc/IFunctionCall.h b/cesar/maximus/functioncall/inc/IFunctionCall.h
deleted file mode 100644
index 091c8391a1..0000000000
--- a/cesar/maximus/functioncall/inc/IFunctionCall.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/************************************************************************
- IFunctionCall.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/IFunctionCall.h
-**************************************************************************/
-
-#ifndef IFUNCTIONCALL_H
-#define IFUNCTIONCALL_H
-
-#include "functioncall_types.h"
-
-#include <boost/function.hpp> // for 'CallbackFunction'
-#include <map>
-
-class FunctionSciMsg;
-
-typedef boost::function <void (const FunctionSciMsg &)> CallbackFunction;
-
-struct compareMsgId
-{
- bool operator( ) ( Function_Call_Msg_Id msg_id1, Function_Call_Msg_Id msg_id2 ) const
- {
- return msg_id1 < msg_id2;
- }
-};
-typedef std::multimap<Function_Call_Msg_Id, CallbackFunction, compareMsgId> CallbacksList;
-
-
-/**
- * class IFunctionCall
- */
-
-class IFunctionCall
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- IFunctionCall ( ) { }
-
- /**
- * Empty Destructor
- */
- virtual ~IFunctionCall ( ) { }
-
- // public methods
- //
-
- /**
- * @return FunctionSciMsg *
- */
- virtual FunctionSciMsg * createMsg ( ) = 0;
-
- /**
- * @return bool
- * @param function_sci_msg
- * @param callback_address
- */
- virtual bool registerCallback ( Function_Call_Msg_Id msg_id, const CallbackFunction & callback_address ) = 0;
-
- /**
- * @return bool
- * @param function_sci_msg
- */
- virtual bool sendMsg ( FunctionSciMsg * p_function_sci_msg_to_send ) = 0;
-
- /**
- * @return bool
- * @param function_sci_msg
- */
- virtual bool sendMsg ( FunctionSciMsg & function_sci_msg_to_send ) = 0;
-
- /**
- * @return bool
- * @param function_sci_msg
- */
- virtual bool receiveMsg ( const FunctionSciMsg & function_sci_msg ) = 0;
-
- /**
- * @return pointer to mListOfCallbacks
- */
- virtual CallbacksList * getListOfCallbacks ( ) = 0;
-
-};
-
-
-#endif // IFUNCTIONCALL_H
diff --git a/cesar/maximus/functioncall/inc/IFunctionCallTest.h b/cesar/maximus/functioncall/inc/IFunctionCallTest.h
deleted file mode 100644
index 68fd2edca9..0000000000
--- a/cesar/maximus/functioncall/inc/IFunctionCallTest.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef IFUNCTIONCALLTEST_H
-#define IFUNCTIONCALLTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class FunctionSciMsg;
-
-void userFunction ( const FunctionSciMsg & function_sci_msg );
-
-
-class IFunctionCallTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (IFunctionCallTest);
- CPPUNIT_TEST (userTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void userTest (void);
-
-private:
-
-};
-
-
-#endif // IFUNCTIONCALLTEST_H
diff --git a/cesar/maximus/functioncall/src/FunctionCallManager.cpp b/cesar/maximus/functioncall/src/FunctionCallManager.cpp
deleted file mode 100644
index ef71c25752..0000000000
--- a/cesar/maximus/functioncall/src/FunctionCallManager.cpp
+++ /dev/null
@@ -1,329 +0,0 @@
-/************************************************************************
- FunctionCallManager.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/functioncall/src/FunctionCallManager.cpp
-**************************************************************************/
-
-#include "FunctionCallManager.h"
-
-#include "FunctionSciMsg.h"
-#include "ISci.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <netinet/in.h> // for 'htonl()' and 'htons()'
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-FunctionCallManager::FunctionCallManager ( ISci * p_sci_server ):
-mpSciServer(NULL)
-{
- logFunction();
-
- initAttributes();
- if (NULL != p_sci_server)
- {
- mpSciServer = p_sci_server;
- registerFunctionSciMsg();
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL", errno);
- }
-}
-
-
-void FunctionCallManager::initAttributes ( )
-{
- logFunction();
-}
-
-
-FunctionCallManager::~FunctionCallManager ( )
-{
- logFunction();
-
- if (!mListOfCallbacks.empty())
- {
- mListOfCallbacks.clear();
- }
- if (NULL != mpSciServer)
- {
- mpSciServer = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-// Called by user to create a message to send
-//
-FunctionSciMsg * FunctionCallManager::createMsg ( )
-{
- logFunction();
-
- return new FunctionSciMsg(this);
-}
-
-
-// Called by user before a message is sent
-//
-bool FunctionCallManager::registerCallback ( Function_Call_Msg_Id msg_id, const CallbackFunction & callback_address )
-{
- logFunction();
- bool bRegister = false;
-
- if (NULL != callback_address)
- {
- mListOfCallbacks.insert(CallbacksList::value_type(msg_id, callback_address));
- bRegister = true;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "callback address is NULL!" << endl;
-#endif /* CONFIG_LOG */
- }
-
- return bRegister;
-}
-
-
-// Called by user to send a configured message
-//
-bool FunctionCallManager::sendMsg ( FunctionSciMsg * p_function_sci_msg_to_send )
-{
- logFunction();
- bool bSend = false;
-
- if (NULL != p_function_sci_msg_to_send)
- {
- bSend = sendMsg(*p_function_sci_msg_to_send);
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Function SCI message pointer is NULL", errno);
- }
-
- return bSend;
-}
-
-
-// Called by user to send a configured message
-//
-bool FunctionCallManager::sendMsg ( FunctionSciMsg & function_sci_msg_to_send )
-{
- logFunction();
- bool bSend = false;
-
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "sending function call SCI message..." << endl;
-#endif /* CONFIG_LOG */
- displayListOfCallbacks();
-
- // Fill specialized SCI msg attributes
- // Fill specialized SCI msg data length and specialized SCI msg data
- //
- bSend = function_sci_msg_to_send.fillSpecializedSciMsgToSend();
-
- // Fill specialized SCI msg header
- //
- struct Function_Call_Header functionSciMsgHeader = { FUNCTION_CALL_VERSION,
- static_cast<uint8_t>(function_sci_msg_to_send.getSpecializedSciMsgType()),
- function_sci_msg_to_send.getSpecializedSciMsgId(),
- static_cast<uint8_t>(function_sci_msg_to_send.getSpecializedSciMsgParametersNumber()),
- 0x00, // flags
- 0x0000 }; // reserved
-
- // Set specialized SCI msg header
- //
- bSend &= function_sci_msg_to_send.setSpecializedSciMsgHeader(functionSciMsgHeader);
-
- // As specialized SCI msg header will be sent on an output pipe, 'hton' functions have to be called
- //
- function_sci_msg_to_send.setMsgId(htons(function_sci_msg_to_send.getSpecializedSciMsgHeader().msg_id));
- function_sci_msg_to_send.setReserved(htons(function_sci_msg_to_send.getSpecializedSciMsgHeader().reserved));
-
- // Fill specialized SCI msg attributes:
- // - header size
- //
- bSend &= function_sci_msg_to_send.setSpecializedSciMsgHeaderSize(sizeof(struct Function_Call_Header));
-
- // Fill SCI msg attributes:
- // - type
- //
- bSend &= function_sci_msg_to_send.setSciMsgType(SCI_MSG_TYPE_FUNCTION_CALL);
-
- if (bSend)
- {
- if (NULL != mpSciServer)
- {
- bSend = mpSciServer->fillSciMsg(function_sci_msg_to_send);
- bSend &= mpSciServer->sendSciMsg(function_sci_msg_to_send);
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "function SCI message cannot be sent because it is not correctly filled in!" << endl;
-#endif
- }
-
- return bSend;
-}
-
-
-// Called by FunctionSciMsg when receiving a message
-//
-bool FunctionCallManager::receiveMsg ( const FunctionSciMsg & function_sci_msg )
-{
- logFunction();
- bool bReceive = false;
-
- displayListOfCallbacks();
- if (!mListOfCallbacks.empty())
- {
- for (CallbacksList::const_iterator it = mListOfCallbacks.begin(); it != mListOfCallbacks.end(); ++it)
- {
- if (function_sci_msg.getSpecializedSciMsgHeader().msg_id == it->first)
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "=> callback" << endl;
-#endif
- (it->second) (function_sci_msg);
- bReceive = true;
- }
- }
- }
- if (bReceive)
- {
- mListOfCallbacks.erase(function_sci_msg.getSpecializedSciMsgHeader().msg_id);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "=> no callback!" << endl;
-#endif
- }
-
- return bReceive;
-}
-
-
-CallbacksList * FunctionCallManager::getListOfCallbacks ( )
-{
- return &mListOfCallbacks;
-}
-
-
-// private methods
-//
-
-
-bool FunctionCallManager::registerFunctionSciMsg ( )
-{
- logFunction();
- bool bRegister = false;
-
- if (NULL != mpSciServer)
- {
- bRegister = mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_FUNCTION_CALL, new FunctionSciMsg(this));
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
-
- return bRegister;
-}
-
-
-void FunctionCallManager::displayListOfCallbacks ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "list of callbacks = " << endl;
-
- if (!mListOfCallbacks.empty())
- {
- for (CallbacksList::const_iterator it = mListOfCallbacks.begin(); it != mListOfCallbacks.end(); ++it)
- {
- clog << logger(LOG_INFO) << "\t[msg id = 0x" << setfill('0') << setw(4) << uppercase << hex << it->first << ", callback address = " << &(it->second) << "]" << dec << endl;
- }
- }
- else
- {
- clog << logger(LOG_INFO) << "\tempty!" << endl;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp b/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
deleted file mode 100644
index e37d0f209d..0000000000
--- a/cesar/maximus/functioncall/src/FunctionCallManagerTest.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-
-#include "FunctionCallManagerTest.h"
-
-#include "FunctionCallManager.h"
-#include "SciServer.h"
-#include "FunctionSciMsg.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (FunctionCallManagerTest);
-
-
-void FunctionCallManagerTest::setUp (void)
-{
- logTest();
-
- try
- {
- mpSciServer = new SciServer();
- mpFunctionCallManager = new FunctionCallManager(mpSciServer);
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::tearDown (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- delete (mpFunctionCallManager);
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete (mpSciServer);
- mpSciServer = NULL;
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::registerCallbackTest (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(1, &userFunction1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(2, &userFunction2) );
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void FunctionCallManagerTest::receiveMsgTest (void)
-{
- logTest();
-
- try
- {
- if (NULL != mpFunctionCallManager)
- {
- FunctionSciMsg functionSciMsg(mpFunctionCallManager);
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(functionSciMsg.getSpecializedSciMsgHeader().msg_id, &userFunction1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(2, &userFunction2) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback(3, &userFunction3) );
-
- CPPUNIT_ASSERT_MESSAGE ( "setFunctionName failed",
- functionSciMsg.setFunctionName ("userFunction1") );
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg failed",
- mpFunctionCallManager->receiveMsg (functionSciMsg) );
- }
- }
- catch (Error &e)
- {
- e.display();
- }
-}
-
-
-void userFunction1 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
-
-void userFunction2 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
-
-void userFunction3 ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
diff --git a/cesar/maximus/functioncall/src/FunctionCallParameter.cpp b/cesar/maximus/functioncall/src/FunctionCallParameter.cpp
deleted file mode 100644
index dca3ebbf7f..0000000000
--- a/cesar/maximus/functioncall/src/FunctionCallParameter.cpp
+++ /dev/null
@@ -1,280 +0,0 @@
-/************************************************************************
- FunctionCallParameter.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/functioncall/src/FunctionCallParameter.cpp
-**************************************************************************/
-
-#include "FunctionCallParameter.h"
-
-#include "Logger.h"
-
-#include <sstream> // for 'ostringstream'
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-#include <cstring> // memcmp, memcpy
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-FunctionCallParameter::FunctionCallParameter ( ):
-mName("none"),
-mValueLength(0),
-mpValue(NULL)
-{
- logFunction();
-
- initAttributes ();
-}
-
-
-FunctionCallParameter::FunctionCallParameter ( const FunctionCallParameter & parameter ):
-mName("none"),
-mValueLength(0),
-mpValue(NULL)
-{
- logFunction();
-
- setName (parameter.getName());
- setValueLength (parameter.getValueLength());
- setValue (parameter.getValue());
-
- initAttributes ();
-}
-
-
-FunctionCallParameter::FunctionCallParameter ( string name,
- unsigned long value_length,
- unsigned char * p_value ):
-mName("none"),
-mValueLength(0),
-mpValue(NULL)
-{
- logFunction();
-
- setName (name);
- setValueLength (value_length);
- setValue (p_value);
-
- initAttributes ();
-}
-
-
-void FunctionCallParameter::initAttributes ( )
-{
- logFunction();
-}
-
-FunctionCallParameter::~FunctionCallParameter ( )
-{
- logFunction();
-
- mName.clear();
- if (NULL != mpValue)
- {
- delete [] mpValue;
- mpValue = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool FunctionCallParameter::operator== ( const FunctionCallParameter & parameter ) const
-{
- logFunction();
- bool bOperator = false;
-
- if ( (0 == getName().compare(parameter.getName()))
- && (getValueLength() == parameter.getValueLength())
- && (0 == memcmp(getValue(), parameter.getValue(), parameter.getValueLength())) )
- {
- bOperator = true;
- }
-
- return bOperator;
-}
-
-
-FunctionCallParameter & FunctionCallParameter::operator= ( const FunctionCallParameter & parameter )
-{
- logFunction();
-
- setName (parameter.getName());
- setValueLength (parameter.getValueLength());
- setValue (parameter.getValue());
-
- return *this;
-}
-
-
-void FunctionCallParameter::displayParameter ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- ostringstream oss;
- oss << "\t[name = " << getName() << ", value length = " << dec << getValueLength() << ", value = ";
- if (NULL != getValue())
- {
- oss << "0x";
- for (unsigned int i=0; i<static_cast<unsigned int>(getValueLength()); i++)
- {
- if ('\0' != *(getValue()+i))
- {
- oss << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(*(getValue()+i));
- }
- else
- {
- oss << "00";
- }
- }
- }
- else
- {
- oss << "NULL!";
- }
- oss << "]" << dec << endl;
- oss.flush();
- clog << logger(LOG_COM) << oss.str();
-#endif /* CONFIG_LOG */
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-string FunctionCallParameter::getName ( ) const
-{
- return mName;
-}
-
-
-bool FunctionCallParameter::setName ( const string name )
-{
- logFunction();
-
- mName.clear();
- mName.assign(name);
-
- return true;
-}
-
-
-bool FunctionCallParameter::setName ( const char * p_name )
-{
- logFunction();
-
- if (NULL != p_name)
- {
- mName.clear();
- mName.assign(p_name);
- }
-
- return true;
-}
-
-
-unsigned long FunctionCallParameter::getValueLength ( ) const
-{
- return mValueLength;
-}
-
-
-bool FunctionCallParameter::setValueLength ( const unsigned long value_length )
-{
- mValueLength = value_length;
-
- return true;
-}
-
-
-unsigned char * FunctionCallParameter::getValue ( ) const
-{
- return mpValue;
-}
-
-
-bool FunctionCallParameter::setValue ( const unsigned char * p_value )
-{
- logFunction();
- bool bSetValue = false;
-
- // Free memory
- //
- if (NULL != mpValue)
- {
- delete [] mpValue;
- mpValue = NULL;
- }
-
- if (NULL != p_value)
- {
- // Allocate memory
- //
- mpValue = new unsigned char [getValueLength()];
-
- // Copy value
- //
- memcpy(mpValue, p_value, getValueLength());
-
- bSetValue = true;
- }
-
- return bSetValue;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/functioncall/src/FunctionCallParameterTest.cpp b/cesar/maximus/functioncall/src/FunctionCallParameterTest.cpp
deleted file mode 100644
index cd8c02cea3..0000000000
--- a/cesar/maximus/functioncall/src/FunctionCallParameterTest.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-
-#include "FunctionCallParameterTest.h"
-
-#include "FunctionCallParameter.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-#include <cstring>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (FunctionCallParameterTest);
-
-
-void FunctionCallParameterTest::setUp (void)
-{
- logTest();
-
- mpFunctionCallParameter = new FunctionCallParameter();
-}
-
-
-void FunctionCallParameterTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpFunctionCallParameter)
- {
- delete (mpFunctionCallParameter);
- mpFunctionCallParameter = NULL;
- }
-}
-
-
-void FunctionCallParameterTest::setNameTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionCallParameter)
- {
- try
- {
- string name1("name1");
- mpFunctionCallParameter->setName(name1);
-
- mpFunctionCallParameter->displayParameter();
- CPPUNIT_ASSERT_MESSAGE ( "setName failed",
- 0 == name1.compare(mpFunctionCallParameter->getName()) );
-
- char name2 [] = "name2";
- mpFunctionCallParameter->setName(name2);
-
- mpFunctionCallParameter->displayParameter();
- CPPUNIT_ASSERT_MESSAGE ( "setName failed",
- (mpFunctionCallParameter->getName().length() == strlen(name2))
- && (0 == memcmp(name2, mpFunctionCallParameter->getName().c_str(), strlen(name2)+1)) );
- }
- catch (Error &e)
- {
- e.display();
- CPPUNIT_FAIL ( "Catch exception" );
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Function call parameter pointer is NULL" );
- }
-}
-
-
-void FunctionCallParameterTest::setValueTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionCallParameter)
- {
- try
- {
- const unsigned long length = 10;
- unsigned char value [length+1] = "1234567890";
- mpFunctionCallParameter->setValueLength(length);
- mpFunctionCallParameter->setValue(value);
-
- mpFunctionCallParameter->displayParameter();
- CPPUNIT_ASSERT_MESSAGE ( "setValue failed",
- 0 == memcmp(value, mpFunctionCallParameter->getValue(), length) );
- }
- catch (Error &e)
- {
- e.display();
- CPPUNIT_FAIL ( "Catch exception" );
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Function call parameter pointer is NULL" );
- }
-}
-
-
-void FunctionCallParameterTest::setValueLengthTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionCallParameter)
- {
- try
- {
- const unsigned long length = 10;
- mpFunctionCallParameter->setValueLength(length);
-
- mpFunctionCallParameter->displayParameter();
- CPPUNIT_ASSERT_MESSAGE ( "setValueLength failed",
- length == mpFunctionCallParameter->getValueLength() );
- }
- catch (Error &e)
- {
- e.display();
- CPPUNIT_FAIL ( "Catch exception" );
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Function call parameter pointer is NULL" );
- }
-}
-
-
-void FunctionCallParameterTest::constructorsTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionCallParameter)
- {
- try
- {
- FunctionCallParameter parameter1 ("parameter1", 3, (unsigned char *)"abc");
- FunctionCallParameter parameter2(parameter1);
- FunctionCallParameter parameter3 = parameter2;
-
- parameter1.displayParameter();
- parameter2.displayParameter();
- parameter3.displayParameter();
- CPPUNIT_ASSERT_MESSAGE ( "constructors failed",
- (0 == parameter1.getName().compare("parameter1"))
- && (3 == parameter1.getValueLength())
- && (0 == memcmp(parameter1.getValue(), "abc", 3))
- && (parameter1 == parameter2)
- && (parameter2 == parameter3) );
- }
- catch (Error &e)
- {
- e.display();
- CPPUNIT_FAIL ( "Catch exception" );
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Function call parameter pointer is NULL" );
- }
-}
-
diff --git a/cesar/maximus/functioncall/src/FunctionSciMsg.cpp b/cesar/maximus/functioncall/src/FunctionSciMsg.cpp
deleted file mode 100644
index 5d70eb9742..0000000000
--- a/cesar/maximus/functioncall/src/FunctionSciMsg.cpp
+++ /dev/null
@@ -1,904 +0,0 @@
-/************************************************************************
- FunctionSciMsg.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/functioncall/src/FunctionSciMsg.cpp
-**************************************************************************/
-
-#include "FunctionSciMsg.h"
-
-#include "IFunctionCall.h"
-#include "FunctionCallParameter.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <netinet/in.h> // for 'htonl()' and 'htons()'
-#include <cstring> // for 'strcpy()' and 'strcmp()'
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-Function_Call_Msg_Id FunctionSciMsg::mSpecializedSciMsgId = 0;
-
-
-FunctionSciMsg::FunctionSciMsg ( IFunctionCall * p_function_call_manager ):
-mSpecializedSciMsgType(FUNCTION_CALL_TYPE_NONE),
-mSpecializedSciMsgParametersNumber(0),
-mSpecializedSciMsgFlags(FUNCTION_CALL_FLAG_NONE),
-mpFunctionCallManager(NULL)
-{
- logFunction();
-
- if (NULL != p_function_call_manager)
- {
- mpFunctionCallManager = p_function_call_manager;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Function call manager pointer is NULL", errno);
- }
-
- initAttributes ();
-}
-
-
-void FunctionSciMsg::initAttributes ( )
-{
- logFunction();
-
- mSpecializedSciMsgHeader.version = 0x00;
- mSpecializedSciMsgHeader.type = 0x00;
- mSpecializedSciMsgHeader.msg_id = 0x0000;
- mSpecializedSciMsgHeader.param_nb = 0x00;
- mSpecializedSciMsgHeader.flags = 0x00;
- mSpecializedSciMsgHeader.reserved = 0x0000;
-}
-
-
-FunctionSciMsg::FunctionSciMsg ( const FunctionSciMsg & function_sci_msg ) : SciMsg ( )
-{
- logFunction();
-
- setSpecializedSciMsgType (function_sci_msg.getSpecializedSciMsgType());
- setSpecializedSciMsgParametersNumber (function_sci_msg.getSpecializedSciMsgParametersNumber());
- setSpecializedSciMsgHeader (function_sci_msg.getSpecializedSciMsgHeader());
- setFunctionName (function_sci_msg.getFunctionName());
- setListOfParameters (function_sci_msg.getListOfParameters());
- setFunctionCallManager (function_sci_msg.getFunctionCallManager());
-}
-
-
-FunctionSciMsg::~FunctionSciMsg ( )
-{
- logFunction();
-
- if (!mListOfParameters.empty())
- {
- mListOfParameters.clear();
- }
- if (NULL != mpFunctionCallManager)
- {
- mpFunctionCallManager = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-SciMsg * FunctionSciMsg::create ( ) const
-{
- logFunction();
-
- return new FunctionSciMsg(getFunctionCallManager());
-}
-
-
-bool FunctionSciMsg::dispatchMsg ( )
-{
- logFunction();
- bool bDispatch = false;
-
- if (NULL != getFunctionCallManager())
- {
- bDispatch = identifyFunctionName();
- bDispatch &= identifyParameters();
-
- if ( FUNCTION_CALL_TYPE_RSP == getSpecializedSciMsgType() )
- {
- bDispatch &= getFunctionCallManager()->receiveMsg(*this);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Function call manager pointer is NULL");
- }
-
- return bDispatch;
-}
-
-
-// When receiving a SCI msg, specialized SCI msg header has to be extracted from received SCI msg data
-//
-bool FunctionSciMsg::identifySpecializedSciMsgHeader ( )
-{
- logFunction();
- bool bIdentifyHeader = false;
-
- if (NULL != SciMsg::getSciMsgData())
- {
- // Set specialized SCI msg header size
- //
- SciMsg::setSpecializedSciMsgHeaderSize((unsigned long)sizeof(struct Function_Call_Header));
-
- // Get specialized SCI message header contents
- //
- if (SciMsg::getSciMsgDataLength() >= SciMsg::getSpecializedSciMsgHeaderSize()) // check that there are enough data to get the specialized SCI message header
- {
- mSpecializedSciMsgHeader = *((Function_Call_Header*)SciMsg::getSciMsgData());
- mSpecializedSciMsgHeader.msg_id = ntohs(getSpecializedSciMsgHeader().msg_id);
- mSpecializedSciMsgHeader.reserved = ntohs(getSpecializedSciMsgHeader().reserved);
-
- // Set specialized SCI msg attributes from specialized SCI msg header
- //
- setSpecializedSciMsgType (static_cast<Function_Call_Type>(getSpecializedSciMsgHeader().type));
- setSpecializedSciMsgParametersNumber (static_cast<Function_Call_Parameters_Number>(getSpecializedSciMsgHeader().param_nb));
- setSpecializedSciMsgFlags (static_cast<Function_Call_Flags>(getSpecializedSciMsgHeader().flags));
- displaySpecializedSciMsgHeader();
- bIdentifyHeader = true;
- }
- else
- {
- errno = ENODATA;
- throw Error(__PRETTY_FUNCTION__, "Not enough data to get the specialized SCI message header", errno);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI message data pointer is NULL");
- }
-
- return bIdentifyHeader;
-}
-
-
-// Check specialized SCI msg compatibility (check specialized SCI msg version)
-//
-bool FunctionSciMsg::checkCompatibility ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- if (FUNCTION_CALL_VERSION == getSpecializedSciMsgHeader().version)
- {
- bCheck = SciMsg::checkCompatibility();
- }
-
- return bCheck;
-}
-
-
-// Called by user to configure a message to send
-//
-bool FunctionSciMsg::addParameter ( const FunctionCallParameter & function_argument_to_add )
-{
- logFunction();
- bool bAddParameter = false;
-
- if ( FUNCTION_CALL_PARAM_MAX_SIZE >= function_argument_to_add.getValueLength())
- {
- mListOfParameters.push_back(function_argument_to_add);
- bAddParameter = true;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "add_param: length of parameter value exceeds max size!" << endl;
-#endif
- errno = EMSGSIZE;
- throw Error(__PRETTY_FUNCTION__, "Length of parameter value exceeds max size", errno);
- }
-
- return bAddParameter;
-}
-
-
-// Called by user to configure a message to send
-//
-bool FunctionSciMsg::removeParameter ( const std::string & name )
-{
- logFunction();
- bool bRemoveParameter = false;
-
- for (ParametersList::iterator it = mListOfParameters.begin(); it < mListOfParameters.end(); ++it)
- {
- if ( !it->getName().compare(name) )
- {
- mListOfParameters.erase(it);
- bRemoveParameter = true;
- break;
- }
- }
-
- return bRemoveParameter;
-}
-
-
-// Called by user when a message is received to retrieve function parameters
-//
-bool FunctionSciMsg::bindParameter ( const string name_of_parameter_to_get, unsigned long & data_length, unsigned char * p_data ) const
-{
- logFunction();
- bool bBindParameter = false;
-
- FunctionCallParameter tempParameter;
- for (unsigned int i=0; i<mListOfParameters.size(); ++i)
- {
- tempParameter = mListOfParameters[i];
- if ( !tempParameter.getName().compare(name_of_parameter_to_get) )
- {
- bBindParameter = true;
- if (data_length < tempParameter.getValueLength())
- {
-#if CONFIG_LOG
- clog << logger(LOG_WARNING) << "bind_param: parameter value length too small to get the parameter value" << endl;
- clog << logger(LOG_WARNING) << "\t(given data length = " << data_length << " and needed data length = " << tempParameter.getValueLength() << ")" << endl;
- clog << logger(LOG_WARNING) << "\t=> parameter value will be cut" << endl;
-#endif /* CONFIG_LOG */
- }
- else if (data_length > tempParameter.getValueLength())
- {
-#if CONFIG_LOG
- clog << logger(LOG_WARNING) << "bind_param: parameter value length too large to get the parameter value" << endl;
- clog << logger(LOG_WARNING) << "\t=> update length from " << data_length << " to " << tempParameter.getValueLength() << endl;
-#endif /* CONFIG_LOG */
- data_length = tempParameter.getValueLength();
- }
- if ( (NULL != tempParameter.getValue()) && (NULL != p_data) )
- {
- memcpy(p_data, tempParameter.getValue(), data_length);
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "bind parameter = " << endl;
-#endif /* CONFIG_LOG */
- tempParameter.displayParameter();
- i = mListOfParameters.size()-1;
- }
- }
- }
-
- return bBindParameter;
-}
-
-
-// Called when a function SCI msg is received
-//
-bool FunctionSciMsg::identifyFunctionName ( )
-{
- logFunction();
- bool bName = false;
-
- if (NULL != getSpecializedSciMsgData())
- {
- // Find function name length
- //
- unsigned long functionNameLength = 0;
- while ( (getSpecializedSciMsgDataLength() >= functionNameLength)
- && ('\0' != *(getSpecializedSciMsgData()+functionNameLength)) )
- {
- if (FUNCTION_CALL_ID_MAX_SIZE > functionNameLength) /* max length of a function id */
- {
- functionNameLength++;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "length of function call name exceeds max size!" << endl;
-#endif /* CONFIG_LOG */
- }
- }
-
- // Copy function name from specialized SCI msg data to function name attribute
- //
- mFunctionName.assign((char*)getSpecializedSciMsgData(), functionNameLength);
-
- // Remove function name from specialized SCI msg data
- //
- unsigned long tempDataLength = getSpecializedSciMsgDataLength();
- unsigned char * pTempData = new unsigned char [tempDataLength];
- memcpy(pTempData, getSpecializedSciMsgData(), tempDataLength);
- bName = SciMsg::removeData (functionNameLength+1, tempDataLength, &pTempData);
- if (0 != bName)
- {
- bName &= setSpecializedSciMsgDataLength(tempDataLength);
- bName &= setSpecializedSciMsgData(pTempData);
- }
-
- // Free pointer
- //
- if (NULL != pTempData)
- {
- delete [] pTempData;
- pTempData = NULL;
- }
- }
- else
- {
- if (!getFunctionName().empty()) // function name has already been set
- {
- bName = true;
- }
- }
- displayFunctionName();
-
- return bName;
-}
-
-
-// Called when a function SCI msg is received
-//
-bool FunctionSciMsg::identifyParameters ( )
-{
- logFunction();
- bool bParam = false;
-
- if ( NULL != getSpecializedSciMsgData() )
- {
- // For each parameter
- //
- for (unsigned int n=0; n<getSpecializedSciMsgParametersNumber(); n++)
- {
- // Find parameter name length
- //
- unsigned long parameterNameLength = 0;
- while ( (getSpecializedSciMsgDataLength() >= parameterNameLength)
- && ('\0' != *(getSpecializedSciMsgData()+parameterNameLength)) )
- {
- parameterNameLength++;
- }
-
- // Copy parameter name from specialized SCI msg data to parameter name attribute
- //
- string tempParameterName;
- tempParameterName.assign((char*)getSpecializedSciMsgData(), parameterNameLength);
- FunctionCallParameter parameterToFill;
- parameterToFill.setName(tempParameterName);
-
- // Remove parameter name from specialized SCI msg data
- //
- unsigned long tempDataLength = getSpecializedSciMsgDataLength();
- unsigned char * pTempData = new unsigned char [tempDataLength];
- memcpy(pTempData, getSpecializedSciMsgData(), tempDataLength);
- bParam = SciMsg::removeData (parameterNameLength+1, tempDataLength, &pTempData);
- if (0 != bParam)
- {
- bParam &= setSpecializedSciMsgDataLength(tempDataLength);
- bParam &= setSpecializedSciMsgData(pTempData);
- }
- if (NULL != pTempData)
- {
- delete [] pTempData;
- pTempData = NULL;
- }
-
- // Find parameter value length (coded on 2 bytes)
- //
- uint16_t tempLength = (static_cast<uint8_t>(*(getSpecializedSciMsgData()))<<8) + static_cast<uint8_t>(*(getSpecializedSciMsgData()+1));
- if ( FUNCTION_CALL_PARAM_MAX_SIZE >= tempLength )
- {
- parameterToFill.setValueLength (static_cast<unsigned long>(tempLength));
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "length of parameter value exceeds max size!" << endl;
-#endif /* CONFIG_LOG */
- errno = EMSGSIZE;
- throw Error(__PRETTY_FUNCTION__, "Length of parameter value exceeds max size", errno);
- }
-
- // Find parameter value
- //
- unsigned char * pTempParameterValue = new unsigned char [parameterToFill.getValueLength()];
- memcpy(pTempParameterValue, getSpecializedSciMsgData()+2, parameterToFill.getValueLength()); // +2 because parameter value length is coded on 2 bytes
- parameterToFill.setValue(pTempParameterValue);
-
- // Remove parameter value length and parameter value from specialized SCI msg data
- //
- tempDataLength = getSpecializedSciMsgDataLength();
- pTempData = new unsigned char [tempDataLength];
- memcpy(pTempData, getSpecializedSciMsgData(), tempDataLength);
- bParam &= SciMsg::removeData (2+parameterToFill.getValueLength(), tempDataLength, &pTempData); // +2 because parameter value length is coded on 2 bytes
- if (0 != bParam)
- {
- bParam &= setSpecializedSciMsgDataLength(tempDataLength);
- bParam &= setSpecializedSciMsgData(pTempData);
- }
- if (NULL != pTempData)
- {
- delete [] pTempData;
- pTempData = NULL;
- }
- if (NULL != pTempParameterValue)
- {
- delete [] pTempParameterValue;
- pTempParameterValue = NULL;
- }
-
- // Add parameter to the parameters list of the received function SCI msg
- //
- bParam &= addParameter(parameterToFill);
- }
- }
- displayListOfParameters();
-
- return bParam;
-}
-
-
-// Called when a function SCI msg is sent
-// Fill specialized SCI msg attributes
-// Fill specialized SCI msg data length and specialized SCI msg data
-//
-bool FunctionSciMsg::fillSpecializedSciMsgToSend ( )
-{
- logFunction();
- bool bFill = false;
-
- Function_Call_Parameters_Number numberOfParameters = 0;
- unsigned long dataLength = 0;
- unsigned char * pData = NULL;
-
- displayFunctionName();
- displayListOfParameters();
-
- // Function name is sent into the SCI msg data, before parameters
- //
- if (!getFunctionName().empty())
- {
- pData = (unsigned char *)(malloc(getFunctionName().size()+1)); // memory allocation for function name
- getFunctionName().copy ((char*)(pData), getFunctionName().size()); // copy function name into data
- pData[getFunctionName().size()] = '\0';
- dataLength += static_cast<unsigned long>(getFunctionName().size()+1); // update data length
-
- // Parameters are defined as 'FunctionCallParameter'
- // They will be sent into the function SCI msg into specialized SCI msg data
- // 'FunctionCallParameter' fields are sent according to the following format:
- // name\0lengthp_value etc. with length coded on 2 bytes
- // Number of parameters is sent into the 'Function_Call_Header.param_nb' field
- //
- for (unsigned int i=0; i<mListOfParameters.size(); ++i)
- {
- // Dynamic memory allocation for parameter
- //
- pData = (unsigned char *)(realloc(pData, dataLength+((mListOfParameters)[i].getName().length())+1+2+(mListOfParameters)[i].getValueLength()));
-
- // Parameter name
- //
- mListOfParameters[i].getName().copy ((char*)(pData+dataLength), mListOfParameters[i].getName().size()); // copy parameter name into data
- *(pData+dataLength+mListOfParameters[i].getName().size()) = '\0';
- dataLength += static_cast<unsigned long>(mListOfParameters[i].getName().size()+1); // update data length
-
- // Parameter value length
- //
- uint16_t tempLength = static_cast<uint16_t>(mListOfParameters[i].getValueLength());
- uint8_t tempLengthHigh=0, tempLengthLow=0;
- tempLengthHigh = static_cast<uint8_t>(tempLength >> 8);
- tempLengthLow = static_cast<uint8_t>(tempLength);
- *(pData+dataLength) = static_cast<unsigned char>(tempLengthHigh);
- *(pData+dataLength+1) = static_cast<unsigned char>(tempLengthLow);
- dataLength += 2; // update data length
-
- // Parameter value
- //
- if (0 != (mListOfParameters[i].getValueLength()))
- {
- for (unsigned int j=0; j<mListOfParameters[i].getValueLength(); j++)
- {
- *(pData+dataLength+j) = *(mListOfParameters[i].getValue()+j);
- }
- }
- dataLength += mListOfParameters[i].getValueLength(); // update data length
-
- // Increment number of parameters that have been copied into data
- //
- numberOfParameters++;
- }
- }
-
- // Fill specialized SCI msg type,
- // specialized SCI msg number of parameters,
- // specialized SCI msg data length,
- // and specialized SCI msg data
- //
- if (NULL != pData)
- {
- bFill = setSpecializedSciMsgType(FUNCTION_CALL_TYPE_REQ);
- bFill &= setSpecializedSciMsgParametersNumber(numberOfParameters);
- bFill &= setSpecializedSciMsgDataLength(dataLength);
- bFill &= setSpecializedSciMsgData(pData);
-
- // Free temporary allocated memory
- //
- free(pData);
- pData = NULL;
- }
-
- return bFill;
-}
-
-
-void FunctionSciMsg::displaySpecializedSciMsgHeader ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "function SCI msg header = " << endl;
- clog << logger(LOG_INFO) << "\tversion = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(mSpecializedSciMsgHeader.version) << endl;
- displaySpecializedSciMsgType(LOG_INFO);
- clog << logger(LOG_INFO) << "\tmsg id = 0x" << setfill('0') << setw(4) << uppercase << hex << mSpecializedSciMsgHeader.msg_id << endl;
- clog << logger(LOG_INFO) << "\tparam nb = " << dec << static_cast<unsigned short int>(mSpecializedSciMsgHeader.param_nb) \
- << " (0x" << setw(2) << uppercase << hex << static_cast<unsigned short int>(mSpecializedSciMsgHeader.param_nb) << ")" << endl;
- clog << logger(LOG_INFO) << "\tflags = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(mSpecializedSciMsgHeader.flags) << endl;
- clog << logger(LOG_INFO) << "\treserved = 0x" << setfill('0') << setw(4) << uppercase << hex << mSpecializedSciMsgHeader.reserved << dec << endl;
-#endif /* CONFIG_LOG */
-}
-
-
-void FunctionSciMsg::displaySpecializedSciMsgType ( int log_level ) const
-{
-#if CONFIG_LOG
- switch (getSpecializedSciMsgType())
- {
- case 0:
- clog << logger(log_level) << "\ttype = FUNCTION_CALL_TYPE_NONE" << endl;
- break;
- case 1:
- clog << logger(log_level) << "\ttype = FUNCTION_CALL_TYPE_REQ" << endl;
- break;
- case 2:
- clog << logger(log_level) << "\ttype = FUNCTION_CALL_TYPE_RSP" << endl;
- break;
- default:
- clog << logger(log_level) << "\ttype = unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-void FunctionSciMsg::displayFunctionName ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- if (!getFunctionName().empty())
- {
- clog << logger(LOG_COM) << "function name = " << getFunctionName() << endl;
- }
- else
- {
- clog << logger(LOG_ERROR) << "function name = empty!" << endl;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-void FunctionSciMsg::displayParameter ( unsigned int parameter_iterator ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "parameter " << dec << parameter_iterator+1 << " = " << endl;
- if (parameter_iterator < mListOfParameters.size())
- {
- mListOfParameters[parameter_iterator].displayParameter();
- }
- else
- {
- clog << logger(LOG_INFO) << "\tdoes not exist!" << endl;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-void FunctionSciMsg::displayListOfParameters ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_COM) << "list of parameters = " << endl;
-
- if (!mListOfParameters.empty())
- {
- for (unsigned int i=0; i<mListOfParameters.size(); i++)
- {
- mListOfParameters[i].displayParameter();
- }
- }
- else
- {
- clog << logger(LOG_COM) << "\tempty!" << endl;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-Function_Call_Type FunctionSciMsg::getSpecializedSciMsgType ( ) const
-{
- return mSpecializedSciMsgType;
-}
-
-
-bool FunctionSciMsg::setSpecializedSciMsgType ( const Function_Call_Type type )
-{
- mSpecializedSciMsgType = type;
-
- return true;
-}
-
-
-Function_Call_Msg_Id FunctionSciMsg::getMsgId ( ) const
-{
- return getSpecializedSciMsgHeader().msg_id;
-}
-
-
-bool FunctionSciMsg::setMsgId ( const Function_Call_Msg_Id msg_id )
-{
- mSpecializedSciMsgHeader.msg_id = msg_id;
-
- return true;
-}
-
-
-Function_Call_Msg_Id FunctionSciMsg::getSpecializedSciMsgId ( ) const
-{
- return mSpecializedSciMsgId;
-}
-
-
-bool FunctionSciMsg::incrementSpecializedSciMsgId ( )
-{
- mSpecializedSciMsgId++;
-
- return true;
-}
-
-
-Function_Call_Parameters_Number FunctionSciMsg::getSpecializedSciMsgParametersNumber ( ) const
-{
- return mSpecializedSciMsgParametersNumber;
-}
-
-
-bool FunctionSciMsg::setSpecializedSciMsgParametersNumber ( const Function_Call_Parameters_Number number_of_parameters )
-{
- logFunction();
- bool bNb = false;
-
- if ( FUNCTION_CALL_PARAM_MAX_NB >= number_of_parameters ) /* max number of parameter in a function call */
- {
- mSpecializedSciMsgParametersNumber = number_of_parameters;
- bNb = true;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "number of parameters exceeds max number!" << endl;
-#endif /* CONFIG_LOG */
- errno = E2BIG;
- throw Error(__PRETTY_FUNCTION__, "Number of parameters exceeds max number", errno);
- }
-
- return bNb;
-}
-
-
-Function_Call_Flags FunctionSciMsg::getSpecializedSciMsgFlags ( ) const
-{
- return mSpecializedSciMsgFlags;
-}
-
-
-bool FunctionSciMsg::setSpecializedSciMsgFlags ( const Function_Call_Flags flags )
-{
- logFunction();
- bool bFlags = false;
-
- if ( FUNCTION_CALL_FLAG_MAX < flags )
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "function SCI message header flags is out-of-range!" << endl;
-#endif /* CONFIG_LOG */
- }
- else if (FUNCTION_CALL_FLAG_FAILED == (flags & FUNCTION_CALL_FLAG_FAILED))
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "function SCI message header flags is set to FAILED!" << endl;
-#endif /* CONFIG_LOG */
- mSpecializedSciMsgFlags = flags;
- }
- else
- {
- mSpecializedSciMsgFlags = flags;
- bFlags = true;
- }
-
- return bFlags;
-}
-
-
-bool FunctionSciMsg::setReserved ( const uint16_t reserved )
-{
- mSpecializedSciMsgHeader.reserved = reserved;
-
- return true;
-}
-
-
-void * FunctionSciMsg::returnSpecializedSciMsgHeader ( ) const
-{
- return (void*)&mSpecializedSciMsgHeader;
-}
-
-
-const Function_Call_Header & FunctionSciMsg::getSpecializedSciMsgHeader ( ) const
-{
- return mSpecializedSciMsgHeader;
-}
-
-
-bool FunctionSciMsg::setSpecializedSciMsgHeader ( const Function_Call_Header & specialized_sci_msg_header )
-{
- logFunction();
- bool bSetHeader = false;
-
- mSpecializedSciMsgHeader = specialized_sci_msg_header;
-
- // Set specialized SCI msg attributes from specialized SCI msg header
- //
- bSetHeader = setSpecializedSciMsgType (static_cast<Function_Call_Type>(getSpecializedSciMsgHeader().type));
- bSetHeader &= setSpecializedSciMsgParametersNumber (static_cast<Function_Call_Parameters_Number>(getSpecializedSciMsgHeader().param_nb));
-
- displaySpecializedSciMsgHeader();
-
- return bSetHeader;
-}
-
-
-string FunctionSciMsg::getFunctionName ( ) const
-{
- return mFunctionName;
-}
-
-
-// Called by user to configure a SCI message to send
-//
-bool FunctionSciMsg::setFunctionName ( const string name )
-{
- logFunction();
- bool bName = false;
-
- if ( FUNCTION_CALL_ID_MAX_SIZE > name.size() ) /* max length of a function id */
- {
- mFunctionName = name;
- bName = true;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "function name exceeds max length!" << endl;
-#endif /* CONFIG_LOG */
- }
-
- return bName;
-}
-
-
-const ParametersList & FunctionSciMsg::getListOfParameters ( ) const
-{
- return mListOfParameters;
-}
-
-
-bool FunctionSciMsg::setListOfParameters ( const ParametersList & list_of_parameters )
-{
- if (!mListOfParameters.empty())
- {
- mListOfParameters.clear();
- }
- mListOfParameters = ParametersList(list_of_parameters);
-
- return true;
-}
-
-
-IFunctionCall * FunctionSciMsg::getFunctionCallManager ( ) const
-{
- return mpFunctionCallManager;
-}
-
-
-bool FunctionSciMsg::setFunctionCallManager ( IFunctionCall * p_function_call_manager )
-{
- logFunction();
-
- if (NULL != p_function_call_manager)
- {
- mpFunctionCallManager = p_function_call_manager;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_WARNING) << "function call manager pointer is NULL!" << endl;
-#endif /* CONFIG_LOG */
- mpFunctionCallManager = NULL;
- }
-
- return true;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/functioncall/src/FunctionSciMsgTest.cpp b/cesar/maximus/functioncall/src/FunctionSciMsgTest.cpp
deleted file mode 100644
index b74e6eea7f..0000000000
--- a/cesar/maximus/functioncall/src/FunctionSciMsgTest.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-
-#include "FunctionSciMsgTest.h"
-
-#include "FunctionSciMsg.h"
-#include "SciServer.h"
-#include "FunctionCallManager.h"
-#include "FunctionCallParameter.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (FunctionSciMsgTest);
-
-
-void FunctionSciMsgTest::setUp (void)
-{
- logTest();
-
- mpSciServer = new SciServer();
- mpFunctionCallManager = new FunctionCallManager (mpSciServer);
- mpFunctionSciMsg = new FunctionSciMsg (mpFunctionCallManager);
-}
-
-
-void FunctionSciMsgTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpSciServer)
- {
- delete (mpSciServer);
- mpSciServer = NULL;
- }
- if (NULL != mpFunctionCallManager)
- {
- delete (mpFunctionCallManager);
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpFunctionSciMsg)
- {
- delete mpFunctionSciMsg;
- mpFunctionSciMsg = NULL;
- }
-}
-
-
-void FunctionSciMsgTest::addParameterTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionSciMsg)
- {
- // Add parameter 1
- //
- FunctionCallParameter parameter1 ("parameter1", 3, (unsigned char *)"123");
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter1) );
-
- // Add parameter 2
- //
- FunctionCallParameter parameter2 ("parameter2", 10, (unsigned char *)"0123456789");
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter2) );
-
- // Add parameter 3
- //
- FunctionCallParameter parameter3 = parameter2;
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter3) );
-
- // Add parameter 4
- //
- bool assert = false;
- const string name = "parameter4";
- unsigned long length = FUNCTION_CALL_PARAM_MAX_SIZE + 1;
- unsigned char data[length];
- FunctionCallParameter parameter4 (name, length, data);
- try
- {
- mpFunctionSciMsg->addParameter(parameter4);
- }
- catch (Error & e)
- {
- assert = true;
- }
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- !mpFunctionSciMsg->bindParameter(name, length, data)
- && assert);
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized FunctionSciMsg pointer is NULL" );
- }
-}
-
-
-void FunctionSciMsgTest::bindParameterTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionSciMsg)
- {
- // Add parameter 1
- //
- FunctionCallParameter parameter1 ("parameter1", 3, (unsigned char *)"123");
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter1) );
-
- // Add parameter 2
- //
- FunctionCallParameter parameter2 ("parameter2", 10, (unsigned char *)"0123456789");
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter2) );
-
- // Add parameter 3
- //
- FunctionCallParameter parameter3 = parameter2;
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter3) );
-
- const string name = "parameter1";
- unsigned long dataLength = FUNCTION_CALL_PARAM_MAX_SIZE;
- unsigned char * pData = new unsigned char [FUNCTION_CALL_PARAM_MAX_SIZE];
-
- CPPUNIT_ASSERT_MESSAGE ( "bindParameter failed",
- mpFunctionSciMsg->bindParameter(name, dataLength, pData) );
-
- // Check results
- //
- CPPUNIT_ASSERT_MESSAGE ( "bindParameterTest failed: wrong data length", 3 == dataLength) ;
-
- CPPUNIT_ASSERT_MESSAGE ( "bindParameterTest failed: data pointer is NULL", NULL != pData) ;
-
- pData[dataLength] = '\0';
-
- CPPUNIT_ASSERT_MESSAGE ( "bindParameterTest failed: wrong data", !strcmp("123", (char*)pData)) ;
-
- // Free memory allocated for 'FunctionSciMsg::bindParameter'
- //
- if (NULL != pData)
- {
- delete [] pData;
- pData = NULL;
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized FunctionSciMsg pointer is NULL" );
- }
-}
-
-
-void FunctionSciMsgTest::fillSpecializedSciMsgToSendTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionSciMsg)
- {
- // Add parameter 1
- //
- FunctionCallParameter parameter1 ("parameter1", 3, (unsigned char *)"123");
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter1) );
-
- // Add parameter 2
- //
- FunctionCallParameter parameter2 ("parameter2", 10, (unsigned char *)"0123456789");
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter2) );
-
- // Add parameter 3
- //
- FunctionCallParameter parameter3 = parameter2;
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- mpFunctionSciMsg->addParameter(parameter3) );
-
- CPPUNIT_ASSERT_MESSAGE ( "setFunctionName failed",
- mpFunctionSciMsg->setFunctionName ("function_to_call") );
-
- CPPUNIT_ASSERT_MESSAGE ( "fillSpecializedSciMsgToSend failed",
- mpFunctionSciMsg->fillSpecializedSciMsgToSend() );
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized FunctionSciMsg pointer is NULL" );
- }
-}
-
-
-void FunctionSciMsgTest::setSpecializedSciMsgFlagsTest (void)
-{
- logTest();
-
- if (NULL != mpFunctionSciMsg)
- {
- mpFunctionSciMsg->setSpecializedSciMsgFlags(FUNCTION_CALL_FLAG_MAX + 1);
- CPPUNIT_ASSERT_MESSAGE ( "setSpecializedSciMsgFlags failed",
- FUNCTION_CALL_FLAG_NONE == mpFunctionSciMsg->getSpecializedSciMsgFlags() );
-
- mpFunctionSciMsg->setSpecializedSciMsgFlags(FUNCTION_CALL_FLAG_FAILED);
- CPPUNIT_ASSERT_MESSAGE ( "setSpecializedSciMsgFlags failed",
- FUNCTION_CALL_FLAG_FAILED == mpFunctionSciMsg->getSpecializedSciMsgFlags() );
-
- mpFunctionSciMsg->setSpecializedSciMsgFlags(FUNCTION_CALL_FLAG_NONE);
- CPPUNIT_ASSERT_MESSAGE ( "setSpecializedSciMsgFlags failed",
- FUNCTION_CALL_FLAG_NONE == mpFunctionSciMsg->getSpecializedSciMsgFlags() );
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized FunctionSciMsg pointer is NULL" );
- }
-}
-
diff --git a/cesar/maximus/functioncall/src/IFunctionCallTest.cpp b/cesar/maximus/functioncall/src/IFunctionCallTest.cpp
deleted file mode 100644
index 5f60e7b435..0000000000
--- a/cesar/maximus/functioncall/src/IFunctionCallTest.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-
-#include "IFunctionCallTest.h"
-
-#include "IFunctionCall.h"
-#include "FunctionCallManager.h"
-#include "SciServer.h"
-#include "FunctionSciMsg.h"
-#include "FunctionCallParameter.h"
-#include "SystemManager.h"
-#include "PhyProcessor.h"
-#include "NetworkClockProcessor.h"
-#include "EthernetProcessor.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (IFunctionCallTest);
-
-
-void IFunctionCallTest::setUp (void)
-{
- logTest();
-}
-
-
-void IFunctionCallTest::tearDown (void)
-{
- logTest();
-}
-
-
-void IFunctionCallTest::userTest (void)
-{
- logTest();
-
- try
- {
- SciServer sciServer;
- FunctionCallManager functionCallManager(&sciServer);
- FunctionSciMsg * pFunctionSciMsg = functionCallManager.createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "createMsg failed", (NULL != pFunctionSciMsg) );
-
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- functionCallManager.registerCallback(pFunctionSciMsg->getSpecializedSciMsgId(), &userFunction) );
-
- CPPUNIT_ASSERT_MESSAGE ( "setFunctionName failed",
- pFunctionSciMsg->setFunctionName("function_to_call") );
-
- FunctionCallParameter parameter ("parameter", 25, (unsigned char *)"1234567890123456789012345");
-
- CPPUNIT_ASSERT_MESSAGE ( "addParameter failed",
- pFunctionSciMsg->addParameter (parameter) );
-
- SystemManager systemManager(&sciServer);
- FunctionCallManager functionCall(&sciServer);
- PhyProcessor phy(&sciServer);
- EthernetProcessor ethernet(&sciServer);
- NetworkClockProcessor networkClock(&sciServer, &systemManager, &functionCall, &phy, &ethernet);
- systemManager.setNetworkClock(&networkClock);
- Sci_Msg_Station_Id stationId = 0;
- stationId = systemManager.createStation(systemManager.getDefaultStationExecutable());
- pFunctionSciMsg->setSciMsgStationId(stationId);
- systemManager.updateStationStatus ( stationId, MAXIMUS_STATION_STATUS_IDLE );
-
- CPPUNIT_ASSERT_MESSAGE ( "sendMsg failed",
- functionCallManager.sendMsg(pFunctionSciMsg) );
-
- if (NULL != pFunctionSciMsg)
- {
- delete pFunctionSciMsg;
- pFunctionSciMsg = NULL;
- }
- }
- catch ( Error &e )
- {
- e.display();
- }
-}
-
-
-void userFunction ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
diff --git a/cesar/maximus/interface/Config b/cesar/maximus/interface/Config
new file mode 100644
index 0000000000..4209a2a209
--- /dev/null
+++ b/cesar/maximus/interface/Config
@@ -0,0 +1 @@
+CONFIG_MAXIMUS_MANY_DECLARATIONS = n
diff --git a/cesar/maximus/interface/Module b/cesar/maximus/interface/Module
new file mode 100644
index 0000000000..63334a8342
--- /dev/null
+++ b/cesar/maximus/interface/Module
@@ -0,0 +1,3 @@
+MODULES := maximus/interface/msg maximus/interface/station
+
+SOURCES := Maximus.cpp
diff --git a/cesar/maximus/interface/inc/Maximus.h b/cesar/maximus/interface/inc/Maximus.h
new file mode 100644
index 0000000000..9211e4d359
--- /dev/null
+++ b/cesar/maximus/interface/inc/Maximus.h
@@ -0,0 +1,219 @@
+#ifndef maximus_interface_inc_maximus_h
+#define maximus_interface_inc_maximus_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/inc/Maximus.h
+ * \ingroup maximus_interface
+ *
+ */
+
+#include "maximus/common/types.h"
+#include "maximus/interface/station/station.h"
+#include "maximus/interface/msg/msg.h"
+#include "maximus/scheduler/scheduler.h"
+#include "maximus/processors/processors.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/interface/inc/MaximusCallBack.h"
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/processors/inc/PhyProcessor.h"
+#include "maximus/processors/inc/EthernetProcessor.h"
+#include <boost/python/object.hpp>
+#include <fstream>
+#include <string>
+#include <vector>
+
+class ChannelComputer;
+class Error;
+
+#define catchFunction(p_maximus) \
+ catch (Error &e) \
+{ \
+ e.display(); \
+ (p_maximus).error_detected (); \
+ throw; \
+}
+
+typedef Network_Clock_Tick tick_t;
+
+class Maximus : public MaximusCallBack
+{
+private:
+
+ /* Config variables. */
+ std::string default_station_executable;
+ std::string log_filename;
+
+ /* Command line interface is used when
+ * Station::debug() is called. */
+ std::string user_debug_cli;
+
+ float zero_cross_frequency;
+ Network_Clock_Tick mMaxTickValue;
+ Network_Clock_Tick mWaitTickValue;
+
+ /* All modules. */
+ SciServer *p_sci_server;
+ Processor *p_processor[SCI_MSG_TYPE_NB];
+ ChannelComputer *mpChannel;
+ Scheduler *p_scheduler;
+
+ /* Internal variables. */
+ stations_list_t sta_list;
+
+ /* Not check yet. */
+ boost::python::object create_pb;
+ boost::python::object rx_cb;
+ boost::python::object create_eth;
+ boost::python::object create_mme;
+ boost::python::object create_buffer;
+ boost::python::object cb;
+ boost::python::object catch_all_cb;
+ bool rx_phy_activated;
+ bool rx_eth_activated;
+ bool catch_all_activated;
+ /* Same creation callback functions are used in both
+ * cases ("catch all" reception or not). */
+ bool is_create_set;
+ bool mIsWireshark;
+ File_Descriptor etherLogFileDescriptor;
+ std::string stationTest;
+ std::ofstream mMaximusLogFile;
+
+
+ bool readSnrFile (
+ const std::string & snr_file,
+ float snr_array[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1] );
+
+ void log_ether (
+ const char *pdata, int data_size);
+
+ void real_constructor ();
+ void real_destructor ();
+
+
+public:
+
+ static void signal_interrup (int n);
+ static void exit_interrup ();
+
+ Maximus ();
+
+ virtual ~Maximus ();
+
+ void error_detected ();
+
+ void stop ();
+
+ void init (boost::python::object args);
+
+ void recv_phy_mpdu_cb (
+ unsigned long fc_10,
+ unsigned long *fc_av,
+ PhySciMsg &msg);
+
+ void recv_ether_cb (
+ char *pdata,
+ int data_length,
+ Ethernet_Type type,
+ Sci_Msg_Station_Id sta_id);
+
+ void process ();
+
+ Station *create_default_sta ();
+
+ Station *create_sta_1 (
+ const std::string &exec);
+
+ Station *create_sta_2 (
+ const std::string &station_executable,
+ uint32_t seed);
+
+ void del_station (Station *p_station);
+
+ unsigned int get_nb_sta () const;
+
+ void send_phy (boost::python::object mpdu);
+
+ void set_phy_rx (
+ boost::python::object user_cb,
+ boost::python::object create_pb_function);
+
+ void send_ether (
+ boost::python::object msdu,
+ int station_id);
+
+ void set_ether_rx (
+ boost::python::object user_cb,
+ boost::python::object create_eth_function,
+ boost::python::object create_mme_function,
+ boost::python::object create_buffer_function);
+
+ void set_ether_rx_catch_all (
+ boost::python::object user_cb,
+ boost::python::object create_eth_function,
+ boost::python::object create_mme_function,
+ boost::python::object create_buffer_function);
+
+ void reset_ether_rx_catch_all ();
+
+ MsgFunctionCall *create_fc (
+ const std::string & name );
+
+ MsgFunctionCall *create_probe ();
+
+ void wait (const tick_t value);
+ void wait_evt ();
+
+ void disturb_channel ( const bool enable = true );
+
+ tick_t get_date ( );
+
+ void set_freq (float frequency);
+ float get_freq ();
+
+ void set_snr ( const float snr_value );
+ void set_snr ( const std::string & snr_file );
+ void set_snr_from_src ( const float snr_value, const Station & src, const bool both_directions );
+ void set_snr_from_src ( const std::string & snr_file, const Station & src, const bool both_directions );
+ void set_snr_to_dst ( const float snr_value, const Station & dst, const bool both_directions );
+ void set_snr_to_dst ( const std::string & snr_file, const Station & dst, const bool both_directions );
+ void set_snr_from_src_to_dst ( const float snr_value, const Station & src, const Station & dst, const bool both_directions );
+ void set_snr_from_src_to_dst ( const std::string & snr_file, const Station & src, const Station & dst, const bool both_directions );
+
+ void activate_false_alarm ( const Network_Clock_Tick average_duration, const float std_deviation );
+
+ void deactivate_false_alarm ( );
+
+ bool is_station_idle ( Sci_Msg_Station_Id station_id );
+
+ void hide_sta (
+ Station & sta1,
+ Station & sta2,
+ bool hidden);
+
+
+ inline Scheduler &get_scheduler () const
+ {
+ return *p_scheduler;
+ }
+
+ inline const std::string &get_debug_cli () const
+ {
+ return user_debug_cli;
+ }
+
+ /* Get Processors */
+ FunctionCallProcessor *get_functioncall () const;
+ SystemProcessor *get_system () const;
+ ClockProcessor *get_networkclock () const;
+ PhyProcessor *get_phy () const;
+ EthernetProcessor *get_ether () const;
+};
+
+#endif // maximus_interface_inc_maximus_h
diff --git a/cesar/maximus/interface/inc/MaximusCallBack.h b/cesar/maximus/interface/inc/MaximusCallBack.h
new file mode 100644
index 0000000000..3f6379322a
--- /dev/null
+++ b/cesar/maximus/interface/inc/MaximusCallBack.h
@@ -0,0 +1,41 @@
+#ifndef maximus_interface_inc_MaximusCallBack_h
+#define maximus_interface_inc_MaximusCallBack_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/inc/MaximusCallBack.h
+ * \ingroup maximus_interface
+ *
+ * Maximus callbacks aren't mixed with Maximus class definition to provide
+ * a smaller interface between Maximus and Processors. Like that it's easier
+ * to build unit test.
+ *
+ * In other words, less knowledge have processors on Maximus, better is it.
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/sci/sci_msg.h"
+
+class MaximusCallBack
+{
+public:
+
+ virtual void recv_ether_cb (
+ char *pdata,
+ int data_length,
+ Ethernet_Type type,
+ Sci_Msg_Station_Id sta_id) = 0;
+
+ virtual void recv_phy_mpdu_cb (
+ unsigned long fc_10,
+ unsigned long *fc_av,
+ PhySciMsg &msg) = 0;
+};
+
+
+#endif /* maximus_interface_inc_MaximusCallBack_h */
diff --git a/cesar/maximus/interface/maximus.h b/cesar/maximus/interface/maximus.h
new file mode 100644
index 0000000000..a73a5fd1d5
--- /dev/null
+++ b/cesar/maximus/interface/maximus.h
@@ -0,0 +1,18 @@
+#ifndef maximus_interface_maximus_h
+#define maximus_interface_maximus_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/maximus.h
+ * \ingroup maximus_interface
+ *
+ */
+class MaximusCallBack;
+class Maximus;
+
+#endif /* maximus_interface_maximus_h */
diff --git a/cesar/maximus/interface/msg/Module b/cesar/maximus/interface/msg/Module
new file mode 100644
index 0000000000..b5030406be
--- /dev/null
+++ b/cesar/maximus/interface/msg/Module
@@ -0,0 +1 @@
+SOURCES := MsgMpdu.cpp MsgFunctionCall.cpp FunctionCallParameter.cpp
diff --git a/cesar/maximus/interface/msg/inc/FunctionCallParameter.h b/cesar/maximus/interface/msg/inc/FunctionCallParameter.h
new file mode 100644
index 0000000000..24828293a9
--- /dev/null
+++ b/cesar/maximus/interface/msg/inc/FunctionCallParameter.h
@@ -0,0 +1,87 @@
+#ifndef maximus_interface_msg_inc_functioncallparameter_h
+#define maximus_interface_msg_inc_functioncallparameter_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/inc/FunctionCallParameter.h
+ * \ingroup maximus_interface_msg
+ *
+ */
+#include <string>
+
+
+class FunctionCallParameter
+{
+private:
+
+ std::string mName;
+ unsigned long mValueLength;
+ unsigned char * mpValue;
+
+public:
+
+ FunctionCallParameter ();
+
+ FunctionCallParameter (
+ const FunctionCallParameter & parameter );
+
+ FunctionCallParameter (
+ std::string name,
+ unsigned long value_length,
+ unsigned char * p_value );
+
+ virtual ~FunctionCallParameter ( );
+
+ bool operator == (
+ const FunctionCallParameter & parameter ) const;
+
+ FunctionCallParameter &operator = (
+ const FunctionCallParameter & parameter );
+
+ void displayParameter ( ) const;
+
+ inline std::string getName () const
+ {
+ return mName;
+ }
+
+ inline void setName (const std::string name)
+ {
+ mName = name;
+ }
+
+ inline void setName (const char *p_name)
+ {
+ if (p_name)
+ mName = p_name;
+ }
+
+ inline unsigned long getValueLength () const
+ {
+ return mValueLength;
+ }
+
+ inline void setValueLength (unsigned long val)
+ {
+ mValueLength = val;
+ }
+
+ inline unsigned char * getValue () const
+ {
+ return mpValue;
+ }
+
+ /**
+ * @return bool
+ * @param p_value the new value of mpValue
+ */
+ bool setValue ( const unsigned char * p_value );
+};
+
+
+#endif // maximus_interface_msg_inc_functioncallparameter_h
diff --git a/cesar/maximus/interface/msg/inc/MsgFunctionCall.h b/cesar/maximus/interface/msg/inc/MsgFunctionCall.h
new file mode 100644
index 0000000000..b956654068
--- /dev/null
+++ b/cesar/maximus/interface/msg/inc/MsgFunctionCall.h
@@ -0,0 +1,166 @@
+#ifndef maximus_interface_msg_inc_msgfunctioncall_h
+#define maximus_interface_msg_inc_msgfunctioncall_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/inc/MsgFunctionCall.h
+ * \ingroup maximus_interface_msg_inc
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/processors/processors.h"
+#include "maximus/interface/maximus.h"
+#include "maximus/interface/station/station.h"
+#include "maximus/interface/msg/inc/FunctionCallParameter.h"
+#include "maximus/sci/inc/FunctionSciMsg.h"
+#include <boost/function.hpp>
+#include <boost/python.hpp>
+#include <boost/python/tuple.hpp>
+#include <string>
+#include <vector>
+
+typedef std::vector<FunctionCallParameter *> ParametersList;
+typedef boost::python::object cb_t;
+
+class MsgFunctionCall
+{
+private:
+
+ static Function_Call_Msg_Id msg_id;
+
+ Maximus &interface;
+
+ cb_t mCallback;
+ bool mResponseReceived;
+ bool is_async_msg;
+ Function_Call_Msg_Id rx_msg_id;
+ std::string function_name;
+ Sci_Msg_Station_Id sta_id;
+ ParametersList parameter_list;
+
+public:
+
+ MsgFunctionCall (
+ Maximus &ref1,
+ const std::string &name = PROBE_ID);
+
+ virtual ~MsgFunctionCall ();
+
+ inline Sci_Msg_Station_Id get_sta_id () const
+ {
+ return sta_id;
+ }
+
+ inline Function_Call_Msg_Id get_msg_id () const
+ {
+ return msg_id;
+ }
+
+ inline const std::string &get_function_name () const
+ {
+ return function_name;
+ }
+
+ inline const ParametersList get_parameter_list () const
+ {
+ return parameter_list;
+ }
+
+ void receive_response (
+ const FunctionSciMsg & function_sci_msg );
+
+ void add_param_empty (const std::string &name);
+ void add_param_string (const std::string &name,
+ const std::string &value);
+ void add_param_bool (const std::string &name,
+ const bool &value);
+ void add_param_1 (const std::string &name,
+ const unsigned char &value);
+ void add_param_2 (const std::string &name,
+ const unsigned short &value);
+ void add_param_4 (const std::string &name,
+ const unsigned long &value);
+ void add_param_8 (const std::string &name,
+ const unsigned long long &value);
+ void add_param_table_1 (const std::string &name,
+ const boost::python::tuple &value);
+ void add_param_table_2 (const std::string &name,
+ const boost::python::tuple &value);
+ void add_param_table_4 (const std::string &name,
+ const boost::python::tuple &value);
+
+ std::string bind_param_1 (
+ const std::string name);
+
+ std::string bind_param_string (
+ const std::string name);
+
+ bool bind_param_bool (
+ const std::string name);
+
+ unsigned short int bind_param_ushort (
+ const std::string name);
+
+ unsigned long int bind_param_ulong (
+ const std::string name);
+
+ unsigned long long bind_param_ull (
+ const std::string name);
+
+ boost::python::tuple bind_param_n_u8 (
+ const std::string name);
+
+ boost::python::tuple bind_param_n_u16 (
+ const std::string name);
+
+ boost::python::tuple bind_param_n_u32 (
+ const std::string name);
+
+ void remove_param ( const std::string & name );
+
+ void set_cb (
+ boost::python::object user_cb);
+
+ void remove_cb ( );
+
+ void set_sta (const Station &sta);
+
+ void send_async ();
+ void send_async_2 (const Station &sta);
+ void send ();
+
+ void send_2 (const Station &sta);
+
+ bool is_param (const std::string &name) const;
+
+ unsigned char * bind_param (
+ const std::string & name,
+ unsigned long & length,
+ unsigned char * p_data ) const;
+
+ template <typename T> T & bind_param (
+ const std::string & name ) const;
+
+ Function_Call_Msg_Id get_tx_msg_id () const;
+
+ Function_Call_Msg_Id get_rx_msg_id () const;
+
+ bool removeParameter ( const std::string & name );
+
+ bool bindParameter (
+ const std::string name_of_parameter_to_get,
+ unsigned long & data_length,
+ unsigned char * p_data) const;
+
+private:
+
+ void clear_list_of_parameters ();
+
+};
+
+#endif // maximus_interface_msg_inc_msgfunctioncall_h
diff --git a/cesar/maximus/interface/msg/inc/MsgMpdu.h b/cesar/maximus/interface/msg/inc/MsgMpdu.h
new file mode 100644
index 0000000000..d5b185331f
--- /dev/null
+++ b/cesar/maximus/interface/msg/inc/MsgMpdu.h
@@ -0,0 +1,129 @@
+#ifndef maximus_interface_msg_inc_msgmpdu_h
+#define maximus_interface_msg_inc_msgmpdu_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/inc/MsgMpdu.h
+ * \ingroup maximus_interface_msg
+ *
+ */
+#include "maximus/processors/inc/PhyProcessor.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/sci/inc/PhySciMsg.h"
+#include <string>
+
+class MsgMpdu
+{
+private:
+ PhyProcessor &phy_proc;
+
+ PhySciMsg *SciMsg_pre;
+ PhySciMsg *SciMsg_fc;
+ PhySciMsg *SciMsg_payload;
+
+ unsigned int mpdu_pbsize;
+ bool is_sent;
+
+public:
+
+ MsgMpdu (PhyProcessor &ref);
+
+ virtual ~MsgMpdu ( );
+
+ bool setup_tx (
+ Phy_Fc_Mode mpdu_mode,
+ uint32_t mpdu_fc_10,
+ uint32_t *mpdu_fc_av,
+ std::string &mpdu_payload,
+ Phy_Short_Ppdu mpdu_shortppdu,
+ Phy_Mod mpdu_mod);
+
+ inline uint32_t get_fc_10 ()
+ {
+ uint32_t r = 0;
+
+ if (SciMsg_fc
+ && PHY_TYPE_FC_HYBRID_MODE
+ == SciMsg_fc->get_phy_type ())
+ {
+ unsigned char *p =
+ SciMsg_fc->get_phy_data_addr ();
+
+ r = *((uint32_t *) p);
+ }
+
+ return r;
+ }
+
+ inline uint32_t *get_fc_av ()
+ {
+ uint32_t *r = NULL;
+
+ if (SciMsg_fc)
+ {
+ unsigned char *p =
+ SciMsg_fc->get_phy_data_addr ();
+
+ if (PHY_TYPE_FC_HYBRID_MODE
+ == SciMsg_fc->get_phy_type ())
+ {
+ r = ((uint32_t *) p) + 1;
+ }
+ else
+ {
+ r = (uint32_t *) p;
+ }
+
+ }
+
+ return r;
+ }
+
+ inline void get_payload (
+ unsigned char **data, size_t *size)
+ {
+ if (SciMsg_fc)
+ {
+ *data = SciMsg_fc->get_phy_data_addr ();
+ *size = SciMsg_fc->get_phy_data_size ();
+ }
+ }
+
+ inline size_t get_pbsize ()
+ {
+ return mpdu_pbsize;
+ }
+
+ inline void set_phy_PbHeader (
+ const int a, const uint32_t b)
+ {
+ if (SciMsg_payload)
+ SciMsg_payload->set_phy_PbHeader (a, b);
+ }
+
+ inline void schedule_tx ()
+ {
+ phy_proc.mpdu_schedule (
+ this,
+ SciMsg_pre,
+ SciMsg_fc,
+ SciMsg_payload);
+ }
+
+ inline void set_is_sent ()
+ {
+ is_sent = true;
+ }
+
+ inline bool get_is_sent () const
+ {
+ return is_sent;
+ }
+};
+
+#endif // maximus_interface_msg_inc_msgmpdu_h
diff --git a/cesar/maximus/interface/msg/inc/templates.h b/cesar/maximus/interface/msg/inc/templates.h
new file mode 100644
index 0000000000..fcdcf62eb7
--- /dev/null
+++ b/cesar/maximus/interface/msg/inc/templates.h
@@ -0,0 +1,57 @@
+#ifndef maximus_interface_msg_inc_templates_h
+#define maximus_interface_msg_inc_templates_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/inc/templates.h
+ * \ingroup maximus_interface_msg_inc
+ *
+ */
+
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include <netinet/in.h>
+
+template <typename T> T &
+MsgFunctionCall::bind_param (
+ const std::string & name) const
+{
+ // parameter not found => return 0
+ static T param = 0;
+ unsigned long length = sizeof(T);
+ unsigned char * pData = new unsigned char [length];
+
+ if ( (NULL != bind_param(name, length, pData))
+ && (NULL != pData) )
+ {
+ param = *((T*)pData);
+ if (sizeof(long) == sizeof(param))
+ {
+ param = ntohl(param);
+ }
+ else if (sizeof(short) == sizeof(param))
+ {
+ param = ntohs(param);
+ }
+ else if (sizeof(long long) == sizeof(param))
+ {
+ uint32_t high = 0, low = 0;
+ high = (uint32_t)((uint64_t)param >> 32);
+ low = (uint32_t) ((uint64_t)param
+ & 0x00000000ffffffffL);
+ param = (
+ ( (uint64_t)(ntohl(high))) << 32)
+ | (uint64_t)(ntohl(low));
+ }
+ }
+ delete [] pData;
+
+ return param;
+}
+
+#endif // maximus_interface_msg_inc_templates_h
diff --git a/cesar/maximus/interface/msg/msg.h b/cesar/maximus/interface/msg/msg.h
new file mode 100644
index 0000000000..bc57874863
--- /dev/null
+++ b/cesar/maximus/interface/msg/msg.h
@@ -0,0 +1,19 @@
+#ifndef maximus_interface_msg_msg_h
+#define maximus_interface_msg_msg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/msg.h
+ * \ingroup maximus_interface_msg
+ *
+ */
+
+class MsgFunctionCall;
+class MsgMpdu;
+
+#endif /* maximus_interface_msg_msg_h */
diff --git a/cesar/maximus/interface/msg/src/FunctionCallParameter.cpp b/cesar/maximus/interface/msg/src/FunctionCallParameter.cpp
new file mode 100644
index 0000000000..02dbf8c5d8
--- /dev/null
+++ b/cesar/maximus/interface/msg/src/FunctionCallParameter.cpp
@@ -0,0 +1,140 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/src/FunctionCallParameter.cpp
+ * \ingroup maximus_interface_msg
+ *
+ */
+#include "maximus/interface/msg/inc/FunctionCallParameter.h"
+#include "maximus/utils/inc/Logger.h"
+#include <sstream> // for 'ostringstream'
+#include <iostream> // for 'cout', 'cerr' and 'clog'
+#include <cstring> // memcmp, memcpy
+
+FunctionCallParameter::FunctionCallParameter ():
+ mName ("none"),
+ mValueLength (0),
+ mpValue (NULL)
+{
+ logFunction ();
+}
+
+FunctionCallParameter::FunctionCallParameter (
+ const FunctionCallParameter &parameter ):
+ mName (parameter.getName ()),
+ mValueLength (parameter.getValueLength ())
+{
+ logFunction ();
+
+ mpValue = new unsigned char [mValueLength];
+ memcpy (mpValue, parameter.getValue (), mValueLength);
+}
+
+FunctionCallParameter::FunctionCallParameter (
+ std::string name,
+ unsigned long value_length,
+ unsigned char *p_value):
+ mName (name),
+ mValueLength (value_length)
+{
+ logFunction ();
+
+ mpValue = new unsigned char [mValueLength];
+ memcpy (mpValue, p_value, mValueLength);
+}
+
+FunctionCallParameter::~FunctionCallParameter ()
+{
+ logFunction ();
+
+ delete [] mpValue;
+}
+
+bool
+FunctionCallParameter::operator== (
+ const FunctionCallParameter & parameter ) const
+{
+ logFunction ();
+ bool bOperator = false;
+
+ if ( (0 == mName.compare (parameter.getName()))
+ && (getValueLength() == parameter.getValueLength())
+ && (0 == memcmp (mpValue, parameter.getValue(), parameter.getValueLength())) )
+ {
+ bOperator = true;
+ }
+
+ return bOperator;
+}
+
+
+FunctionCallParameter &
+FunctionCallParameter::operator= (
+ const FunctionCallParameter & parameter )
+{
+ logFunction ();
+
+ setName (parameter.getName());
+ setValueLength (parameter.getValueLength());
+ setValue (parameter.getValue());
+ return *this;
+}
+
+
+void FunctionCallParameter::displayParameter ( ) const
+{
+#if CONFIG_LOG
+ std::ostringstream oss;
+ oss << "\t[name = " << mName
+ << ", value length = " << std::dec << getValueLength()
+ << ", value = ";
+
+ if (NULL != mpValue)
+ {
+ oss << "0x";
+ for (unsigned int i=0; i<static_cast<unsigned int>(getValueLength()); i++)
+ {
+ if ('\0' != *(mpValue+i))
+ {
+ oss << std::hex << static_cast<unsigned short int>(*(mpValue+i));
+ }
+ else
+ {
+ oss << "00";
+ }
+ }
+ }
+ else
+ {
+ oss << "NULL!";
+ }
+ oss << "]" << std::dec << std::endl;
+ oss.flush();
+ std::clog << logger(LOG_COM) << oss.str();
+#endif /* CONFIG_LOG */
+}
+
+bool
+FunctionCallParameter::setValue (
+ const unsigned char * p_value )
+{
+ logFunction ();
+
+ bool bSetValue = false;
+ delete [] mpValue;
+ mpValue = NULL;
+
+ if (p_value)
+ {
+ mpValue = new unsigned char [mValueLength];
+ memcpy (mpValue, p_value, mValueLength);
+ bSetValue = true;
+ }
+
+ return bSetValue;
+}
diff --git a/cesar/maximus/interface/msg/src/MsgFunctionCall.cpp b/cesar/maximus/interface/msg/src/MsgFunctionCall.cpp
new file mode 100644
index 0000000000..e094735b28
--- /dev/null
+++ b/cesar/maximus/interface/msg/src/MsgFunctionCall.cpp
@@ -0,0 +1,663 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/src/MsgFunctionCall.cpp
+ * \ingroup maximus_interface_msg
+ *
+ */
+#include "maximus/interface/msg/inc/MsgFunctionCall.h"
+#include "maximus/interface/inc/Maximus.h"
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/processors/inc/FunctionCallProcessor.h"
+#include "maximus/processors/inc/SystemProcessor.h"
+#include "maximus/interface/msg/inc/templates.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include <boost/python.hpp>
+#include <string>
+
+namespace bp = boost::python;
+
+Function_Call_Msg_Id MsgFunctionCall::msg_id = 0;
+
+MsgFunctionCall::MsgFunctionCall (Maximus &ref1,
+ const std::string &name):
+ interface (ref1),
+ mResponseReceived (false),
+ is_async_msg (false),
+ rx_msg_id (0),
+ function_name (name),
+ sta_id (0)
+{
+ logFunction ();
+
+ msg_id ++;
+}
+
+MsgFunctionCall::~MsgFunctionCall ()
+{
+ logFunction ();
+
+ clear_list_of_parameters ();
+}
+
+inline void
+MsgFunctionCall::clear_list_of_parameters ()
+{
+ while (!parameter_list.empty ())
+ {
+ delete (parameter_list.back ());
+ parameter_list.pop_back ();
+ }
+}
+
+void
+MsgFunctionCall::add_param_empty (
+ const std::string & name)
+{
+ logFunction ();
+
+ parameter_list.push_back (
+ new FunctionCallParameter (name, 0, NULL));
+}
+
+void
+MsgFunctionCall::add_param_string (
+ const std::string &name,
+ const std::string &value)
+{
+ logFunction ();
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name,
+ value.length () + 1,
+ (unsigned char *) value.c_str ()));
+}
+
+void
+MsgFunctionCall::add_param_bool (
+ const std::string &name,
+ const bool &value)
+{
+ logFunction ();
+
+ unsigned char temp[1] = { value };
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+void
+MsgFunctionCall::add_param_1 (
+ const std::string &name,
+ const unsigned char &value)
+{
+ logFunction ();
+
+ unsigned char temp[1] = { value };
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+void
+MsgFunctionCall::add_param_2 (
+ const std::string &name,
+ const unsigned short &value)
+{
+ logFunction ();
+
+ unsigned char temp[2] = {
+ (unsigned char) (value >> 8),
+ (unsigned char) value,
+ };
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+void
+MsgFunctionCall::add_param_4 (
+ const std::string &name,
+ const unsigned long &value)
+{
+ logFunction ();
+
+ unsigned char temp[4] = {
+ (unsigned char) (value >> 24),
+ (unsigned char) (value >> 16),
+ (unsigned char) (value >> 8),
+ (unsigned char) (value),
+ };
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+void
+MsgFunctionCall::add_param_8 (
+ const std::string &name,
+ const unsigned long long &value)
+{
+ logFunction ();
+
+ uint32_t high = value >> 32;
+ uint32_t low = value;
+
+ unsigned char temp[sizeof (long long)] = {
+ (unsigned char) (low >> 24),
+ (unsigned char) (low >> 16),
+ (unsigned char) (low >> 8),
+ (unsigned char) (low),
+ (unsigned char) (high >> 24),
+ (unsigned char) (high >> 16),
+ (unsigned char) (high >> 8),
+ (unsigned char) (high),
+ };
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+void
+MsgFunctionCall::add_param_table_1 (
+ const std::string &name,
+ const bp::tuple &value)
+{
+ logFunction ();
+
+ uint size = len (value);
+
+ unsigned char temp[size];
+ for (uint i = 0; i < size; i++)
+ {
+ /* Network format. */
+ temp[i] = bp::extract <unsigned char> (value[i]);
+ }
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+void
+MsgFunctionCall::add_param_table_2 (
+ const std::string &name,
+ const bp::tuple &value)
+{
+ logFunction ();
+
+ uint size = len (value);
+
+ unsigned char temp[size * sizeof (short)];
+ uint idx;
+ unsigned short val;
+
+ for (uint i = 0; i < size; i++)
+ {
+ idx = i * sizeof (short);
+ val = bp::extract <unsigned short> (value[i]);
+
+ /* Network format. */
+ temp[idx+0] = (unsigned char) (val >> 8);
+ temp[idx+1] = (unsigned char) (val);
+ }
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+void
+MsgFunctionCall::add_param_table_4 (
+ const std::string &name,
+ const bp::tuple &value)
+{
+ logFunction ();
+
+ uint size = len (value);
+
+ unsigned char temp[size * sizeof (long)];
+ uint idx;
+ unsigned long val;
+
+ for (uint i = 0; i < size; i++)
+ {
+ idx = i * sizeof (long);
+ val = bp::extract <unsigned long> (value[i]);
+
+ /* Network format. */
+ temp[idx+0] = (unsigned char) (val >> 24);
+ temp[idx+1] = (unsigned char) (val >> 16);
+ temp[idx+2] = (unsigned char) (val >> 8);
+ temp[idx+3] = (unsigned char) (val);
+ }
+
+ parameter_list.push_back (
+ new FunctionCallParameter (
+ name, sizeof (temp), temp));
+}
+
+bool
+MsgFunctionCall::removeParameter (const std::string & name)
+{
+ logFunction ();
+ bool bRemoveParameter = false;
+
+ static ParametersList::iterator it;
+ for (it = parameter_list.begin();
+ it != parameter_list.end(); ++it)
+ {
+ if ( !(*it)->getName().compare(name) )
+ {
+ parameter_list.erase (it);
+ bRemoveParameter = true;
+ break;
+ }
+ }
+
+ return bRemoveParameter;
+}
+
+void
+MsgFunctionCall::remove_param (const std::string & name)
+{
+ logFunction ();
+
+ removeParameter (name);
+}
+
+void
+MsgFunctionCall::set_cb (
+ bp::object user_cb)
+{
+ logFunction ();
+
+ mCallback = user_cb;
+}
+
+void
+MsgFunctionCall::remove_cb ()
+{
+ logFunction ();
+
+ mCallback = cb_t ();
+}
+
+void
+MsgFunctionCall::set_sta (const Station &sta)
+{
+ logFunction ();
+
+ sta_id = sta.getStationId ();
+}
+
+void
+MsgFunctionCall::send_async_2 (const Station &sta)
+{
+ logFunction();
+
+ set_sta (sta);
+ send_async ();
+}
+
+void
+MsgFunctionCall::send_2 (const Station &sta)
+{
+ set_sta (sta);
+ send ();
+}
+
+void
+MsgFunctionCall::send_async ()
+{
+ logFunction ();
+
+ is_async_msg = true;
+
+ while (!interface.is_station_idle (sta_id))
+ interface.process ();
+
+ interface.get_functioncall ()->sendMsg (
+ *this,
+ boost::bind (&MsgFunctionCall::receive_response,
+ this, _1));
+
+ /* XXX & TODO : It's cleary a patch.
+ * This part must be rewrite ! */
+ clear_list_of_parameters ();
+}
+
+void
+MsgFunctionCall::send ()
+{
+ logFunction ();
+
+ // Register callback and send message
+
+ while (!interface.is_station_idle (sta_id))
+ interface.process ();
+
+ interface.get_functioncall ()->sendMsg (
+ *this,
+ boost::bind (&MsgFunctionCall::receive_response,
+ this, _1));
+
+ /* XXX & TODO : It's clearly a patch.
+ * This part must be rewrite ! */
+ clear_list_of_parameters ();
+
+ while (!mResponseReceived)
+ interface.process();
+
+ mResponseReceived = false;
+ if (mCallback)
+ {
+ (mCallback) (boost::ref(*this));
+ /* Free python dependency. */
+ mCallback = cb_t ();
+ }
+}
+
+bool
+MsgFunctionCall::is_param (const std::string &name) const
+{
+ logFunction ();
+
+ bool bIsParam;
+
+ /* max size of 1 parameter */
+ unsigned long length = FUNCTION_CALL_PARAM_MAX_SIZE;
+ unsigned char *pParam = new unsigned char [length];
+
+ bIsParam = (NULL != bind_param (name, length, pParam));
+
+ delete [] pParam;
+
+ return bIsParam;
+}
+
+unsigned char *
+MsgFunctionCall::bind_param (
+ const std::string & name,
+ unsigned long & length,
+ unsigned char * p_data) const
+{
+ logFunction ();
+
+ /* parameter not found => return NULL. */
+ unsigned char * pData = NULL;
+ if (bindParameter (name, length, p_data))
+ {
+ // Parameter found => return p_data
+ pData = p_data;
+ }
+
+ return pData;
+}
+
+bool
+MsgFunctionCall::bindParameter (
+ const std::string name_of_parameter_to_get,
+ unsigned long & data_length,
+ unsigned char * p_data ) const
+{
+ logFunction ();
+
+ ParametersList::const_iterator it;
+ bool bBindParameter = false;
+
+ for (it = parameter_list.begin ();
+ it != parameter_list.end (); ++it)
+ {
+ if (!(*it)->getName ().compare (name_of_parameter_to_get) )
+ {
+ bBindParameter = true;
+ if (data_length < (*it)->getValueLength())
+ {
+ maximus_log (LOG_WARNING,
+ "bind_param: parameter value length too small to get the parameter value");
+ maximus_log (LOG_WARNING,
+ " (given data length = " << data_length << " and needed data length = "
+ << (*it)->getValueLength() << ")");
+ maximus_log (LOG_WARNING,
+ " => parameter value will be cut");
+ }
+ else if (data_length > (*it)->getValueLength())
+ {
+ maximus_log (LOG_WARNING,
+ "bind_param: parameter value length too large to get the parameter value");
+ maximus_log (LOG_WARNING,
+ " => update length from " << data_length << " to "
+ << (*it)->getValueLength());
+
+ data_length = (*it)->getValueLength();
+ }
+ if ( (NULL != (*it)->getValue()) && (NULL != p_data) )
+ {
+ memcpy (p_data, (*it)->getValue(), data_length);
+ break;
+ }
+ }
+ }
+
+ return bBindParameter;
+}
+
+Function_Call_Msg_Id
+MsgFunctionCall::get_tx_msg_id ( ) const
+{
+ return msg_id;
+}
+
+Function_Call_Msg_Id
+MsgFunctionCall::get_rx_msg_id ( ) const
+{
+ return rx_msg_id;
+}
+
+void
+MsgFunctionCall::receive_response (
+ const FunctionSciMsg & function_sci_msg )
+{
+ logFunction ();
+
+ /**********************
+ * XXX: TODO: PATCH *
+ **********************/
+ unsigned char *p_data;
+ unsigned int data_length;
+ Function_Call_Msg_Id msg_id_rx;
+ Function_Call_Parameters_Number param_nb;
+
+ function_sci_msg.patch_to_get_data (
+ &p_data, &data_length,
+ &msg_id_rx, &param_nb);
+
+ /******************
+ * End of PATCH *
+ ******************/
+
+ Function_Call_Parameters_Number i;
+ rx_msg_id = msg_id_rx;
+
+ unsigned char *p_current_data = p_data;;
+
+ function_name.assign ((char *)p_current_data);
+ p_current_data += function_name.size () + 1;
+
+ for (i = 0; i < param_nb; i++)
+ {
+ FunctionCallParameter *param_i = new FunctionCallParameter;
+ std::string temp;
+
+ temp.assign ((char *)p_current_data);
+ param_i->setName (temp);
+ p_current_data += temp.size () + 1;
+
+ uint16_t tempLength =
+ (static_cast <uint16_t> (*p_current_data) << 8)
+ + static_cast <uint16_t> (*(p_current_data + 1));
+
+ if (FUNCTION_CALL_PARAM_MAX_SIZE < tempLength)
+ {
+ maximus_log (LOG_ERROR,
+ "length of parameter value exceeds max size!");
+ errno = EMSGSIZE;
+ throw Error (__PRETTY_FUNCTION__,
+ "Length of parameter value exceeds max size",
+ errno);
+ }
+
+ param_i->setValueLength (tempLength);
+ p_current_data += 2;
+
+ param_i->setValue (p_current_data);
+ p_current_data += tempLength;
+
+ /* Add parameter to the parameters list of the
+ * received function SCI msg.
+ */
+ parameter_list.push_back (param_i);
+ }
+
+ mResponseReceived = true;
+
+ if (is_async_msg && mCallback)
+ {
+ (mCallback) (boost::ref(*this));
+ /* Free python dependency. */
+ mCallback = cb_t ();
+ }
+
+}
+
+std::string
+MsgFunctionCall::bind_param_1 (
+ const std::string name)
+{
+ std::string str;
+ unsigned long ulLength = FUNCTION_CALL_PARAM_MAX_SIZE;
+ unsigned char ucValue[ulLength];
+ if (NULL != MsgFunctionCall::bind_param (name, ulLength, ucValue))
+ {
+ str.assign((char *)ucValue, ulLength);
+ }
+ return str;
+}
+
+std::string
+MsgFunctionCall::bind_param_string (
+ const std::string name)
+{
+ std::string str (bind_param_1 (name));
+
+ if ((0 < str.length()) && ('\0' == str[str.length()-1]) )
+ {
+ str.erase(str.length()-1);
+ }
+ return str;
+}
+
+bool
+MsgFunctionCall::bind_param_bool (
+ const std::string name)
+{
+ return MsgFunctionCall::bind_param<bool>(name);
+}
+
+unsigned short int
+MsgFunctionCall::bind_param_ushort (
+ const std::string name)
+{
+ return MsgFunctionCall::bind_param<unsigned short int> (name);
+}
+
+unsigned long int
+MsgFunctionCall::bind_param_ulong (
+ const std::string name)
+{
+ return MsgFunctionCall::bind_param<unsigned long int> (name);
+}
+
+
+unsigned long long
+MsgFunctionCall::bind_param_ull (
+ const std::string name)
+{
+ return MsgFunctionCall::bind_param<unsigned long long> (name);
+}
+
+bp::tuple
+MsgFunctionCall::bind_param_n_u8 (
+ const std::string name)
+{
+ bp::tuple t = bp::make_tuple ();
+ std::string str (bind_param_1 (name));
+ for (unsigned int n=0; n < str.length (); n += sizeof (uint8_t))
+ {
+ t += bp::make_tuple ((uint8_t)str[n]);
+ }
+ return t;
+}
+
+bp::tuple
+MsgFunctionCall::bind_param_n_u16 (
+ const std::string name)
+{
+ bp::tuple t = bp::make_tuple ();
+ std::string str (bind_param_1 (name));
+ for (unsigned int n = 0; n<str.length ();
+ n += sizeof (uint16_t))
+ {
+ if (str.length () <= n + 1)
+ {
+ Error e (
+ __PRETTY_FUNCTION__,
+ "error when binding parameter");
+ e.display();
+ throw e;
+ }
+ t += bp::make_tuple (
+ (uint16_t) (((uint8_t) str[n] << 8)
+ + (uint8_t) str[n+1]));
+ }
+ return t;
+}
+
+bp::tuple
+MsgFunctionCall::bind_param_n_u32 (
+ const std::string name)
+{
+ bp::tuple t = bp::make_tuple ();
+ std::string str (bind_param_1 (name));
+ for (unsigned int n = 0;
+ n < str.length ();
+ n += sizeof (uint32_t))
+ {
+ if (str.length () <= n+3)
+ {
+ Error e (
+ __PRETTY_FUNCTION__,
+ "error when binding parameter");
+ e.display();
+ throw e;
+ }
+ t += bp::make_tuple ((uint32_t) (((uint8_t)str[n] << 24)
+ + ((uint8_t)str[n+1] << 16)
+ + ((uint8_t)str[n+2] << 8)
+ + (uint8_t)str[n+3]));
+ }
+ return t;
+}
diff --git a/cesar/maximus/interface/msg/src/MsgMpdu.cpp b/cesar/maximus/interface/msg/src/MsgMpdu.cpp
new file mode 100644
index 0000000000..ea4d577662
--- /dev/null
+++ b/cesar/maximus/interface/msg/src/MsgMpdu.cpp
@@ -0,0 +1,171 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/msg/src/MsgMpdu.cpp
+ * \ingroup maximus_interface_msg
+ *
+ */
+#include "maximus/interface/msg/inc/MsgMpdu.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+
+MsgMpdu::MsgMpdu (PhyProcessor &ref):
+ phy_proc (ref),
+ SciMsg_pre (NULL),
+ SciMsg_fc (NULL),
+ SciMsg_payload (NULL),
+ mpdu_pbsize (0),
+ is_sent (0)
+{
+ logFunction ();
+}
+
+MsgMpdu::~MsgMpdu ( )
+{
+ logFunction ();
+}
+
+bool
+MsgMpdu::setup_tx (
+ Phy_Fc_Mode mpdu_mode,
+ uint32_t mpdu_fc_10,
+ uint32_t *mpdu_fc_av,
+ std::string &mpdu_payload,
+ Phy_Short_Ppdu mpdu_shortppdu,
+ Phy_Mod mpdu_mod)
+{
+ logFunction ();
+
+ if (mpdu_fc_av == NULL)
+ return false;
+
+
+ Phy_Mpdu_Format mpdu_format;
+ Phy_Gil mpdu_gil;
+ Phy_Fecrate mpdu_fecrate;
+ Phy_Flags mpdu_flags = PHY_FLAG_CRC_OK;
+ Phy_Nb_Of_Pbs nb_of_pbs;
+
+ /* Step 0°) Pre-requested. */
+ {
+ /* Set MPDU format
+ * HomePlug AV specs => delimiter type (DT_AV) is described by
+ * bits 0-2 of first fc_av octet.
+ * +1 to have the correspondance with our own MPDU format
+ * definition (of 'phy_types.h'). */
+ mpdu_format = (Phy_Mpdu_Format) ((mpdu_fc_av[0] & 0x07) + 1);
+
+ if (!mpdu_shortppdu)
+ {
+ mpdu_fecrate = PHY_FEC_RATE_1_2;
+
+ if (mpdu_mod == PHY_MOD_MINI_ROBO)
+ {
+ mpdu_gil = PHY_GIL_567;
+ mpdu_pbsize = MAC_PB136_BYTES;
+ }
+ else
+ {
+ mpdu_gil = PHY_GIL_417;
+ mpdu_pbsize = MAC_PB520_BYTES;
+ mpdu_flags |= PHY_FLAG_PB512;
+ }
+ }
+ else
+ {
+ mpdu_fecrate = PHY_FEC_RATE_NONE;
+ mpdu_gil = PHY_GIL_NONE;
+ mpdu_pbsize = MAC_PB520_BYTES;
+ mpdu_flags |= PHY_FLAG_PB512;
+ }
+
+ nb_of_pbs = ((mpdu_payload.size () + 1 + mpdu_pbsize - 1)
+ / mpdu_pbsize);
+ }
+
+ /* Step 1°) PhySciMsg Preamble. */
+ SciMsg_pre = new PhySciMsg (0);
+ SciMsg_pre->set_phy_type (PHY_TYPE_PREAMBLE);
+
+ /* Step 2°) PhySciMsg Frame Control. */
+ {
+ size_t mpdu_fc_size = 0;
+ Phy_Type mpdu_fc_type;
+ unsigned char *p1 = NULL;
+
+ if (mpdu_fc_10 != 0)
+ {
+ mpdu_fc_type = PHY_TYPE_FC_HYBRID_MODE;
+ mpdu_fc_size = 5 * sizeof (uint32_t);
+ }
+ else
+ {
+ mpdu_fc_type = PHY_TYPE_FC_AV_ONLY_MODE;
+ mpdu_fc_size = 4 * sizeof (uint32_t);
+ }
+
+ SciMsg_fc = new PhySciMsg (mpdu_fc_size);
+ SciMsg_fc->set_phy_type (mpdu_fc_type);
+ p1 = SciMsg_fc->get_phy_data_addr ();
+
+ if (mpdu_fc_type == PHY_TYPE_FC_HYBRID_MODE)
+ {
+ memcpy (p1, &mpdu_fc_10, sizeof (uint32_t));
+ p1 += sizeof (uint32_t);
+ }
+
+ memcpy (p1, mpdu_fc_av, 4 * sizeof (uint32_t));
+ }
+
+ /* Step 3°) PhySciMsg Payload. */
+ {
+ unsigned char *p2;
+
+ size_t length = nb_of_pbs * mpdu_pbsize;
+ SciMsg_payload = new PhySciMsg (length);
+ SciMsg_payload->set_phy_type (PHY_TYPE_MPDU_PAYLOAD);
+ p2 = SciMsg_payload->get_phy_data_addr ();
+ memcpy (p2, mpdu_payload.c_str (), mpdu_payload.size ());
+ memset (p2 + mpdu_payload.size (),
+ 0, length - mpdu_payload.size ());
+ }
+
+ /* Step 4°) common fields. */
+ {
+
+ SciMsg_pre->set_phy_FecRate (mpdu_fecrate);
+ SciMsg_fc->set_phy_FecRate (mpdu_fecrate);
+ SciMsg_payload->set_phy_FecRate (mpdu_fecrate);
+
+ SciMsg_pre->set_phy_gil (mpdu_gil);
+ SciMsg_fc->set_phy_gil (mpdu_gil);
+ SciMsg_payload->set_phy_gil (mpdu_gil);
+
+ /* mpdu_pbsize is not used in SCI. */
+ SciMsg_pre->set_phy_shortppdu (mpdu_shortppdu);
+ SciMsg_fc->set_phy_shortppdu (mpdu_shortppdu);
+ SciMsg_payload->set_phy_shortppdu (mpdu_shortppdu);
+
+ SciMsg_pre->set_phy_mod (mpdu_mod);
+ SciMsg_fc->set_phy_mod (mpdu_mod);
+ SciMsg_payload->set_phy_mod (mpdu_mod);
+
+ SciMsg_pre->set_phy_flags (mpdu_flags);
+ SciMsg_fc->set_phy_flags (mpdu_flags);
+ SciMsg_payload->set_phy_flags (mpdu_flags);
+
+ SciMsg_payload->set_phy_MpduFormat (mpdu_format);
+ }
+
+ maximus_log (LOG_ERROR, "mpdu_payload.size = " << std::dec << mpdu_payload.size ());
+ maximus_log (LOG_ERROR, "mpdu_pbsize = " << std::dec << mpdu_pbsize);
+
+ SciMsg_payload->set_phy_NbOfPbs (nb_of_pbs);
+
+ return true;
+}
diff --git a/cesar/maximus/interface/src/Maximus.cpp b/cesar/maximus/interface/src/Maximus.cpp
new file mode 100644
index 0000000000..84e4de457e
--- /dev/null
+++ b/cesar/maximus/interface/src/Maximus.cpp
@@ -0,0 +1,1577 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/src/Maximus.cpp
+ * \ingroup maximus_interface
+ *
+ */
+#include "maximus/interface/inc/Maximus.h"
+#include "maximus/interface/msg/inc/MsgFunctionCall.h"
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/channel/inc/ChannelComputer.h"
+#include "maximus/channel/inc/ChannelSettings.h"
+#include "maximus/interface/msg/inc/MsgMpdu.h"
+#include "maximus/scheduler/inc/Scheduler.h"
+#include "maximus/processors/inc/SystemProcessor.h"
+#include "maximus/processors/inc/FunctionCallProcessor.h"
+#include "maximus/processors/inc/ClockProcessor.h"
+#include "maximus/processors/inc/EthernetProcessor.h"
+#include "maximus/sci/inc/SciServer.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include "maximus/common/types/system_types.h"
+#include "common/defs/ethernet.h"
+#include "config/maximus.h"
+#include <boost/python.hpp>
+#include <sstream>
+#include <stdio.h>
+#include <iostream>
+#include <fstream>
+#include <getopt.h>
+#include <signal.h>
+#include <algorithm>
+#include <sys/socket.h> // for 'struct sockaddr'
+#include <sys/ioctl.h>
+#include <linux/if.h>
+#include <linux/if_tun.h>
+#include <fcntl.h> // for 'O_RDWR'
+#include <stdlib.h>
+
+namespace bp = boost::python;
+
+#if CONFIG_LOG
+// For Maximus log
+Logger logger (LOG_NONE);
+#endif /* CONFIG_LOG */
+
+static Maximus *my_instance = NULL;
+
+void
+Maximus::exit_interrup ()
+{
+ if (my_instance)
+ my_instance->stop ();
+}
+
+void
+Maximus::signal_interrup (int n)
+{
+ logFunction ();
+
+ my_instance->stop ();
+ raise (SIGTERM);
+}
+
+Maximus::Maximus ():
+ log_filename ("maximus_log"),
+ zero_cross_frequency (0.0),
+ mMaxTickValue (0),
+ mWaitTickValue (0),
+ mIsWireshark (false),
+ etherLogFileDescriptor (-1)
+{
+ logFunction ();
+
+ if (CONFIG_MAXIMUS_MANY_DECLARATIONS && my_instance)
+ {
+ errno = EPERM;
+ throw Error (__PRETTY_FUNCTION__,
+ "Twice declaration of Maximus forbidden.", errno);
+ }
+ my_instance = this;
+
+ /* To catch SIGINT signal. */
+ signal (SIGINT, Maximus::signal_interrup);
+ signal (SIGABRT, Maximus::signal_interrup);
+ atexit (Maximus::exit_interrup);
+}
+
+void
+Maximus::real_constructor ()
+{
+ /* Initialisation: Low Layer. */
+ p_sci_server = new SciServer (sta_list);
+
+ /* Initialisation: Middle layers. */
+ p_processor[SCI_MSG_TYPE_NONE] = NULL;
+ p_processor[SCI_MSG_TYPE_FUNCTION_CALL] =
+ new FunctionCallProcessor (
+ *p_sci_server,
+ *this);
+ p_processor[SCI_MSG_TYPE_SYSTEM] =
+ new SystemProcessor (
+ *p_sci_server,
+ *this,
+ sta_list);
+ p_processor[SCI_MSG_TYPE_PHY] =
+ new PhyProcessor (
+ *p_sci_server,
+ *this);
+ p_processor[SCI_MSG_TYPE_ETHERNET] =
+ new EthernetProcessor (
+ *p_sci_server,
+ *this);
+ p_processor[SCI_MSG_TYPE_NETWORK_CLOCK] =
+ new ClockProcessor (
+ *p_sci_server,
+ *this);
+
+ /* Initialisation: High layers. */
+ p_scheduler = new Scheduler (
+ *get_phy (),
+ *get_networkclock ());
+
+ mpChannel = NULL;
+
+ /* Automatic registering between layers. */
+ for (uint i = SCI_MSG_TYPE_NONE;
+ i < SCI_MSG_TYPE_NB; ++i )
+ {
+ if (p_processor[i])
+ p_processor[i]->register_scheduler (p_scheduler);
+ }
+ p_sci_server->register_current_tick_addr (
+ p_scheduler->get_time_pointer ());
+}
+
+Maximus::~Maximus ()
+{
+ logFunction ();
+
+ real_destructor ();
+}
+
+void
+Maximus::real_destructor ()
+{
+ /* Free all cb for python dependency. */
+ create_pb = bp::object ();
+ rx_cb = bp::object ();
+ create_eth = bp::object ();
+ create_mme = bp::object ();
+ create_buffer = bp::object ();
+ cb = bp::object ();
+ catch_all_cb = bp::object ();
+
+ if (mMaximusLogFile.is_open ())
+ {
+ mMaximusLogFile.flush ();
+ mMaximusLogFile.close ();
+ }
+
+ if (0 < etherLogFileDescriptor)
+ {
+ close (etherLogFileDescriptor);
+ etherLogFileDescriptor = 0;
+ }
+
+ delete mpChannel;
+ mpChannel = NULL;
+ delete p_scheduler;
+ p_scheduler = NULL;
+
+ for (uint i = SCI_MSG_TYPE_NONE;
+ i < SCI_MSG_TYPE_NB; ++i )
+ {
+ Sci_Msg_Type a = (Sci_Msg_Type) i;
+ if (p_processor[a] != NULL)
+ {
+ delete p_processor[a];
+ p_processor[a] = NULL;
+ }
+ }
+ delete p_sci_server;
+ p_sci_server = NULL;
+ my_instance = NULL;
+}
+
+void
+Maximus::init (bp::object args)
+{
+ try
+ {
+ logFunction ();
+
+ real_constructor ();
+
+ int optionIndex = 0;
+ int optionChar = 0;
+ std::string stationLog("-");
+ std::string wireshark;
+ int argc = len (args);
+ char *argv[argc];
+ std::vector<char> args_copy[argc];
+ const static struct option longOptions[] = {
+ {"station-executable", required_argument, 0, 'e'},
+ {"station-log", required_argument, 0, 's'},
+ {"maximus-log", required_argument, 0, 'm'},
+ {"log-level", required_argument, 0, 'l'},
+ {"max-tick-value", required_argument, 0, 't'},
+ {"debugger", required_argument, 0, 'd'},
+ {"frequency", required_argument, 0, 'f'},
+ {"wireshark", required_argument, 0, 'w'}
+ };
+
+ for (int i = 0; i < argc; i++)
+ {
+ const std::string s = bp::extract <std::string> (args[i]);
+ args_copy[i].insert (args_copy[i].end (), s.c_str (),
+ s.c_str () + s.size () + 1);
+ argv[i] = &args_copy[i][0];
+ }
+
+ /* Declared by getopt.h */
+ optind = 0;
+
+ while (EOF != optionChar)
+ {
+ optionChar = getopt_long (
+ argc, argv, "e:s:m:l:t:d:f:w:",
+ longOptions, &optionIndex);
+
+ switch (optionChar)
+ {
+ case 'e':
+ default_station_executable = optarg;
+ break;
+
+ case 's':
+ stationLog = optarg;
+ break;
+
+ case 'm':
+ log_filename = optarg;
+ break;
+
+ case 'l':
+ if (CONFIG_LOG
+ && (LOG_DEBUG <= atoi(optarg))
+ && (LOG_NONE >= atoi(optarg)))
+ {
+ logger.setLogLevel (atoi (optarg));
+ }
+ break;
+
+ case 't':
+ mMaxTickValue = strtoull (optarg, NULL, 0);
+ break;
+
+ case 'd':
+ user_debug_cli = optarg;
+ break;
+
+ case 'f':
+ if ((50 == atof(optarg))
+ || (60 == atof(optarg))
+ || (0 == atof(optarg)))
+ {
+ set_freq (atof (optarg));
+ }
+ break;
+
+ case 'w':
+ wireshark = optarg;
+ if ( (0 == wireshark.compare("on"))
+ || (0 == wireshark.compare("On"))
+ || (0 == wireshark.compare("ON")) )
+ {
+ mIsWireshark = true;
+ }
+ else if ( (0 == wireshark.compare("off"))
+ || (0 == wireshark.compare("Off"))
+ || (0 == wireshark.compare("OFF")) )
+ {
+ mIsWireshark = false;
+ }
+ break;
+
+ case '?':
+ errno = EINVAL;
+ std::ostringstream oss;
+ oss << "Usage:" << std::endl
+ << " -e default_station_executable" << std::endl
+ << " -s station_log" << std::endl
+ << " -m maximus_log" << std::endl
+ << " -l log_level" << std::endl
+ << " -t max_tick_value" << std::endl
+ << " -d debugger" << std::endl
+ << " -f frequency" << std::endl
+ << " -w wireshark" << std::endl;
+ throw Error (__PRETTY_FUNCTION__, oss.str (), errno);
+ break;
+ }
+ }
+
+ if (CONFIG_LOG
+ && (!log_filename.empty ())
+ && (log_filename.compare ("-")) )
+ {
+ // In case of the file already exists, delete it
+ remove (log_filename.c_str());
+
+ mMaximusLogFile.open (log_filename.c_str (),
+ std::ios_base::app
+ | std::ios_base::out);
+
+ if (mMaximusLogFile.is_open ())
+ {
+ logger.setLogFile (mMaximusLogFile);
+ }
+ else
+ {
+ maximus_log (LOG_ERROR, "error while opening Maximus log file!");
+ maximus_log (LOG_ERROR, "Maximus logs will be output on standard output!");
+ }
+ }
+
+ p_sci_server->set_station_log (stationLog);
+ p_scheduler->reset_time ();
+
+ rx_phy_activated = false;
+ rx_eth_activated = false;
+ catch_all_activated = false;
+ is_create_set = false;
+
+ if (mIsWireshark)
+ {
+ etherLogFileDescriptor = open("/dev/net/tun", O_RDWR);
+ if (0 < etherLogFileDescriptor)
+ {
+ struct ifreq ifr;
+ memset(&ifr, 0, sizeof(ifr));
+ /* Flags:
+ * IFF_TUN - TUN device (no Ethernet headers)
+ * IFF_TAP - TAP device
+ * IFF_NO_PI - Do not provide packet information
+ */
+ ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
+ strncpy (ifr.ifr_name, "tap10", IFNAMSIZ);
+ if (0 > ioctl (
+ etherLogFileDescriptor,
+ TUNSETIFF,
+ (void *)&ifr))
+ {
+ close (etherLogFileDescriptor);
+ etherLogFileDescriptor = -1;
+ Error e (
+ __PRETTY_FUNCTION__,
+ "ioctl failed", errno);
+ e.display ();
+ }
+ else
+ {
+ /* Set persistent status */
+ if (0 > ioctl (
+ etherLogFileDescriptor,
+ TUNSETPERSIST, 1))
+ {
+ Error e (
+ __PRETTY_FUNCTION__,
+ "enabling TUNSETPERSIST failed", errno);
+ e.display ();
+ }
+
+ /* We don't need checksums calculated for
+ * packets coming in this device */
+ ioctl (
+ etherLogFileDescriptor,
+ TUNSETNOCSUM, 1);
+ }
+ }
+ }
+ }
+ catchFunction (*this);
+}
+
+void Maximus::process ()
+{
+ try
+ {
+ logFunction();
+
+ bool bIdle = true;
+ stations_list_t::iterator it;
+ for (it = sta_list.begin (); it != sta_list.end (); ++it)
+ {
+ Station_Status state = (*it)->getStationStatus();
+ if (MAXIMUS_STATION_STATUS_DEACTIVATED != state
+ && MAXIMUS_STATION_STATUS_IDLE != state)
+ {
+ bIdle = false;
+ break;
+ }
+ }
+
+ if (bIdle)
+ {
+ Network_Clock_Tick tickValue = 0;
+
+ if (0 == mMaxTickValue)
+ tickValue = mWaitTickValue;
+ else if (0 != mWaitTickValue)
+ tickValue = std::min (mMaxTickValue, mWaitTickValue);
+
+ p_scheduler->set_max_tick (tickValue);
+ p_scheduler->process_next_event ();
+ }
+
+ p_sci_server->process ();
+
+ if (0 != mMaxTickValue)
+ {
+ if (mMaxTickValue <= p_scheduler->get_current_tick ())
+ {
+ maximus_log (LOG_FATAL, "Max tick value is reached!");
+ stop ();
+ }
+ }
+ }
+ catchFunction (*this);
+}
+
+Station *
+Maximus::create_default_sta ()
+{
+ try
+ {
+ logFunction ();
+
+ return create_sta_2 (default_station_executable, 0);
+ }
+ catchFunction (*this);
+}
+
+Station *
+Maximus::create_sta_1 (
+ const std::string &exec)
+{
+ try
+ {
+ logFunction ();
+
+ return create_sta_2 (exec, 0);
+ }
+ catchFunction (*this);
+}
+
+Station *
+Maximus::create_sta_2 (
+ const std::string &station_executable,
+ uint32_t seed)
+{
+ try
+ {
+ logFunction ();
+
+ Station *p_station = NULL;
+
+ if (station_executable.empty ()
+ && default_station_executable.empty ())
+ {
+ errno = EPERM;
+ throw Error (__PRETTY_FUNCTION__,
+ "No executable defined",
+ errno);
+ }
+
+ if (!station_executable.empty ())
+ p_station = new Station (
+ *this,
+ station_executable,
+ p_scheduler->get_current_tick (),
+ seed);
+ else
+ p_station = new Station (
+ *this,
+ default_station_executable,
+ p_scheduler->get_current_tick (),
+ seed);
+
+ sta_list.push_back (p_station);
+
+ if (mpChannel && get_phy ()->isChannelEnabled ())
+ {
+ /* If channel perturbation is enabled, inform the
+ * channel package that a new station has been
+ * created. */
+ mpChannel->addChannelSettings (
+ p_station->getStationId ());
+ }
+
+ return p_station;
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::del_station (
+ Station *p_station)
+{
+ logFunction ();
+
+ sta_list.remove (p_station);
+ p_scheduler->remove_sta_events (
+ p_station->getStationId ());
+}
+
+unsigned int
+Maximus::get_nb_sta () const
+{
+ return sta_list.size ();
+}
+
+MsgFunctionCall *
+Maximus::create_fc (const std::string & name)
+{
+ try
+ {
+ logFunction ();
+
+ MsgFunctionCall *p_msg = NULL;
+ p_msg = new MsgFunctionCall (*this, name);
+
+ return p_msg;
+ }
+ catchFunction (*this);
+}
+
+MsgFunctionCall *
+Maximus::create_probe ()
+{
+ try
+ {
+ logFunction ();
+
+ MsgFunctionCall *p_msg = NULL;
+ p_msg = new MsgFunctionCall (*this);
+
+ return p_msg;
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::wait (const tick_t value)
+{
+ try
+ {
+ logFunction();
+
+ mWaitTickValue = p_scheduler->get_current_tick ()
+ + value;
+ while (mWaitTickValue > p_scheduler->get_current_tick ())
+ {
+ process();
+ }
+ mWaitTickValue = 0;
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::wait_evt ()
+{
+ try
+ {
+ logFunction();
+
+ while (!get_functioncall ()->is_FunctionCall_empty ())
+ {
+ process();
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::disturb_channel (const bool enable)
+{
+ try
+ {
+ logFunction ();
+
+ if (enable)
+ {
+ if (NULL == mpChannel)
+ {
+ mpChannel = new ChannelComputer (
+ &sta_list,
+ get_phy (),
+ get_system ());
+ }
+
+ // Set beacon period to Channel
+ mpChannel->setBeaconPeriod (zero_cross_frequency);
+ }
+
+ get_phy ()->setIsChannelEnabled (enable);
+ }
+ catchFunction (*this);
+}
+
+tick_t
+Maximus::get_date ()
+{
+ try
+ {
+ logFunction ();
+ tick_t date = 0;
+
+ date = p_scheduler->get_current_tick ();
+
+ return date;
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_freq (float frequency)
+{
+ try
+ {
+ logFunction ();
+
+ if (frequency < 0.0)
+ frequency = 0.0;
+
+ zero_cross_frequency = frequency;
+ get_phy ()->set_zerocross_freq (frequency);
+ }
+ catchFunction (*this);
+}
+
+float
+Maximus::get_freq ()
+{
+ logFunction();
+
+ return zero_cross_frequency;
+}
+
+void
+Maximus::set_snr (const float snr_value)
+{
+ try
+ {
+ logFunction();
+
+ // If channel perturbation is enabled, set the SNR value
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(0 /* tx_station_id */, 0 /* rx_station_id */, false);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snr_value);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_snr (const std::string & snr_file)
+{
+ try
+ {
+ logFunction();
+
+ // Read the user SNR file
+ float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
+ if (!readSnrFile(snr_file, snrArray))
+ {
+ for (int j=0; j<= PHY_CARRIER_NB; j++)
+ {
+ for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
+ {
+ std::cerr << snrArray[i][j] << " ";
+ }
+ std::cerr << std::endl;
+ }
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
+ }
+
+ // If channel perturbation is enabled, set the SNR values
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(0 /* tx_station_id */, 0 /* rx_station_id */, false);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snrArray);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_snr_from_src (
+ const float snr_value,
+ const Station &src,
+ const bool both_directions)
+{
+ try
+ {
+ logFunction();
+
+ // If channel perturbation is enabled, set the SNR value
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(src.getStationId() /* tx_station_id */, 0 /* rx_station_id */, both_directions);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snr_value);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_snr_from_src (
+ const std::string &snr_file,
+ const Station &src,
+ const bool both_directions)
+{
+ try
+ {
+ logFunction();
+
+ // Read the user SNR file
+ float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
+ if (!readSnrFile(snr_file, snrArray))
+ {
+ for (int j=0; j<= PHY_CARRIER_NB; j++)
+ {
+ for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
+ {
+ std::cerr << snrArray[i][j] << " ";
+ }
+ std::cerr << std::endl;
+ }
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
+ }
+
+ // If channel perturbation is enabled, set the SNR values
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(src.getStationId() /* tx_station_id */, 0 /* rx_station_id */, both_directions);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snrArray);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_snr_to_dst (
+ const float snr_value,
+ const Station & dst,
+ const bool both_directions)
+{
+ try
+ {
+ logFunction();
+
+ // If channel perturbation is enabled, set the SNR value
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(0 /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snr_value);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_snr_to_dst (
+ const std::string & snr_file,
+ const Station & dst,
+ const bool both_directions)
+{
+ try
+ {
+ logFunction();
+
+ // Read the user SNR file
+ float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
+ if (!readSnrFile(snr_file, snrArray))
+ {
+ for (int j=0; j<= PHY_CARRIER_NB; j++)
+ {
+ for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
+ {
+ std::cerr << snrArray[i][j] << " ";
+ }
+ std::cerr << std::endl;
+ }
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
+ }
+
+ // If channel perturbation is enabled, set the SNR values
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(0 /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snrArray);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_snr_from_src_to_dst (
+ const float snr_value,
+ const Station & src,
+ const Station & dst,
+ const bool both_directions)
+{
+ try
+ {
+ logFunction();
+
+ // If channel perturbation is enabled, set the SNR value
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(src.getStationId() /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snr_value);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_snr_from_src_to_dst (
+ const std::string & snr_file,
+ const Station & src,
+ const Station & dst,
+ const bool both_directions)
+{
+ try
+ {
+ logFunction();
+
+ float snrArray[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1];
+ if (!readSnrFile(snr_file, snrArray))
+ {
+ for (int j=0; j<= PHY_CARRIER_NB; j++)
+ {
+ for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
+ {
+ std::cerr << snrArray[i][j] << " ";
+ }
+ std::cerr << std::endl;
+ }
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "Error while reading SNR file", errno);
+ }
+
+ // If channel perturbation is enabled, set the SNR values
+ if (get_phy ()->isChannelEnabled())
+ {
+ std::vector<ChannelSettings *> listOfChannelSettings = mpChannel->findChannelSettings(src.getStationId() /* tx_station_id */, dst.getStationId() /* rx_station_id */, both_directions);
+ std::vector<ChannelSettings *>::size_type size = listOfChannelSettings.size();
+ for (std::vector<ChannelSettings *>::size_type s=0; s<size; s++)
+ {
+ if (NULL == listOfChannelSettings.back())
+ {
+ throw Error(__PRETTY_FUNCTION__, "A channel settings pointer is NULL");
+ }
+ else
+ {
+ listOfChannelSettings.back()->setSnr(snrArray);
+ }
+ listOfChannelSettings.pop_back();
+ }
+ }
+ else
+ {
+ errno = EPROTO;
+ throw Error(__PRETTY_FUNCTION__, "Channel perturbation is disabled", errno);
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::activate_false_alarm (
+ const Network_Clock_Tick average_duration,
+ const float std_deviation)
+{
+ try
+ {
+ logFunction();
+
+ get_phy ()->activateFalseAlarm (
+ average_duration, std_deviation);
+ }
+ catchFunction (*this);
+}
+
+
+void
+Maximus::deactivate_false_alarm ()
+{
+ try
+ {
+ logFunction();
+
+ get_phy ()->deactivateFalseAlarm ();
+ }
+ catchFunction (*this);
+}
+
+bool
+Maximus::is_station_idle (Sci_Msg_Station_Id station_id)
+{
+ try
+ {
+ logFunction();
+ bool isIdle = false;
+
+ Station *p_station;
+ p_station = get_system ()->findStation (station_id);
+
+ if (p_station)
+ isIdle = p_station->is_idle ();
+
+ return isIdle;
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::hide_sta (
+ Station &sta1,
+ Station &sta2,
+ bool hidden)
+{
+ try
+ {
+ logFunction();
+
+ sta1.hideStation (sta2.getStationId (), hidden);
+ sta2.hideStation (sta1.getStationId (), hidden);
+ }
+ catchFunction (*this);
+}
+
+bool
+Maximus::readSnrFile (
+ const std::string & snr_file,
+ float snr_array[MAXIMUS_CHANNEL_INTERVAL_MAX_NB][PHY_CARRIER_NB + 1])
+{
+ logFunction();
+ bool bRead = true;
+
+ // Read file
+ //
+ memset(snr_array, '\0', MAXIMUS_CHANNEL_INTERVAL_MAX_NB * (PHY_CARRIER_NB + 1) * sizeof(float));
+ std::ifstream snrFile (snr_file.c_str(), std::ifstream::in);
+ if (snrFile.is_open())
+ {
+ /* Read end times (in ticks) of each interval of the beacon period. */
+ char c;
+ if (!zero_cross_frequency)
+ std::cerr << "Nice bug :" << __PRETTY_FUNCTION__ << std::endl;
+ float tempEndTimeOfLastInterval = (2 * 1000000) / (zero_cross_frequency);
+ unsigned short int endTimeOfLastInterval = (unsigned short int)tempEndTimeOfLastInterval;
+ unsigned short int numberOfIntervals = MAXIMUS_CHANNEL_INTERVAL_MAX_NB;
+ for (int i=0; i<MAXIMUS_CHANNEL_INTERVAL_MAX_NB; i++)
+ {
+ snrFile >> snr_array[i][0];
+ if (endTimeOfLastInterval <= snr_array[i][0])
+ {
+ snr_array[i][0] = endTimeOfLastInterval;
+ numberOfIntervals = i + 1;
+ break;
+ }
+ c = snrFile.peek();
+ while ( ('\t' == c) || (' ' == c) || (EOF == c) )
+ {
+ snrFile.ignore();
+ c = snrFile.peek();
+ }
+ if ('#' == c)
+ {
+ while ( ('\n' != c) && (EOF != c) )
+ {
+ snrFile.ignore();
+ c = snrFile.peek();
+ }
+ }
+ if ('\n' == c)
+ {
+ snrFile.ignore();
+ numberOfIntervals = i + 1;
+ if (endTimeOfLastInterval != snr_array[i][0])
+ {
+ if (MAXIMUS_CHANNEL_INTERVAL_MAX_NB > i+1)
+ {
+ snr_array[i+1][0] = endTimeOfLastInterval;
+ numberOfIntervals++;
+ }
+ else
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "Too many time intervals in SNR file", errno);
+ }
+ }
+ break;
+ }
+ }
+
+ /* Read SNR values (in dB) for each carrier. */
+ for (int j=1; j<=PHY_CARRIER_NB; j++)
+ {
+ for (int i=0; i<numberOfIntervals; i++)
+ {
+ snrFile >> snr_array[i][j];
+ }
+ c = snrFile.peek();
+ while ( ('\n' != c) && (EOF != c) )
+ {
+ snrFile.ignore();
+ c = snrFile.peek();
+ }
+ }
+ }
+ else
+ {
+ throw Error(__PRETTY_FUNCTION__, "Error while opening SNR file", errno);
+ }
+ snrFile.close();
+
+ return bRead;
+}
+
+void
+Maximus::error_detected ()
+{
+ stations_list_t::iterator it;
+ for (it = sta_list.begin (); it != sta_list.end (); ++it)
+ (*it)->kill_child_only ();
+
+ exit (EXIT_FAILURE);
+}
+
+void
+Maximus::stop ()
+{
+ try
+ {
+ logFunction ();
+
+ /* XXX: behavior bugged if sta_list isn't empty.
+ * Some python script don't delete station. */
+ stations_list_t::iterator it;
+ for (it = sta_list.begin (); it != sta_list.end (); ++it)
+ (*it)->kill_child_only ();
+ maximus_log (LOG_FATAL,
+ "*** Exit Fulminata Maximus simulator ***");
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::send_phy (bp::object mpdu)
+{
+ try
+ {
+ logFunction ();
+
+ int temp;
+
+ /* Extract MPDU object attributes. */
+ uint32_t fc_10 = bp::extract <uint32_t> (mpdu.attr( "fc_10"));
+
+ uint32_t fc_av[4];
+ for (int i=0; i<4; i++)
+ fc_av[i] = bp::extract <uint32_t> (mpdu.attr ("fc_av")[i]);
+
+ temp = bp::extract <int> (mpdu.attr ("fc_mode"));
+ Phy_Fc_Mode fc_mode = (Phy_Fc_Mode) temp;
+
+ std::string payload = bp::extract <std::string> (mpdu.attr("payload"));
+
+ temp = bp::extract <int> (mpdu.attr ("short_ppdu"));
+ Phy_Short_Ppdu phy_short_ppdu = (Phy_Short_Ppdu) temp;
+
+ Phy_Mod mod = PHY_MOD_NONE;
+
+ if (!phy_short_ppdu)
+ {
+ temp = bp::extract <int> (mpdu.attr ("mod"));
+ mod = (Phy_Mod) temp;
+ }
+
+ /*************
+ * XXX: TODO: Patch
+ */
+ if (mod == PHY_MOD_NONE)
+ {
+ if (payload.size () < MAC_PB136_BYTES)
+ mod = PHY_MOD_MINI_ROBO;
+ else
+ mod = PHY_MOD_ROBO;
+ }
+ /*************
+ * XXX: TODO: End of Patch
+ */
+
+ if (PHY_MOD_ROBO_NB < mod)
+ {
+ maximus_log (LOG_ERROR, "mod = " << mod);
+ errno = EINVAL;
+ throw Error (__PRETTY_FUNCTION__,
+ "invalid modulation",
+ errno);
+ }
+
+ /* Create phy message,
+ * which contains many SCI messages. */
+ MsgMpdu tx_mpdu (*get_phy ());
+
+ if (!tx_mpdu.setup_tx (fc_mode, fc_10, fc_av,
+ payload, phy_short_ppdu, mod))
+ {
+ errno = EINVAL;
+ throw Error (__PRETTY_FUNCTION__,
+ "Cannot setup all PhySciMsg",
+ errno);
+ }
+
+
+ /* Extract and set PB Header:
+ * Homeplug AV specification, chapter 4.4.2.1.1 (~ page 179)
+ *
+ * SSN = Segment Sequence Number (size 16 bits, offset bit 0)
+ * MFBO = Mac Frame Boundary Offset (size 9 bits, offset bit 16)
+ * MFBF = Mac Frame Boundary flag (size 1 bit, offset bit 27)
+ */
+ uint32_t pbHeader = bp::extract <uint32_t> (
+ mpdu.attr ("first_pb_header"));
+ if (0 != pbHeader)
+ {
+ unsigned short int mfboCounter = 1;
+ size_t mfbo = (size_t)
+ bp::extract <unsigned long> (
+ mpdu.attr ("mfbo")[mfboCounter]);
+
+ for (unsigned short int n = 0;
+ n < MAC_MAX_PB_PER_MPDU; n++)
+ {
+ if (0 != n)
+ {
+ while ((0 != mfbo)
+ && (mfbo < n * tx_mpdu.get_pbsize ()))
+ {
+ mfboCounter++;
+ mfbo = (size_t)
+ bp::extract <unsigned long> (
+ mpdu.attr("mfbo")[mfboCounter]);
+ }
+
+ if ((0 != mfbo)
+ && (mfbo < (n + 1) * tx_mpdu.get_pbsize ()))
+ {
+ /* MFBF flag set. */
+ pbHeader |= (1 << 27);
+ pbHeader += (mfbo % tx_mpdu.get_pbsize ()) << 16;
+ }
+ }
+
+ tx_mpdu.set_phy_PbHeader (n, pbHeader);
+
+ /* reset MFBF, MFBO, and increment SSN.
+ * overflow on ssn is wanted. */
+ uint16_t ssn = (uint16_t) pbHeader + 1;
+
+ /* XXX : MFBF is not reset !! bug ? */
+ pbHeader &= 0xF6000000;
+ pbHeader |= ssn;
+ }
+ }
+
+ tx_mpdu.schedule_tx ();
+
+ /* Synchronization. */
+ while (!tx_mpdu.get_is_sent ())
+ Maximus::process();
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_phy_rx (
+ bp::object user_cb,
+ bp::object create_pb_function)
+{
+ try
+ {
+ rx_cb = user_cb;
+ create_pb = create_pb_function;
+ rx_phy_activated = true;
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::send_ether (
+ bp::object msdu,
+ int station_id)
+{
+ try
+ {
+ logFunction();
+
+ /* Extract MSDU payload and set Ether SCI message payload length
+ * and Ether SCI message payload */
+ std::string payload =
+ bp::extract <std::string> ( msdu.attr ("get") ());
+ int fake =
+ bp::extract <int> (msdu.attr ("get_ether_type") ());
+ Ethernet_Type *type = (Ethernet_Type *) &fake;
+
+ if ((ETHERNET_TYPE_DATA == *type)
+ || (ETHERNET_TYPE_MME == *type))
+ {
+ /* Log the Ether SCI message to send. */
+ log_ether (payload.c_str (), payload.length ());
+ }
+
+ get_ether ()->sendEther (payload, *type, station_id);
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_ether_rx (
+ bp::object user_cb,
+ bp::object create_eth_function,
+ bp::object create_mme_function,
+ bp::object create_buffer_function)
+{
+ try
+ {
+ cb = user_cb;
+ rx_eth_activated = true;
+
+ if (!is_create_set)
+ {
+ create_eth = create_eth_function;
+ create_mme = create_mme_function;
+ create_buffer = create_buffer_function;
+ is_create_set = true;
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::set_ether_rx_catch_all (
+ bp::object user_cb,
+ bp::object create_eth_function,
+ bp::object create_mme_function,
+ bp::object create_buffer_function)
+{
+ try
+ {
+ catch_all_cb = user_cb;
+ catch_all_activated = true;
+ if (!is_create_set)
+ {
+ create_eth = create_eth_function;
+ create_mme = create_mme_function;
+ create_buffer = create_buffer_function;
+ is_create_set = true;
+ }
+ }
+ catchFunction (*this);
+}
+
+void
+Maximus::reset_ether_rx_catch_all ()
+{
+ catch_all_activated = false;
+}
+
+void
+Maximus::log_ether (
+ const char *pdata, int data_size)
+{
+ logFunction ();
+
+ if (-1 != etherLogFileDescriptor)
+ {
+ /* Write the Ether SCI message into the Ether log file. */
+ int length = 0;
+ int totalLength = 0;
+
+ while (totalLength < data_size)
+ {
+ length = write (etherLogFileDescriptor,
+ pdata + totalLength,
+ data_size - totalLength);
+ if(length < 0)
+ {
+ if (EAGAIN != errno)
+ {
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "write Ether SCI message failed",
+ errno);
+ }
+ else
+ {
+ length = 0;
+ }
+ }
+ totalLength += length;
+ }
+ }
+}
+
+void
+Maximus::recv_phy_mpdu_cb (
+ unsigned long fc_10,
+ unsigned long *fc_av,
+ PhySciMsg &msg)
+{
+ logFunction ();
+
+ if (!rx_phy_activated)
+ return;
+
+ unsigned char *data = msg.get_phy_data_addr ();
+ size_t size = msg.get_phy_data_size ();
+
+ std::string payload ((char *) data, size);
+
+ /* Create a new MPDU Python object (PB) */
+ bp::object rx_mpdu = create_pb();
+
+ rx_mpdu.attr ("set_mpdu_attr") (
+ fc_10,
+ bp::make_tuple (fc_av[0], fc_av[1],
+ fc_av[2], fc_av[3]),
+ payload);
+
+ /* Call the Python reception callback */
+ rx_phy_activated = !rx_cb (rx_mpdu);
+}
+
+void
+Maximus::recv_ether_cb (
+ char *pdata,
+ int data_length,
+ Ethernet_Type type,
+ Sci_Msg_Station_Id sta_id)
+{
+ logFunction();
+
+ if (ETHERNET_TYPE_DATA == type || ETHERNET_TYPE_MME == type)
+ {
+ /* Log the received Ether SCI message. */
+ log_ether (pdata, data_length);
+ }
+
+ if (rx_eth_activated
+ || catch_all_activated
+ || (ETHERNET_TYPE_BUFFER_RELEASED == type))
+ {
+ /* Get Ethernet SCI message attributes. */
+ std::string payload (pdata, data_length);
+
+ /* Create a new MSDU Python object (Eth, MME or Buffer). */
+ bp::object rx_msdu;
+
+ if (ETHERNET_TYPE_DATA == type)
+ rx_msdu = create_eth();
+ else if (ETHERNET_TYPE_MME == type)
+ rx_msdu = create_mme();
+ else if (ETHERNET_TYPE_BUFFER_RELEASED == type)
+ rx_msdu = create_buffer();
+ else
+ {
+ errno = ENOMSG;
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "receive an Ether SCI message with a bad type \
+ (should be DATA, MME or BUFFER_RELEASED)", errno);
+ }
+
+ if (ETHERNET_TYPE_BUFFER_RELEASED == type)
+ {
+ /* Reallocate a buffer if requested by user. */
+ rx_msdu.attr("realloc")(sta_id, payload);
+ }
+
+ /* Set the MSDU object attributes (payload). */
+ rx_msdu.attr("set_msdu_attr")(payload);
+
+ if ( (catch_all_activated)
+ && (ETHERNET_TYPE_BUFFER_RELEASED != type) )
+ {
+ /* Call the "catch all" Python reception callback before the other one,
+ * because of the reception counter that should not be decremented before this call. */
+ catch_all_cb (rx_msdu);
+ }
+
+ if (rx_eth_activated)
+ {
+ /* Call the Python reception callback. */
+ rx_eth_activated = !cb(rx_msdu);
+ }
+ }
+}
+
+FunctionCallProcessor *
+Maximus::get_functioncall () const
+{
+ return static_cast <FunctionCallProcessor *> (
+ p_processor[SCI_MSG_TYPE_FUNCTION_CALL]);
+}
+
+SystemProcessor *
+Maximus::get_system () const
+{
+ return static_cast <SystemProcessor *> (
+ p_processor[SCI_MSG_TYPE_SYSTEM]);
+}
+
+ClockProcessor *
+Maximus::get_networkclock () const
+{
+ return static_cast <ClockProcessor *> (
+ p_processor[SCI_MSG_TYPE_NETWORK_CLOCK]);
+}
+
+PhyProcessor *
+Maximus::get_phy () const
+{
+ return static_cast <PhyProcessor *> (
+ p_processor[SCI_MSG_TYPE_PHY]);
+}
+
+EthernetProcessor *
+Maximus::get_ether () const
+{
+ return static_cast <EthernetProcessor *> (
+ p_processor[SCI_MSG_TYPE_ETHERNET]);
+}
diff --git a/cesar/maximus/interface/station/Config b/cesar/maximus/interface/station/Config
new file mode 100644
index 0000000000..6476d146a0
--- /dev/null
+++ b/cesar/maximus/interface/station/Config
@@ -0,0 +1 @@
+CONFIG_INTERFACE_STATION_SOCKET = n
diff --git a/cesar/maximus/interface/station/Module b/cesar/maximus/interface/station/Module
new file mode 100644
index 0000000000..64471796a4
--- /dev/null
+++ b/cesar/maximus/interface/station/Module
@@ -0,0 +1 @@
+SOURCES := Station.cpp
diff --git a/cesar/maximus/interface/station/inc/Station.h b/cesar/maximus/interface/station/inc/Station.h
new file mode 100644
index 0000000000..9d75481ba2
--- /dev/null
+++ b/cesar/maximus/interface/station/inc/Station.h
@@ -0,0 +1,151 @@
+#ifndef maximus_interface_station_inc_station_h
+#define maximus_interface_station_inc_station_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/station/inc/Station.h
+ * \ingroup maximus_interface_station
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/interface/maximus.h"
+#include <string>
+#include <iostream>
+#include <set>
+
+#define STATION_PIPE_PATH "/tmp"
+#define STATION_PIPE_PREFIX "station"
+#define STATION_SOCK_PATH STATION_PIPE_PATH
+#define STATION_SOCK_PREFIX STATION_PIPE_PREFIX
+#define STATION_WAIT_LOOP_NB 10
+#define STATION_WAIT_TIMEOUT_MS 100
+#define STATION_MAX_SOCK_BUFFER_SIZE (256*1024)
+
+typedef std::set<Sci_Msg_Station_Id> HiddenStationsList;
+
+class Station
+{
+private:
+
+ Maximus &interface;
+ std::string executable;
+ std::string name;
+ File_Descriptor fd_sta2max;
+ File_Descriptor fd_max2sta;
+ File_Descriptor fd_log;
+ pid_t mPid;
+ Station_Status mStationStatus;
+ unsigned short int mStationIdleCounter;
+ HiddenStationsList mHiddenStationsList;
+
+public:
+
+ Station (
+ Maximus &ref1,
+ const std::string & station_executable,
+ const Network_Clock_Tick current_tick_value,
+ uint32_t seed = 0);
+
+ virtual ~Station ();
+
+ void kill_child_only ();
+
+ void deactivate ();
+
+ void activate ();
+
+ void displayStation () const;
+
+ void debug ();
+
+ void decrementStationIdleCounter ();
+
+ bool hideStation (
+ Sci_Msg_Station_Id station_id,
+ bool hidden);
+
+ inline Sci_Msg_Station_Id getStationId () const
+ {
+ return static_cast<Sci_Msg_Station_Id> (mPid);
+ }
+
+ inline const HiddenStationsList &getHiddenStationsList () const
+ {
+ return mHiddenStationsList;
+ }
+
+ inline pid_t getPid () const
+ {
+ return mPid;
+ }
+
+ inline void setStationStatus (Station_Status val)
+ {
+ mStationStatus = val;
+ }
+
+ inline unsigned short int getStationIdleCounter () const
+ {
+ return mStationIdleCounter;
+ }
+
+ inline void incrementStationIdleCounter ()
+ {
+ ++mStationIdleCounter;
+ }
+
+ inline File_Descriptor getInputFileDescriptor () const
+ {
+ return fd_sta2max;
+ }
+
+ inline File_Descriptor getOutputFileDescriptor () const
+ {
+ return fd_max2sta;
+ }
+
+ inline File_Descriptor getLogFileDescriptor () const
+ {
+ return fd_log;
+ }
+
+ inline Station_Status getStationStatus () const
+ {
+ return mStationStatus;
+ }
+
+ inline std::string get_station_name () const
+ {
+ return name;
+ }
+
+ bool is_idle () const;
+
+ void set_name (
+ const std::string &station_name);
+
+private:
+
+ void start_process (
+ const Network_Clock_Tick current_tick_value,
+ uint32_t seed = 0 );
+
+ void open_socket ();
+
+ void open_pipes ();
+
+ void open_log ();
+
+ void stop_process ();
+
+ void child_process (
+ const Network_Clock_Tick tick,
+ uint32_t seed);
+};
+
+#endif // maximus_interface_station_inc_station_h
diff --git a/cesar/maximus/interface/station/src/Station.cpp b/cesar/maximus/interface/station/src/Station.cpp
new file mode 100644
index 0000000000..9a00735833
--- /dev/null
+++ b/cesar/maximus/interface/station/src/Station.cpp
@@ -0,0 +1,395 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/station/src/Station.cpp
+ * \ingroup maximus_interface/station
+ *
+ */
+
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/processors/inc/SystemProcessor.h"
+#include "maximus/interface/inc/Maximus.h"
+#include "host/sci/maximus/inc/socket.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include "config/interface/station.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/signal.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <errno.h>
+#include <cstdlib>
+#include <sstream>
+
+Station::Station (Maximus &ref1,
+ const std::string &file,
+ const Network_Clock_Tick tick,
+ uint32_t seed):
+ interface (ref1),
+ executable (file),
+ name ("station"),
+ fd_sta2max (-1),
+ fd_max2sta (-1),
+ fd_log (-1),
+ mPid (0),
+ mStationStatus (MAXIMUS_STATION_STATUS_NONE),
+ /* Once a Station has been launched,
+ * Maximus has to wait for a system IDLE message. */
+ mStationIdleCounter (1)
+{
+ logFunction ();
+
+ start_process (tick, seed);
+}
+
+Station::~Station ()
+{
+ logFunction ();
+
+ interface.del_station (this);
+
+ if (mPid > 0)
+ {
+ kill (mPid, SIGTERM);
+ waitpid (mPid, NULL, 0);
+ }
+
+ if (fd_sta2max >= 0)
+ close (fd_sta2max);
+
+ if (fd_max2sta >= 0)
+ close (fd_max2sta);
+
+ if (fd_log >= 0)
+ close (fd_log);
+}
+
+void
+Station::kill_child_only ()
+{
+ if (mPid > 0)
+ {
+ kill (mPid, SIGTERM);
+ waitpid (mPid, NULL, 0);
+ }
+ mPid = 0;
+}
+
+void
+Station::deactivate ()
+{
+ logFunction ();
+ DEPRECATED_FCT ("will be delete soon");
+ setStationStatus (MAXIMUS_STATION_STATUS_DEACTIVATED);
+}
+
+void
+Station::activate ()
+{
+ logFunction ();
+ DEPRECATED_FCT ("will be delete soon");
+ setStationStatus (MAXIMUS_STATION_STATUS_IDLE);
+}
+
+bool
+Station::is_idle () const
+{
+ if (mStationStatus == MAXIMUS_STATION_STATUS_IDLE)
+ return true;
+
+ return false;
+}
+
+void
+Station::set_name (
+ const std::string &station_name)
+{
+ logFunction ();
+
+ while (!is_idle ())
+ interface.process ();
+
+ name = station_name;
+ interface.get_system ()->send_name (*this);
+}
+
+void
+Station::debug ()
+{
+ logFunction ();
+
+ const std::string default_cli =
+ "xterm -title '\"%n\" debug' -e gdb %e %p & sleep 1";
+ const std::string &user_cli = interface.get_debug_cli ();
+ std::string cli;
+ std::ostringstream oss;
+ size_t found;
+
+ /* Copy the default cli, or the personal user cli. */
+ if (user_cli.empty ())
+ cli = default_cli;
+ else
+ /* Examples of user cli :
+ * - "screen gdb -x .gdbinit.%n %e %p"
+ * - "false" */
+ cli = user_cli;
+
+ oss << mPid;
+ /* Command line interface option for debug are :
+ * - %n for station name
+ * - %e for executable filename
+ * - %p for station PID
+ */
+ while ((found = cli.find ("%n")) != std::string::npos)
+ cli.replace (found, 2, name);
+
+ while ((found = cli.find ("%e")) != std::string::npos)
+ cli.replace (found, 2, executable);
+
+ while ((found = cli.find ("%p")) != std::string::npos)
+ cli.replace (found, 2, oss.str ());
+
+ system (cli.c_str ());
+}
+
+void
+Station::decrementStationIdleCounter ()
+{
+ logFunction ();
+
+ if (0 < mStationIdleCounter)
+ mStationIdleCounter--;
+ else
+ maximus_log (
+ LOG_WARNING, "Station with id "
+ << std::dec << getStationId ()
+ << " (0x" << std::hex << getStationId ()
+ << ") is already IDLE");
+}
+
+bool
+Station::hideStation (
+ Sci_Msg_Station_Id station_id,
+ bool hidden)
+{
+ logFunction ();
+
+ if (hidden)
+ {
+ assert (mHiddenStationsList.max_size ()
+ > mHiddenStationsList.size ());
+
+ maximus_log (LOG_INFO, "Station " << station_id
+ << " hidden from Station "
+ << getStationId ());
+ mHiddenStationsList.insert (station_id);
+ }
+ else
+ {
+ mHiddenStationsList.erase (station_id);
+ maximus_log (LOG_INFO, "Station " << station_id
+ << " visible from Station "
+ << getStationId ());
+ }
+
+ return true;
+}
+
+void
+Station::start_process (
+ const Network_Clock_Tick current_tick_value,
+ uint32_t seed )
+{
+ logFunction ();
+
+ assert (!executable.empty ());
+
+ mPid = fork ();
+ if (mPid == 0)
+ child_process (current_tick_value, seed);
+
+ assert (mPid != -1);
+
+ if (CONFIG_INTERFACE_STATION_SOCKET)
+ open_socket ();
+ else
+ open_pipes ();
+
+ open_log ();
+}
+
+inline void
+Station::open_socket ()
+{
+ struct sockaddr_un sockaddr;
+ int bufsize = STATION_MAX_SOCK_BUFFER_SIZE;
+ int fd_status;
+ int open_status;
+ int loop;
+ std::ostringstream oss;
+
+ oss << STATION_SOCK_PATH
+ << "/" << STATION_SOCK_PREFIX
+ << "_sock_" << mPid;
+
+ /* Open the socket. */
+ fd_sta2max = socket (PF_UNIX, SOCK_STREAM, 0);
+
+ assert (fd_sta2max >= 0);
+
+ /* avoid other stations to inherit the socket. */
+ fd_status = fcntl (fd_sta2max, F_GETFD);
+ fcntl (fd_sta2max, F_SETFD, fd_status | FD_CLOEXEC);
+
+ /* extend send buffer size. */
+ open_status = setsockopt (fd_sta2max, SOL_SOCKET,
+ SO_SNDBUF, &bufsize, sizeof (bufsize));
+
+ assert (open_status >= 0);
+ sockaddr.sun_family = AF_UNIX;
+ strcpy (sockaddr.sun_path, oss.str ().c_str ());
+
+ for (loop = 0; loop < STATION_WAIT_LOOP_NB; loop++)
+ {
+ /* Connect to server. */
+ if ((connect (fd_sta2max,
+ (struct sockaddr *) &sockaddr,
+ sizeof(sockaddr))) >= 0)
+ {
+ break;
+ }
+ usleep(STATION_WAIT_TIMEOUT_MS * 1000);
+ }
+
+ assert (loop < STATION_WAIT_LOOP_NB);
+
+ fd_max2sta = fd_sta2max;
+}
+
+inline void
+Station::open_pipes ()
+{
+ int fd_status;
+ int loop;
+ std::ostringstream out, in;
+
+ in << STATION_PIPE_PATH
+ << "/" << STATION_PIPE_PREFIX
+ << "_out_" << mPid;
+ out << STATION_PIPE_PATH
+ << "/" << STATION_PIPE_PREFIX
+ << "_in_" << mPid;
+
+ for (loop = 0; loop < STATION_WAIT_LOOP_NB; loop++)
+ {
+ /* Connect to server. */
+ fd_sta2max = open (in.str ().c_str (),
+ O_RDONLY);
+ if (fd_sta2max >= 0)
+ break;
+ usleep (STATION_WAIT_TIMEOUT_MS * 1000);
+ }
+
+ assert (loop < STATION_WAIT_LOOP_NB);
+
+ /* avoid other stations to inherit the pipe. */
+ fd_status = fcntl(fd_sta2max, F_GETFD);
+ fcntl(fd_sta2max, F_SETFD, fd_status | FD_CLOEXEC);
+
+ /* Open output pipe. */
+ fd_max2sta = open (out.str ().c_str (),
+ O_WRONLY);
+ assert (fd_max2sta >= 0);
+
+ /* avoid other stations to inherit the pipe. */
+ fd_status = fcntl (fd_max2sta, F_GETFD);
+ fcntl (fd_max2sta, F_SETFD, fd_status | FD_CLOEXEC);
+}
+
+inline void
+Station::open_log ()
+{
+ std::ostringstream oss;
+ int fd_status;
+
+ /* Open log pipe. */
+ oss << STATION_PIPE_PATH
+ << "/" << STATION_PIPE_PREFIX
+ << "_log_" << mPid;
+
+ fd_log = open (oss.str ().c_str (),
+ O_RDONLY | O_NONBLOCK);
+ assert (fd_log >= 0);
+
+ /* avoid other stations to inherit the pipe. */
+ fd_status = fcntl (fd_log, F_GETFD);
+ fcntl (fd_log, F_SETFD, fd_status | FD_CLOEXEC);
+}
+
+inline void
+Station::child_process (
+ const Network_Clock_Tick tick,
+ uint32_t seed)
+{
+ static char time[32];
+ static char seed_str[16];
+ static char *pseed = NULL;
+
+ sprintf (time, "%llu", tick);
+
+ /* optional argument. */
+ if (seed)
+ {
+ sprintf (seed_str, "%u", seed);
+ pseed = seed_str;
+ }
+
+ int ret = execlp (
+ executable.c_str (),
+ executable.c_str (),
+ time, pseed, NULL);
+
+ /* Print error of 'execlp()'. */
+ if (-1 == ret)
+ {
+ Error e (__PRETTY_FUNCTION__,
+ "Cannot launch Station executable",
+ errno);
+ e.display ();
+ exit (EXIT_FAILURE);
+ }
+
+ exit (EXIT_SUCCESS);
+}
+
+void
+Station::displayStation () const
+{
+ maximus_log (
+ LOG_INFO,
+ "[input file descriptor = "
+ << std::dec << getInputFileDescriptor ()
+ << ", output file descriptor = "
+ << getOutputFileDescriptor()
+ << ", log file descriptor = "
+ << getLogFileDescriptor()
+ << ", process id = "
+ << getStationId ()
+ << " (0x"
+ << std::hex << getStationId () << ")"
+ << ", executable = "
+ << executable
+ << ", name = "
+ << name
+ << ", number of hidden stations = "
+ << getHiddenStationsList ().size ()
+ << "]");
+}
diff --git a/cesar/maximus/interface/station/station.h b/cesar/maximus/interface/station/station.h
new file mode 100644
index 0000000000..59745e235b
--- /dev/null
+++ b/cesar/maximus/interface/station/station.h
@@ -0,0 +1,21 @@
+#ifndef maximus_interface_station_station_h
+#define maximus_interface_station_station_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/interface/station/station.h
+ * \ingroup maximus_interface_station
+ *
+ */
+#include <list>
+
+class Station;
+
+typedef std::list <Station *> stations_list_t;
+
+#endif /* maximus_interface_station_station_h */
diff --git a/cesar/maximus/lib/test/Module b/cesar/maximus/lib/test/Module
new file mode 100644
index 0000000000..544508cfcd
--- /dev/null
+++ b/cesar/maximus/lib/test/Module
@@ -0,0 +1 @@
+SOURCES := main.cpp
diff --git a/cesar/maximus/lib/test/src/main.cpp b/cesar/maximus/lib/test/src/main.cpp
new file mode 100644
index 0000000000..23a4f93c90
--- /dev/null
+++ b/cesar/maximus/lib/test/src/main.cpp
@@ -0,0 +1,49 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/lib/test/src/main.c
+ * \ingroup maximus_lib_test
+ *
+ */
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/TestResult.h>
+#include <cppunit/TestResultCollector.h>
+#include <cppunit/TestRunner.h>
+#include "maximus/utils/inc/Error.h"
+
+int
+main (int argc, char *argv[])
+{
+ int returnValue;
+
+ try
+ {
+ CPPUNIT_NS :: TestResult testresult;
+ CPPUNIT_NS :: TestResultCollector collectedresults;
+ testresult.addListener (&collectedresults);
+
+ CPPUNIT_NS :: TestRunner testrunner;
+ testrunner.addTest (CPPUNIT_NS ::
+ TestFactoryRegistry ::
+ getRegistry ().makeTest ());
+ testrunner.run (testresult);
+ CPPUNIT_NS ::
+ CompilerOutputter
+ compileroutputter (&collectedresults, std::cerr);
+ compileroutputter.write ();
+
+ returnValue = collectedresults.wasSuccessful () ? 0 : 1;
+ }
+ catch ( Error &e )
+ {
+ e.display();
+ }
+
+ return returnValue;
+}
diff --git a/cesar/maximus/networkclock/Module b/cesar/maximus/networkclock/Module
deleted file mode 100644
index b164897ea3..0000000000
--- a/cesar/maximus/networkclock/Module
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES := ClockSciMsg.cpp NetworkClockEvt.cpp NetworkClockEvtList.cpp NetworkClockProcessor.cpp
-ifdef UNITTEST
-SOURCES += NetworkClockProcessorTest.cpp NetworkClockEvtListTest.cpp NetworkClockEvtTest.cpp
-endif
-HOST_INCLUDES += maximus/networkclock/inc
diff --git a/cesar/maximus/networkclock/inc/ClockSciMsg.h b/cesar/maximus/networkclock/inc/ClockSciMsg.h
deleted file mode 100644
index a404430591..0000000000
--- a/cesar/maximus/networkclock/inc/ClockSciMsg.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/************************************************************************
- ClockSciMsg.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/ClockSciMsg.h
-**************************************************************************/
-
-#ifndef CLOCKSCIMSG_H
-#define CLOCKSCIMSG_H
-
-#include "SciMsg.h"
-
-#include "networkclock_types.h"
-
-class INetworkClock;
-
-
-/**
- * class ClockSciMsg
- */
-
-class ClockSciMsg : public SciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- // Get from specialized SCI msg header
- //
- Network_Clock_Type mSpecializedSciMsgType;
- Network_Clock_Id mSpecializedSciMsgId;
- Network_Clock_Tick mSpecializedSciMsgTick;
-
- // Specialized SCI message header
- //
- Network_Clock_Header mSpecializedSciMsgHeader;
-
- INetworkClock * mpNetworkClockProcessor;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- ClockSciMsg ( INetworkClock * p_network_clock_processor );
-
- /**
- * Empty Destructor
- */
- virtual ~ClockSciMsg ( );
-
- // public methods
- //
-
- /**
- * @return SciMsg *
- */
- SciMsg * create ( ) const;
-
- /**
- * @return bool
- */
- bool dispatchMsg ( );
-
- /**
- * @return bool
- */
- bool identifySpecializedSciMsgHeader ( );
-
- /**
- * @return bool
- */
- bool checkCompatibility ( ) const;
-
- void displaySpecializedSciMsgHeader ( ) const;
-
- /**
- * Display the specialized SCI message type.
- */
- void displaySpecializedSciMsgType ( int log_level ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return mSpecializedSciMsgType
- */
- Network_Clock_Type getSpecializedSciMsgType ( ) const;
-
- /**
- * @return bool
- * @param type the new value of mSpecializedSciMsgType
- */
- bool setSpecializedSciMsgType ( const Network_Clock_Type type );
-
- /**
- * @return mSpecializedSciMsgId
- */
- Network_Clock_Id getSpecializedSciMsgId ( ) const;
-
- /**
- * @return bool
- * @param id the new value of mSpecializedSciMsgId
- */
- bool setSpecializedSciMsgId ( const Network_Clock_Id id );
-
- /**
- * @return mSpecializedSciMsgTick
- */
- Network_Clock_Tick getSpecializedSciMsgTick ( ) const;
-
- /**
- * @return bool
- * @param tick the new value of mSpecializedSciMsgTick
- */
- bool setSpecializedSciMsgTick ( const Network_Clock_Tick tick );
-
- /**
- * Set the value of mSpecializedSciMsgHeader.id
- * @return bool
- */
- bool setId ( const Network_Clock_Id id );
-
- /**
- * Set the value of mSpecializedSciMsgHeader.tick_high
- * @return bool
- */
- bool setTickHigh ( const uint32_t tick_high );
-
- /**
- * Set the value of mSpecializedSciMsgHeader.tick_low
- * @return bool
- */
- bool setTickLow ( const uint32_t tick_low );
-
- /**
- * Get the value of mSpecializedSciMsgHeader
- * @return the value of mSpecializedSciMsgHeader into a void pointer
- */
- void * returnSpecializedSciMsgHeader ( ) const;
-
- /**
- * @return mSpecializedSciMsgHeader
- */
- const Network_Clock_Header & getSpecializedSciMsgHeader ( ) const;
-
- /**
- * @return bool
- * @param specialized_sci_msg_header
- */
- bool setSpecializedSciMsgHeader ( const Network_Clock_Header & specialized_sci_msg_header );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( ) ;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // CLOCKSCIMSG_H
diff --git a/cesar/maximus/networkclock/inc/INetworkClock.h b/cesar/maximus/networkclock/inc/INetworkClock.h
deleted file mode 100644
index 9ec495a081..0000000000
--- a/cesar/maximus/networkclock/inc/INetworkClock.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/************************************************************************
- INetworkClock.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/INetworkClock.h
-**************************************************************************/
-
-#ifndef INETWORKCLOCK_H
-#define INETWORKCLOCK_H
-
-#include "networkclock_types.h"
-#include "sci_types.h"
-
-class NetworkClockEvt;
-
-
-/**
- * class INetworkClock
- */
-
-class INetworkClock
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- INetworkClock ( ) { }
-
- /**
- * Empty Destructor
- */
- virtual ~INetworkClock ( ) { }
-
- // public methods
- //
-
- /**
- * @param evt_to_send
- * @param tick_value
- */
- virtual void createEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_send ) = 0;
-
- /**
- * @return bool
- * @param evt_to_insert
- * @param tick_value
- */
- virtual bool insertEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert ) = 0;
-
- /**
- * @return bool
- * @param evt_to_remove
- * @param tick_value
- */
- virtual bool removeEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove ) = 0;
-
- /**
- * @return bool
- * @param station_id
- */
- virtual bool removeEvts ( const Sci_Msg_Station_Id station_id ) = 0;
-
- /**
- * @return bool
- */
- virtual bool processNextEvt ( const Network_Clock_Tick max_tick_value = 0 ) = 0;
-
- /**
- * @return Network_Clock_Tick
- */
- virtual Network_Clock_Tick getCurrentTickValue ( ) const = 0;
-
-};
-
-
-#endif // INETWORKCLOCK_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvt.h b/cesar/maximus/networkclock/inc/NetworkClockEvt.h
deleted file mode 100644
index 125e9333d5..0000000000
--- a/cesar/maximus/networkclock/inc/NetworkClockEvt.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/************************************************************************
- NetworkClockEvt.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/NetworkClockEvt.h
-**************************************************************************/
-
-#ifndef NETWORKCLOCKEVT_H
-#define NETWORKCLOCKEVT_H
-
-#include "networkclock_types.h"
-#include "phy_types.h"
-#include "sci_types.h"
-
-#include <iostream>
-#include <string>
-
-
-/**
- * class NetworkClockEvt
- */
-
-class NetworkClockEvt
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- Sci_Msg_Station_Id mStationId;
- Network_Clock_Type mNetworkClockType;
- Network_Clock_Id mNetworkClockId;
- void * mpData;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- NetworkClockEvt ( );
-
- /**
- * Constructor
- */
- NetworkClockEvt ( const Sci_Msg_Station_Id station_id,
- const Network_Clock_Type network_clock_type,
- const Network_Clock_Id id,
- const void * p_data = NULL );
-
- /**
- * Copy Constructors
- */
- NetworkClockEvt ( const NetworkClockEvt & evt );
-
- /**
- * Empty Destructor
- */
- virtual ~NetworkClockEvt ( );
-
- // public methods
- //
-
- bool operator== ( const NetworkClockEvt & evt ) const;
-
- NetworkClockEvt & operator= ( const NetworkClockEvt & evt );
-
- void displayEvt ( ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Set the value of mStationId
- * @return bool
- * @param station_id the new value of mStationId
- */
- bool setStationId ( const Sci_Msg_Station_Id station_id );
-
- /**
- * Get the value of mStationId
- * @return the value of mStationId
- */
- Sci_Msg_Station_Id getStationId ( ) const;
-
- /**
- * Set the value of mNetworkClockType
- * @return bool
- * @param type the new value of mNetworkClockType
- */
- bool setNetworkClockType ( const Network_Clock_Type type );
-
- /**
- * Get the value of mNetworkClockType
- * @return the value of mNetworkClockType
- */
- Network_Clock_Type getNetworkClockType ( ) const;
-
- /**
- * Set the value of mNetworkClockId
- * @return bool
- * @param id the new value of mNetworkClockId
- */
- bool setNetworkClockId ( const Network_Clock_Id id );
-
- /**
- * Get the value of mNetworkClockId
- * @return the value of mNetworkClockId
- */
- Network_Clock_Id getNetworkClockId ( ) const;
-
- /**
- * Set the value of mpData
- * @return bool
- * @param p_data the new value of mpData
- */
- bool setData ( const void * p_data );
-
- /**
- * Get the value of mpData
- * @return the value of mpData
- */
- void * getData ( ) const;
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( ) ;
-
- std::string displayNetworkClockType ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // NETWORKCLOCKEVT_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvtList.h b/cesar/maximus/networkclock/inc/NetworkClockEvtList.h
deleted file mode 100644
index 24c324e442..0000000000
--- a/cesar/maximus/networkclock/inc/NetworkClockEvtList.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/************************************************************************
- NetworkClockEvtList.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/NetworkClockEvtList.h
-**************************************************************************/
-
-#ifndef NETWORKCLOCKEVTLIST_H
-#define NETWORKCLOCKEVTLIST_H
-
-#include "networkclock_types.h"
-#include "sci_types.h"
-
-#include <map> // for 'multimap'
-
-class NetworkClockEvt;
-
-typedef std::multimap<const Network_Clock_Tick, const NetworkClockEvt> EvtsList;
-
-
-/**
- * class NetworkClockEvtList
- */
-
-class NetworkClockEvtList
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- EvtsList mListOfEvts;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- NetworkClockEvtList ( );
-
- /**
- * Empty Destructor
- */
- virtual ~NetworkClockEvtList ( );
-
- // public methods
- //
-
- /**
- * @return bool
- * @param tick_value
- * @param evt_to_insert
- */
- bool insertElement ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert );
-
- /**
- * @return bool
- * @param evt_to_remove
- */
- bool removeElement ( const NetworkClockEvt & evt_to_remove );
-
- /**
- * @return bool
- * @param tick_value
- * @param evt_to_remove
- */
- bool removeElement ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove );
-
- /**
- * @return bool
- * @param station_id
- */
- bool removeElement ( const Sci_Msg_Station_Id station_id );
-
- /**
- * @return bool
- * @param evt_to_add
- */
- bool addElement ( const NetworkClockEvt & evt_to_add );
-
- /**
- * @return bool
- * @param next_evt_to_process
- */
- bool getNextElement ( Network_Clock_Tick & tick_value, NetworkClockEvt * & p_next_evt_to_process );
-
- void displayListOfEvts ( ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Set the value of mListOfEvts
- * @param list_of_evts the new value of mListOfEvts
- */
- bool setListOfEvts ( EvtsList & list_of_evts );
-
- /**
- * Get the value of mListOfEvts
- * @return the value of mListOfEvts
- */
- EvtsList & getListOfEvts ( );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( ) ;
-
- void displayListOfEvts ( const Network_Clock_Tick tick_value ) const;
-
- /**
- * Remove elements whose key equals the input tick value
- * @return bool
- * @param tick_value
- */
- bool removePreviousElements ( const Network_Clock_Tick tick_value );
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // NETWORKCLOCKEVTLIST_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h b/cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h
deleted file mode 100644
index e8bea172e2..0000000000
--- a/cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#ifndef NETWORKCLOCKEVTLISTTEST_H
-#define NETWORKCLOCKEVTLISTTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class NetworkClockEvtList;
-class NetworkClockEvt;
-
-
-class NetworkClockEvtListTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (NetworkClockEvtListTest);
- CPPUNIT_TEST (insertElementTest);
- CPPUNIT_TEST (removeElementTest);
- CPPUNIT_TEST (getNextElementTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void insertElementTest (void);
- void removeElementTest (void);
- void getNextElementTest (void);
-
-private:
-
- NetworkClockEvtList * mpNetworkClockEvtList;
- NetworkClockEvt * mpNetworkClockEvt;
-
-};
-
-
-#endif // NETWORKCLOCKEVTLISTTEST_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvtTest.h b/cesar/maximus/networkclock/inc/NetworkClockEvtTest.h
deleted file mode 100644
index f56ab62781..0000000000
--- a/cesar/maximus/networkclock/inc/NetworkClockEvtTest.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef NETWORKCLOCKEVTTEST_H
-#define NETWORKCLOCKEVTTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class NetworkClockEvt;
-
-
-class NetworkClockEvtTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (NetworkClockEvtTest);
- CPPUNIT_TEST (simpleTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void simpleTest (void);
-
-private:
-
- NetworkClockEvt * mpNetworkClockEvt;
-
-};
-
-
-#endif // NETWORKCLOCKEVTTEST_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockProcessor.h b/cesar/maximus/networkclock/inc/NetworkClockProcessor.h
deleted file mode 100644
index d242105190..0000000000
--- a/cesar/maximus/networkclock/inc/NetworkClockProcessor.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/************************************************************************
- NetworkClockProcessor.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/NetworkClockProcessor.h
-**************************************************************************/
-
-#ifndef NETWORKCLOCKPROCESSOR_H
-#define NETWORKCLOCKPROCESSOR_H
-
-#include "INetworkClock.h"
-
-#include "networkclock_types.h"
-
-class NetworkClockEvtList;
-class NetworkClockEvt;
-class ClockSciMsg;
-class ISci;
-class ISystem;
-class IFunctionCall;
-class IPhy;
-class IEthernet;
-
-
-/**
- * class NetworkClockProcessor
- */
-
-class NetworkClockProcessor : public INetworkClock
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- Network_Clock_Tick mCurrentTickValue;
- NetworkClockEvtList * mpNetworkClockEvtList;
- ISci * mpSciServer;
- ISystem * mpSystemManager;
- IFunctionCall * mpFunctionCallManager;
- IPhy * mpPhyProcessor;
- IEthernet * mpEthernet;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- NetworkClockProcessor ( );
-
- /**
- * Constructor
- */
- NetworkClockProcessor ( ISci * p_sci_server,
- ISystem * p_system_manager,
- IFunctionCall * p_function_call_manager,
- IPhy * p_phy_processor,
- IEthernet * p_ethernet );
-
- /**
- * Empty Destructor
- */
- virtual ~NetworkClockProcessor ( );
-
- // public methods
- //
-
- /**
- * @param evt_to_send
- * @param tick_value
- */
- void createEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_send );
-
- /**
- * @return bool
- * @param evt_to_insert
- * @param tick_value
- */
- bool insertEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert );
-
- /**
- * @return bool
- * @param evt_to_remove
- * @param tick_value
- */
- bool removeEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove );
-
- /**
- * @return bool
- * @param station_id
- */
- bool removeEvts ( const Sci_Msg_Station_Id station_id );
-
- /**
- * @return bool
- */
- bool processNextEvt ( const Network_Clock_Tick max_tick_value = 0 );
-
- /**
- * @return bool
- * @param evt_to_process
- */
- bool processEvtNone ( NetworkClockEvt & evt_to_process );
-
- /**
- * @return bool
- * @param evt_to_process
- */
- bool processEvtRemove ( NetworkClockEvt & evt_to_process );
-
- /**
- * @return bool
- * @param evt_to_process
- */
- bool processEvtStation ( NetworkClockEvt & evt_to_process );
-
- /**
- * @return bool
- * @param evt_to_process
- */
- bool processEvtFunctionCall ( NetworkClockEvt & evt_to_process );
-
- /**
- * @return bool
- * @param evt_to_process
- */
- bool processEvtPhy ( NetworkClockEvt & evt_to_process );
-
- /**
- * @return bool
- * @param evt_to_process
- */
- bool processEvtSystem ( NetworkClockEvt & evt_to_process );
-
- /**
- * Processes an event of type ETHERNET.
- * @param evt_to_process
- * @return bool
- */
- bool processEvtEthernet ( NetworkClockEvt & evt_to_process );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return Network_Clock_Tick
- */
- Network_Clock_Tick getCurrentTickValue ( ) const;
-
- /**
- * @return bool
- */
- bool setCurrentTickValue ( const Network_Clock_Tick tick_value );
-
- /**
- * @return the value of mpNetworkClockEvtList
- */
- NetworkClockEvtList * getNetworkClockEvtList ( );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * @return bool
- * @param clock_sci_msg_to_send
- */
- bool sendEvtMsg ( ClockSciMsg & clock_sci_msg_to_send );
-
- void initAttributes ( ) ;
-
- void registerClockSciMsg ( );
-
- /**
- * Gets a pointer to the PHY processor.
- * @return IPhy *
- */
- IPhy * getPhy ( ) const;
-
- /**
- * Gets a pointer to Ethernet.
- * @return mpEthernet
- */
- IEthernet * getEthernet ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // NETWORKCLOCKPROCESSOR_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h b/cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h
deleted file mode 100644
index 1b9cb8227e..0000000000
--- a/cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-#ifndef NETWORKCLOCKPROCESSORTEST_H
-#define NETWORKCLOCKPROCESSORTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class NetworkClockProcessor;
-class SciServer;
-class SystemManager;
-class FunctionCallManager;
-class PhyProcessor;
-class IEthernet;
-
-
-class NetworkClockProcessorTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (NetworkClockProcessorTest);
- CPPUNIT_TEST (createEvtTest);
- CPPUNIT_TEST (removeEvtTest);
- CPPUNIT_TEST (removeEvtsTest);
- CPPUNIT_TEST (processNextEvtTest);
- CPPUNIT_TEST (processEvtNoneTest);
- CPPUNIT_TEST (processEvtRemoveTest);
- CPPUNIT_TEST (processEvtStationTest);
- CPPUNIT_TEST (processEvtFunctionCallTest);
- CPPUNIT_TEST (processEvtPhyTest);
- CPPUNIT_TEST (processEvtSystemTest);
- CPPUNIT_TEST (processEvtEthernetTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void createEvtTest (void);
- void removeEvtTest (void);
- void removeEvtsTest (void);
- void processNextEvtTest (void);
- void processEvtNoneTest (void);
- void processEvtRemoveTest (void);
- void processEvtStationTest (void);
- void processEvtFunctionCallTest (void);
- void processEvtPhyTest (void);
- void processEvtSystemTest (void);
- void processEvtEthernetTest (void);
-
-private:
-
- NetworkClockProcessor * mpNetworkClockProcessor;
- SciServer * mpSciServer;
- SystemManager * mpSystemManager;
- FunctionCallManager * mpFunctionCallManager;
- PhyProcessor * mpPhyProcessor;
- IEthernet * mpEthernet;
-
-};
-
-
-#endif // NETWORKCLOCKPROCESSORTEST_H
diff --git a/cesar/maximus/networkclock/src/ClockSciMsg.cpp b/cesar/maximus/networkclock/src/ClockSciMsg.cpp
deleted file mode 100644
index 2eaf62a59f..0000000000
--- a/cesar/maximus/networkclock/src/ClockSciMsg.cpp
+++ /dev/null
@@ -1,407 +0,0 @@
-/************************************************************************
- ClockSciMsg.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/src/ClockSciMsg.cpp
-**************************************************************************/
-
-#include "ClockSciMsg.h"
-
-#include "INetworkClock.h"
-#include "NetworkClockEvt.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'clog' and 'cerr'
-#include <netinet/in.h> // for 'ntohl()' and 'ntohs()'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-ClockSciMsg::ClockSciMsg ( INetworkClock * p_network_clock_processor ):
-mSpecializedSciMsgType(NETWORK_CLOCK_TYPE_NONE),
-mSpecializedSciMsgId(0),
-mSpecializedSciMsgTick(0),
-mpNetworkClockProcessor(NULL)
-{
- logFunction();
-
- initAttributes();
- if (NULL != p_network_clock_processor)
- {
- mpNetworkClockProcessor = p_network_clock_processor;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Network clock processor pointer is NULL", errno);
- }
-}
-
-
-void ClockSciMsg::initAttributes ( )
-{
- logFunction();
-
- mSpecializedSciMsgHeader.version = 0x00;
- mSpecializedSciMsgHeader.type = 0x00;
- mSpecializedSciMsgHeader.id = 0x0000;
- mSpecializedSciMsgHeader.flags = 0x0000;
- mSpecializedSciMsgHeader.reserved = 0x0000;
- mSpecializedSciMsgHeader.tick_high = 0x00000000;
- mSpecializedSciMsgHeader.tick_low = 0x00000000;
-}
-
-
-ClockSciMsg::~ClockSciMsg ( )
-{
- logFunction();
-
- if (NULL != mpNetworkClockProcessor)
- {
- mpNetworkClockProcessor = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-SciMsg * ClockSciMsg::create ( ) const
-{
- logFunction();
-
- return new ClockSciMsg (mpNetworkClockProcessor);
-}
-
-
-bool ClockSciMsg::dispatchMsg ( )
-{
- logFunction();
- bool bDispatch = false;
-
- if (NULL != mpNetworkClockProcessor)
- {
- // Create event to insert or remove
- //
- NetworkClockEvt evtToDispatch ( SciMsg::getSciMsgStationId(),
- getSpecializedSciMsgType(),
- getSpecializedSciMsgId() );
-
- // According to the clock SCI msg type, dispatch clock SCI msg
- //
- if ( NETWORK_CLOCK_TYPE_REMOVE == getSpecializedSciMsgType() )
- {
- bDispatch = mpNetworkClockProcessor->removeEvt (getSpecializedSciMsgTick(), evtToDispatch);
- }
- else
- {
- if ( (NETWORK_CLOCK_TYPE_NONE < getSpecializedSciMsgType())
- && (NETWORK_CLOCK_TYPE_NB > getSpecializedSciMsgType()) )
- {
- if (getSpecializedSciMsgTick() < mpNetworkClockProcessor->getCurrentTickValue())
- {
-#if CONFIG_LOG
- clog << logger(LOG_WARNING) << "cannot insert event in the past => do nothing" << endl;
-#endif /* CONFIG_LOG */
- }
- else
- {
- bDispatch = mpNetworkClockProcessor->insertEvt (getSpecializedSciMsgTick(), evtToDispatch);
- }
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_WARNING) << "bad event type => do nothing" << endl;
-#endif /* CONFIG_LOG */
- }
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Network clock processor pointer is NULL");
- }
-
- return bDispatch;
-}
-
-
-// When receiving a SCI msg, specialized SCI msg header has to be extracted from received SCI msg data
-//
-bool ClockSciMsg::identifySpecializedSciMsgHeader ( )
-{
- logFunction();
- bool bIdentifyHeader = false;
-
- if (NULL != SciMsg::getSciMsgData())
- {
- // Set specialized SCI msg header size
- //
- SciMsg::setSpecializedSciMsgHeaderSize((unsigned long)sizeof(struct Network_Clock_Header));
-
- // Get specialized SCI message header contents
- //
- if (SciMsg::getSciMsgDataLength() >= SciMsg::getSpecializedSciMsgHeaderSize()) // check that there are enough data to get the specialized SCI message header
- {
- mSpecializedSciMsgHeader = *((Network_Clock_Header*)SciMsg::getSciMsgData());
- mSpecializedSciMsgHeader.id = ntohs(getSpecializedSciMsgHeader().id);
- mSpecializedSciMsgHeader.flags = ntohs(getSpecializedSciMsgHeader().flags);
- mSpecializedSciMsgHeader.reserved = ntohs(getSpecializedSciMsgHeader().reserved);
- mSpecializedSciMsgHeader.tick_high = ntohl(getSpecializedSciMsgHeader().tick_high);
- mSpecializedSciMsgHeader.tick_low = ntohl(getSpecializedSciMsgHeader().tick_low);
-
- // Recompose tick value
- //
- uint64_t tempTickValue = (static_cast<uint64_t>(getSpecializedSciMsgHeader().tick_high)<<32) + static_cast<uint64_t>(getSpecializedSciMsgHeader().tick_low);
-
- // Set specialized SCI msg attributes from specialized SCI msg header
- //
- bIdentifyHeader = setSpecializedSciMsgType (static_cast<Network_Clock_Type>(getSpecializedSciMsgHeader().type));
- bIdentifyHeader &= setSpecializedSciMsgId (static_cast<Network_Clock_Id>(getSpecializedSciMsgHeader().id));
- bIdentifyHeader &= setSpecializedSciMsgTick (static_cast<Network_Clock_Tick>(tempTickValue));
-
- displaySpecializedSciMsgHeader();
- }
- else
- {
- errno = ENODATA;
- throw Error(__PRETTY_FUNCTION__, "Not enough data to get the specialized SCI message header", errno);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI message data pointer is NULL");
- }
-
- return bIdentifyHeader;
-}
-
-
-// Check specialized SCI msg compatibility (check specialized SCI msg version)
-//
-bool ClockSciMsg::checkCompatibility ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- if (NETWORK_CLOCK_VERSION == getSpecializedSciMsgHeader().version)
- {
- bCheck = SciMsg::checkCompatibility();
- }
-
- return bCheck;
-}
-
-
-void ClockSciMsg::displaySpecializedSciMsgHeader( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "clock SCI msg header = " << endl;
- clog << logger(LOG_INFO) << "\tversion = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().version) << endl;
- displaySpecializedSciMsgType(LOG_INFO);
- clog << logger(LOG_INFO) << "\tid = 0x" << setfill('0') << setw(4) << uppercase << hex << getSpecializedSciMsgHeader().id << endl;
- clog << logger(LOG_INFO) << "\tflags = 0x" << setfill('0') << setw(4) << uppercase << hex << getSpecializedSciMsgHeader().flags << endl;
- clog << logger(LOG_INFO) << "\treserved = 0x" << setfill('0') << setw(4) << uppercase << hex << getSpecializedSciMsgHeader().reserved << endl;
- clog << logger(LOG_INFO) << "\ttick = 0x" << setfill('0') << setw(8) << uppercase << hex << getSpecializedSciMsgHeader().tick_high \
- << setfill('0') << setw(8) << uppercase << hex << getSpecializedSciMsgHeader().tick_low << dec << endl;
-#endif /* CONFIG_LOG */
-}
-
-
-void ClockSciMsg::displaySpecializedSciMsgType ( int log_level ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- switch (getSpecializedSciMsgHeader().type)
- {
- case 0:
- clog << logger(log_level) << "\ttype = NETWORK_CLOCK_TYPE_NONE" << endl;
- break;
- case 1:
- clog << logger(log_level) << "\ttype = NETWORK_CLOCK_TYPE_REMOVE" << endl;
- break;
- case 2:
- clog << logger(log_level) << "\ttype = NETWORK_CLOCK_TYPE_STATION" << endl;
- break;
- case 3:
- clog << logger(log_level) << "\ttype = NETWORK_CLOCK_TYPE_FUNCTION_CALL" << endl;
- break;
- case 4:
- clog << logger(log_level) << "\ttype = NETWORK_CLOCK_TYPE_PHY" << endl;
- break;
- case 5:
- clog << logger(log_level) << "\ttype = NETWORK_CLOCK_TYPE_SYSTEM" << endl;
- break;
- default:
- clog << logger(log_level) << "\ttype = unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-Network_Clock_Type ClockSciMsg::getSpecializedSciMsgType ( ) const
-{
- return mSpecializedSciMsgType;
-}
-
-
-bool ClockSciMsg::setSpecializedSciMsgType ( const Network_Clock_Type type )
-{
- mSpecializedSciMsgType = type;
-
- return true;
-}
-
-
-Network_Clock_Id ClockSciMsg::getSpecializedSciMsgId ( ) const
-{
- return mSpecializedSciMsgId;
-}
-
-
-bool ClockSciMsg::setSpecializedSciMsgId ( const Network_Clock_Id id )
-{
- mSpecializedSciMsgId = id;
-
- return true;
-}
-
-
-Network_Clock_Tick ClockSciMsg::getSpecializedSciMsgTick ( ) const
-{
- return mSpecializedSciMsgTick;
-}
-
-
-bool ClockSciMsg::setSpecializedSciMsgTick ( const Network_Clock_Tick tick )
-{
- mSpecializedSciMsgTick = tick;
-
- return true;
-}
-
-
-bool ClockSciMsg::setId ( const Network_Clock_Id id )
-{
- mSpecializedSciMsgHeader.id = id;
-
- return true;
-}
-
-
-bool ClockSciMsg::setTickHigh ( const uint32_t tick_high )
-{
- mSpecializedSciMsgHeader.tick_high = tick_high;
-
- return true;
-}
-
-
-bool ClockSciMsg::setTickLow ( const uint32_t tick_low )
-{
- mSpecializedSciMsgHeader.tick_low = tick_low;
-
- return true;
-}
-
-
-void * ClockSciMsg::returnSpecializedSciMsgHeader ( ) const
-{
- return (void*)&mSpecializedSciMsgHeader;
-}
-
-
-const Network_Clock_Header & ClockSciMsg::getSpecializedSciMsgHeader ( ) const
-{
- return mSpecializedSciMsgHeader;
-}
-
-
-bool ClockSciMsg::setSpecializedSciMsgHeader ( const Network_Clock_Header & specialized_sci_msg_header )
-{
- logFunction();
- bool bSetHeader = false;
-
- mSpecializedSciMsgHeader = specialized_sci_msg_header;
-
- // Recompose tick value
- //
- uint64_t tempTickValue = (static_cast<uint64_t>(getSpecializedSciMsgHeader().tick_high)<<32) + static_cast<uint64_t>(getSpecializedSciMsgHeader().tick_low);
-
- // Set specialized SCI msg attributes from specialized SCI msg header
- //
- bSetHeader = setSpecializedSciMsgType (static_cast<Network_Clock_Type>(getSpecializedSciMsgHeader().type));
- bSetHeader &= setSpecializedSciMsgId (static_cast<Network_Clock_Id>(getSpecializedSciMsgHeader().id));
- bSetHeader &= setSpecializedSciMsgTick (static_cast<Network_Clock_Tick>(tempTickValue));
-
- displaySpecializedSciMsgHeader();
-
- return bSetHeader;
-}
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/networkclock/src/NetworkClockEvt.cpp b/cesar/maximus/networkclock/src/NetworkClockEvt.cpp
deleted file mode 100644
index 80dc1caa57..0000000000
--- a/cesar/maximus/networkclock/src/NetworkClockEvt.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-/************************************************************************
- NetworkClockEvt.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/src/NetworkClockEvt.cpp
-**************************************************************************/
-
-#include "NetworkClockEvt.h"
-
-#include "Station.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <cstring> // for 'strcpy()' and 'strcmp()'
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'clog' and 'cerr'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-NetworkClockEvt::NetworkClockEvt ( ):
-mStationId(0),
-mNetworkClockType(NETWORK_CLOCK_TYPE_NONE),
-mNetworkClockId(0),
-mpData(NULL)
-{
- logFunction();
-
- initAttributes();
-}
-
-NetworkClockEvt::NetworkClockEvt ( const Sci_Msg_Station_Id station_id,
- const Network_Clock_Type network_clock_type,
- const Network_Clock_Id id,
- const void * p_data )
-{
- logFunction();
-
- setStationId (station_id);
- setNetworkClockType (network_clock_type);
- setNetworkClockId (id);
- setData(p_data);
-
- initAttributes();
-}
-
-
-NetworkClockEvt::NetworkClockEvt ( const NetworkClockEvt & evt )
-{
- logFunction();
-
- setStationId (evt.getStationId());
- setNetworkClockType (evt.getNetworkClockType());
- setNetworkClockId (evt.getNetworkClockId());
- setData(evt.getData());
-
- initAttributes();
-}
-
-
-void NetworkClockEvt::initAttributes ( )
-{
- logFunction();
-}
-
-
-NetworkClockEvt::~NetworkClockEvt ( )
-{
- logFunction();
-
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "delete event: " << endl;
-#endif /* CONFIG_LOG */
- displayEvt();
-
- mpData = NULL;
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool NetworkClockEvt::operator== ( const NetworkClockEvt & evt ) const
-{
- logFunction();
- bool bOperator = false;
-
- if ( (getStationId() == evt.getStationId())
- && (getNetworkClockId() == evt.getNetworkClockId())
- && (getData() == evt.getData()) )
- {
- bOperator = true;
- }
-
- return bOperator;
-}
-
-
-NetworkClockEvt & NetworkClockEvt::operator= ( const NetworkClockEvt & evt )
-{
- logFunction();
-
- setStationId (evt.getStationId());
- setNetworkClockType (evt.getNetworkClockType());
- setNetworkClockId (evt.getNetworkClockId());
- setData(evt.getData());
-
- return *this;
-}
-
-
-void NetworkClockEvt::displayEvt ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "\t[station id = 0x" << setfill('0') << setw(4) << uppercase << hex << getStationId() \
- << ", network clock type = " << displayNetworkClockType() \
- << ", network clock id = 0x" << setfill('0') << setw(4) << uppercase << hex << getNetworkClockId() << "]" << dec << endl;
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-string NetworkClockEvt::displayNetworkClockType ( ) const
-{
- logFunction();
- string type;
-
- switch (getNetworkClockType())
- {
- case 0:
- type.assign("NETWORK_CLOCK_TYPE_NONE");
- break;
- case 1:
- type.assign("NETWORK_CLOCK_TYPE_REMOVE");
- break;
- case 2:
- type.assign("NETWORK_CLOCK_TYPE_STATION");
- break;
- case 3:
- type.assign("NETWORK_CLOCK_TYPE_FUNCTION_CALL");
- break;
- case 4:
- type.assign("NETWORK_CLOCK_TYPE_PHY");
- break;
- case 5:
- type.assign("NETWORK_CLOCK_TYPE_SYSTEM");
- break;
- default:
- type.assign("unknown");
- break;
- }
-
- return type;
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-bool NetworkClockEvt::setStationId ( const Sci_Msg_Station_Id station_id )
-{
- mStationId = station_id;
-
- return true;
-}
-
-
-Sci_Msg_Station_Id NetworkClockEvt::getStationId ( ) const
-{
- return mStationId;
-}
-
-
-bool NetworkClockEvt::setNetworkClockType ( const Network_Clock_Type type )
-{
- mNetworkClockType = type;
-
- return true;
-}
-
-
-Network_Clock_Type NetworkClockEvt::getNetworkClockType ( ) const
-{
- return mNetworkClockType;
-}
-
-
-bool NetworkClockEvt::setNetworkClockId ( const Network_Clock_Id id )
-{
- mNetworkClockId = id;
-
- return true;
-}
-
-
-Network_Clock_Id NetworkClockEvt::getNetworkClockId ( ) const
-{
- return mNetworkClockId;
-}
-
-
-bool NetworkClockEvt::setData ( const void * p_data )
-{
- mpData = const_cast<void *>(p_data);
-
- return true;
-}
-
-
-void * NetworkClockEvt::getData ( ) const
-{
- return mpData;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/networkclock/src/NetworkClockEvtList.cpp b/cesar/maximus/networkclock/src/NetworkClockEvtList.cpp
deleted file mode 100644
index b214b0c600..0000000000
--- a/cesar/maximus/networkclock/src/NetworkClockEvtList.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-/************************************************************************
- NetworkClockEvtList.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/src/NetworkClockEvtList.cpp
-**************************************************************************/
-
-#include "NetworkClockEvtList.h"
-
-#include "NetworkClockEvt.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-NetworkClockEvtList::NetworkClockEvtList ( )
-{
- logFunction();
-
- initAttributes();
-}
-
-
-void NetworkClockEvtList::initAttributes ( )
-{
- logFunction();
-}
-
-
-NetworkClockEvtList::~NetworkClockEvtList ( )
-{
- logFunction();
-
- mListOfEvts.clear();
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool NetworkClockEvtList::insertElement ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert )
-{
- logFunction();
- bool bInsert = false;
-
- // If the event to insert already exists in the list, it is an update
- // 1. Remove this event from the list
- //
- if (removeElement(evt_to_insert))
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "update tick at which the event has to be processed" << endl;
-#endif /* CONFIG_LOG */
- }
-
- // 2. Insert the event at the required tick
- //
- mListOfEvts.insert(EvtsList::value_type(tick_value, evt_to_insert)); // return EvtsList::iterator
- displayListOfEvts (tick_value);
- bInsert = true;
-
- return bInsert;
-}
-
-
-bool NetworkClockEvtList::removeElement ( const NetworkClockEvt & evt_to_remove )
-{
- logFunction();
- bool bRemove = false;
-
- for (EvtsList::iterator it = mListOfEvts.begin(); it != mListOfEvts.end(); ++it)
- {
- if ( evt_to_remove == it->second )
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "remove element at tick " << it->first << ": " << endl;
-#endif /* CONFIG_LOG */
- it->second.displayEvt();
- mListOfEvts.erase(it);
- bRemove = true;
- break;
- }
- }
- displayListOfEvts();
-
- return bRemove;
-}
-
-
-bool NetworkClockEvtList::removeElement ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove )
-{
- logFunction();
- bool bRemove = false;
-
- pair<EvtsList::iterator, EvtsList::iterator> evtsToRemove = mListOfEvts.equal_range(tick_value);
-
- for (EvtsList::iterator it = evtsToRemove.first; it != evtsToRemove.second; ++it)
- {
- if ( evt_to_remove == it->second )
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "remove element at tick " << tick_value << ": " << endl;
-#endif /* CONFIG_LOG */
- it->second.displayEvt();
- mListOfEvts.erase(it);
- bRemove = true;
- break;
- }
- }
- displayListOfEvts();
-
- return bRemove;
-}
-
-
-bool NetworkClockEvtList::removeElement ( const Sci_Msg_Station_Id station_id )
-{
- logFunction();
- bool bRemove = false;
-
- EvtsList::iterator pos;
- for (EvtsList::iterator it = mListOfEvts.begin(); it != mListOfEvts.end();)
- {
- pos = it;
- ++it;
- if (station_id == pos->second.getStationId())
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "remove element at tick " << pos->first << ": " << endl;
-#endif /* CONFIG_LOG */
- pos->second.displayEvt();
- mListOfEvts.erase(pos);
- bRemove = true;
- }
- }
- displayListOfEvts();
-
- return bRemove;
-}
-
-
-bool NetworkClockEvtList::addElement ( const NetworkClockEvt & evt_to_add )
-{
- return false;
-}
-
-
-// Return true while there are events to process at current tick, else return false
-// Return true if there is an event to process in the network clock event list
-// Return false if the network clock event list is empty
-//
-bool NetworkClockEvtList::getNextElement ( Network_Clock_Tick & tick_value, NetworkClockEvt * & p_next_evt_to_process )
-{
- logFunction();
- bool bGet = false;
-
- if (!mListOfEvts.empty())
- {
- EvtsList::iterator evtIterator;
-
- if (0 != mListOfEvts.count(tick_value))
- {
- /* Finds an element whose key is tick_value. */
- evtIterator = mListOfEvts.find (tick_value);
- }
- else
- {
- /* Finds the first element whose key strictly greater than tick_value. */
- evtIterator = mListOfEvts.upper_bound (tick_value);
- }
-
- // update current tick value
- tick_value = evtIterator->first;
-
- // set next event to process
- p_next_evt_to_process = const_cast<NetworkClockEvt *>(&(evtIterator->second));
-
- bGet = true;
- }
-
- return bGet;
-}
-
-
-void NetworkClockEvtList::displayListOfEvts ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "list of events = " << endl;
-
- if (!mListOfEvts.empty())
- {
- for (EvtsList::const_iterator it = mListOfEvts.begin(); it != mListOfEvts.end(); ++it)
- {
- clog << logger(LOG_INFO) << "\tat tick " << it->first << ": " << endl;
- const_cast<NetworkClockEvt&>(it->second).displayEvt();
- }
- }
- else
- {
- clog << logger(LOG_INFO) << "\tempty!" << endl;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-bool NetworkClockEvtList::removePreviousElements ( const Network_Clock_Tick tick_value )
-{
- logFunction();
- bool bRemove = false;
-
- if (!mListOfEvts.empty())
- {
-#if CONFIG_LOG
- EvtsList::size_type numberOfEvts = 0;
- numberOfEvts = mListOfEvts.erase(tick_value);
- clog << logger(LOG_INFO) << "remove " << numberOfEvts << " element(s)" << endl;
-#endif /* CONFIG_LOG */
-
- displayListOfEvts();
- bRemove = true;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "no elements to remove!" << endl;
-#endif /* CONFIG_LOG */
- }
-
- return bRemove;
-}
-
-
-void NetworkClockEvtList::displayListOfEvts ( const Network_Clock_Tick tick_value ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- if (!mListOfEvts.empty())
- {
- clog << logger(LOG_INFO) << "number of elements at tick " << tick_value << ": " << mListOfEvts.count(tick_value) << endl;
- }
- else
- {
- clog << logger(LOG_INFO) << "list of events = empty!" << endl;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// protected attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-bool NetworkClockEvtList::setListOfEvts ( EvtsList & list_of_evts )
-{
- logFunction();
-
- mListOfEvts = list_of_evts;
- displayListOfEvts();
-
- return true;
-}
-
-
-EvtsList & NetworkClockEvtList::getListOfEvts ( )
-{
- return mListOfEvts;
-}
-
diff --git a/cesar/maximus/networkclock/src/NetworkClockEvtListTest.cpp b/cesar/maximus/networkclock/src/NetworkClockEvtListTest.cpp
deleted file mode 100644
index ea0326b294..0000000000
--- a/cesar/maximus/networkclock/src/NetworkClockEvtListTest.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-
-#include "NetworkClockEvtListTest.h"
-
-#include "NetworkClockEvt.h"
-#include "NetworkClockEvtList.h"
-
-#include "networkclock_types.h"
-
-#include "Logger.h"
-
-#include <string>
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (NetworkClockEvtListTest);
-
-
-void NetworkClockEvtListTest::setUp (void)
-{
- logTest();
-
- mpNetworkClockEvtList = new NetworkClockEvtList ();
-}
-
-
-void NetworkClockEvtListTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpNetworkClockEvtList)
- {
- delete (mpNetworkClockEvtList);
- mpNetworkClockEvtList = NULL;
- }
-}
-
-
-void NetworkClockEvtListTest::insertElementTest (void)
-{
- logTest();
-
- NetworkClockEvt evt;
-
- CPPUNIT_ASSERT_MESSAGE ( "setNetworkClockId failed",
- evt.setNetworkClockId(123) );
-
- CPPUNIT_ASSERT_MESSAGE ( "insertElement failed",
- mpNetworkClockEvtList->insertElement (1, evt) );
-
- mpNetworkClockEvtList->displayListOfEvts();
-}
-
-
-void NetworkClockEvtListTest::removeElementTest (void)
-{
- logTest();
-
- // Insert Event 1
- //
- NetworkClockEvt evt1;
-
- CPPUNIT_ASSERT_MESSAGE ( "setNetworkClockId failed",
- evt1.setNetworkClockId(1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "setNetworkClockId failed",
- evt1.setStationId(11000) );
-
- CPPUNIT_ASSERT_MESSAGE ( "insertElement failed",
- mpNetworkClockEvtList->insertElement (2, evt1) );
-
- // Insert Event 2
- //
- NetworkClockEvt evt2;
- evt2.setNetworkClockId(2);
- evt2.setStationId(12000);
- mpNetworkClockEvtList->insertElement (3, evt2);
-
- // Insert Event 3
- //
- NetworkClockEvt evt3;
- evt3.setNetworkClockId(3);
- evt3.setStationId(13000);
- mpNetworkClockEvtList->insertElement (65, evt3);
-
- // Insert Event 4
- //
- NetworkClockEvt evt4;
- evt4.setNetworkClockId(4);
- evt4.setStationId(14000);
- mpNetworkClockEvtList->insertElement (5, evt4);
-
- // Insert Event 5
- //
- NetworkClockEvt evt5;
- evt5.setNetworkClockId(5);
- evt5.setStationId(15000);
- mpNetworkClockEvtList->insertElement (687, evt5);
-
- // Insert Event 6
- //
- NetworkClockEvt evt6;
- evt6.setNetworkClockId(6);
- evt6.setStationId(14000);
- mpNetworkClockEvtList->insertElement (98726, evt6);
-
- // Insert Event 7
- //
- NetworkClockEvt evt7;
- evt7.setNetworkClockId(7);
- evt7.setStationId(13000);
- mpNetworkClockEvtList->insertElement (0, evt7);
-
- // Insert Event 8
- //
- NetworkClockEvt evt8;
- evt8.setNetworkClockId(8);
- evt8.setStationId(12000);
- mpNetworkClockEvtList->insertElement (1, evt8);
-
- // Insert Event 9
- //
- NetworkClockEvt evt9;
- evt9.setNetworkClockId(9);
- evt9.setStationId(11000);
- mpNetworkClockEvtList->insertElement (68, evt9);
-
- // Insert Event 10
- //
- NetworkClockEvt evt10;
- evt10.setNetworkClockId(10);
- evt10.setStationId(12000);
- mpNetworkClockEvtList->insertElement (2, evt10);
-
- // Update Event 7
- //
- NetworkClockEvt evt7bis (evt7);
- mpNetworkClockEvtList->insertElement (7, evt7bis);
-
- CPPUNIT_ASSERT_MESSAGE ( "removeElement failed",
- mpNetworkClockEvtList->removeElement (2, evt1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "removeElement failed",
- mpNetworkClockEvtList->removeElement(11000) );
-
- mpNetworkClockEvtList->displayListOfEvts();
-}
-
-
-void NetworkClockEvtListTest::getNextElementTest (void)
-{
- logTest();
-
- Network_Clock_Tick tickValue = 0;
- NetworkClockEvt * pEvt = NULL;
-
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- !mpNetworkClockEvtList->getNextElement (tickValue, pEvt)
- && (NULL == pEvt) );
-
- // Insert Event 1
- //
- NetworkClockEvt evt1;
- evt1.setNetworkClockId(1);
-
- CPPUNIT_ASSERT_MESSAGE ( "insertElement failed",
- mpNetworkClockEvtList->insertElement (0, evt1) );
-
- // Insert Event 2
- //
- NetworkClockEvt evt2;
- evt2.setNetworkClockId(2);
- mpNetworkClockEvtList->insertElement (3524, evt2);
-
- // Insert Event 3
- //
- NetworkClockEvt evt3;
- evt3.setNetworkClockId(3);
- mpNetworkClockEvtList->insertElement (6457, evt3);
-
- // Insert Event 4
- //
- NetworkClockEvt evt4;
- evt4.setNetworkClockId(4);
- mpNetworkClockEvtList->insertElement (111, evt4);
-
- // Insert Event 5
- //
- NetworkClockEvt evt5;
- evt5.setNetworkClockId(5);
- mpNetworkClockEvtList->insertElement (111, evt5);
-
- mpNetworkClockEvtList->displayListOfEvts();
-
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- mpNetworkClockEvtList->getNextElement (tickValue, pEvt)
- && (NULL != pEvt)
- && (evt1 == *pEvt)
- && mpNetworkClockEvtList->removeElement (tickValue, *pEvt) ); // remove event 1
-
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- (mpNetworkClockEvtList->getNextElement (tickValue, pEvt))
- && (NULL != pEvt)
- && (evt4 == *pEvt)
- && mpNetworkClockEvtList->removeElement (tickValue, *pEvt) ); // remove event 4
-
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- (mpNetworkClockEvtList->getNextElement (tickValue, pEvt))
- && (NULL != pEvt)
- && (evt5 == *pEvt)
- && mpNetworkClockEvtList->removeElement (tickValue, *pEvt) ); // remove event 5
-
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- mpNetworkClockEvtList->getNextElement (tickValue, pEvt)
- && (NULL != pEvt)
- && (evt2 == *pEvt)
- && mpNetworkClockEvtList->removeElement (tickValue, *pEvt) ); // remove event 2
-
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- mpNetworkClockEvtList->getNextElement (tickValue, pEvt)
- && (NULL != pEvt)
- && (evt3 == *pEvt)
- && mpNetworkClockEvtList->removeElement (tickValue, *pEvt) ); // remove event 3
-
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- !mpNetworkClockEvtList->getNextElement (tickValue, pEvt) );
-
- /* Test several events at same tick, removing them or not from the list,
- and check order of processing events. */
- mpNetworkClockEvtList->insertElement (666, evt3);
- mpNetworkClockEvtList->insertElement (666, evt4);
- mpNetworkClockEvtList->insertElement (666, evt5);
- mpNetworkClockEvtList->insertElement (666, evt1);
- mpNetworkClockEvtList->insertElement (666, evt2);
- tickValue = 665;
- for (int i=0; i<10; i++)
- {
- pEvt = NULL;
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- mpNetworkClockEvtList->getNextElement (tickValue, pEvt)
- && (NULL != pEvt)
- && (666 == tickValue)
- && (evt3 == *pEvt) ); // do not remove event 3
- }
- mpNetworkClockEvtList->removeElement (tickValue, *pEvt); // remove event 3
- for (int i=0; i<5; i++)
- {
- pEvt = NULL;
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- mpNetworkClockEvtList->getNextElement (tickValue, pEvt)
- && (NULL != pEvt)
- && (666 == tickValue)
- && (evt4 == *pEvt) ); // do not remove event 4
- }
- mpNetworkClockEvtList->removeElement (evt4); // remove event 4
- mpNetworkClockEvtList->removeElement (evt5); // remove event 5
- mpNetworkClockEvtList->removeElement (evt1); // remove event 1
- mpNetworkClockEvtList->removeElement (evt2); // remove event 2
- CPPUNIT_ASSERT_MESSAGE ( "getNextElement failed",
- !mpNetworkClockEvtList->getNextElement (tickValue, pEvt) );
-}
-
diff --git a/cesar/maximus/networkclock/src/NetworkClockEvtTest.cpp b/cesar/maximus/networkclock/src/NetworkClockEvtTest.cpp
deleted file mode 100644
index c3f88ba25a..0000000000
--- a/cesar/maximus/networkclock/src/NetworkClockEvtTest.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-
-#include "NetworkClockEvtTest.h"
-
-#include "NetworkClockEvt.h"
-
-#include "networkclock_types.h"
-
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (NetworkClockEvtTest);
-
-
-void NetworkClockEvtTest::setUp (void)
-{
- logTest();
-
- mpNetworkClockEvt = new NetworkClockEvt ();
-}
-
-
-void NetworkClockEvtTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpNetworkClockEvt)
- {
- delete (mpNetworkClockEvt);
- mpNetworkClockEvt = NULL;
- }
-}
-
-
-void NetworkClockEvtTest::simpleTest (void)
-{
- logTest();
-
- if (NULL == mpNetworkClockEvt)
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockEvt pointer is NULL" );
- }
-}
-
diff --git a/cesar/maximus/networkclock/src/NetworkClockProcessor.cpp b/cesar/maximus/networkclock/src/NetworkClockProcessor.cpp
deleted file mode 100644
index 0c1ee37915..0000000000
--- a/cesar/maximus/networkclock/src/NetworkClockProcessor.cpp
+++ /dev/null
@@ -1,537 +0,0 @@
-/************************************************************************
- NetworkClockProcessor.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/networkclock/src/NetworkClockProcessor.cpp
-**************************************************************************/
-
-#include "NetworkClockProcessor.h"
-
-#include "NetworkClockEvtList.h"
-#include "NetworkClockEvt.h"
-#include "ClockSciMsg.h"
-#include "ISci.h"
-#include "ISystem.h"
-#include "IFunctionCall.h"
-#include "IPhy.h"
-#include "IEthernet.h"
-
-#include "sci_types.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <netinet/in.h> // for 'htonl()' and 'htons()'
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-// For the 'processNextEvt' function
-//
-#define callMemberFunction(object, pMember) (object.*(pMember))
-typedef bool (NetworkClockProcessor::*memberFunction)(NetworkClockEvt&);
-memberFunction arrayProcess[NETWORK_CLOCK_TYPE_NB] = { &NetworkClockProcessor::processEvtNone,
- &NetworkClockProcessor::processEvtRemove,
- &NetworkClockProcessor::processEvtStation,
- &NetworkClockProcessor::processEvtFunctionCall,
- &NetworkClockProcessor::processEvtPhy,
- &NetworkClockProcessor::processEvtSystem,
- &NetworkClockProcessor::processEvtEthernet };
-
-
-// Constructors/Destructors
-//
-
-
-NetworkClockProcessor::NetworkClockProcessor ( ):
-mCurrentTickValue(0),
-mpNetworkClockEvtList(NULL),
-mpSciServer(NULL),
-mpSystemManager(NULL),
-mpFunctionCallManager(NULL),
-mpPhyProcessor(NULL),
-mpEthernet(NULL)
-{
- logFunction();
-
- initAttributes ();
-}
-
-
-NetworkClockProcessor::NetworkClockProcessor ( ISci * p_sci_server,
- ISystem * p_system_manager,
- IFunctionCall * p_function_call_manager,
- IPhy * p_phy_processor,
- IEthernet * p_ethernet ):
-mCurrentTickValue(0),
-mpNetworkClockEvtList(NULL)
-{
- logFunction();
-
- if ( (NULL != p_sci_server)
- && (NULL != p_system_manager)
- && (NULL != p_function_call_manager)
- && (NULL != p_phy_processor)
- && (NULL != p_ethernet) )
- {
- mpSciServer = p_sci_server;
- mpSystemManager = p_system_manager;
- mpFunctionCallManager = p_function_call_manager;
- mpPhyProcessor = p_phy_processor;
- mpEthernet = p_ethernet;
-
- registerClockSciMsg ();
- mpPhyProcessor->setNetworkClock(this);
- mpSystemManager->setNetworkClock(this);
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "A pointer is NULL", errno);
- }
- initAttributes ();
-}
-
-
-void NetworkClockProcessor::initAttributes ( )
-{
- logFunction();
-
- mpNetworkClockEvtList = new NetworkClockEvtList ();
- if (NULL == mpNetworkClockEvtList)
- {
- throw Error(__PRETTY_FUNCTION__, "Network clock event list pointer is NULL");
- }
-}
-
-
-NetworkClockProcessor::~NetworkClockProcessor ( )
-{
- logFunction();
-
- if (NULL != mpNetworkClockEvtList)
- {
- delete (mpNetworkClockEvtList);
- mpNetworkClockEvtList = NULL;
- }
- if (NULL != mpSciServer)
- {
- mpSciServer = NULL;
- }
- if (NULL != mpSystemManager)
- {
- mpSystemManager = NULL;
- }
- if (NULL != mpFunctionCallManager)
- {
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpPhyProcessor)
- {
- mpPhyProcessor = NULL;
- }
- if (NULL != mpEthernet)
- {
- mpEthernet = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-void NetworkClockProcessor::createEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_send )
-{
- logFunction();
-
- if ( !insertEvt (tick_value, evt_to_send) )
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "cannot insert event!" << endl;
-#endif /* CONFIG_LOG */
- }
-}
-
-
-bool NetworkClockProcessor::insertEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert )
-{
- logFunction();
- bool bInsert = false;
-
- if (NULL != mpNetworkClockEvtList)
- {
- if ( mpNetworkClockEvtList->insertElement (tick_value, evt_to_insert) )
- {
- bInsert = true;
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Network clock event list pointer is NULL");
- }
-
- return bInsert;
-}
-
-
-bool NetworkClockProcessor::removeEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove )
-{
- logFunction();
- bool bRemove = false;
-
- if (NULL != mpNetworkClockEvtList)
- {
- if ( mpNetworkClockEvtList->removeElement (tick_value, evt_to_remove) )
- {
- bRemove = true;
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Network clock event list pointer is NULL");
- }
-
- return bRemove;
-}
-
-
-bool NetworkClockProcessor::removeEvts ( const Sci_Msg_Station_Id station_id )
-{
- logFunction();
-
- if (NULL == mpNetworkClockEvtList)
- {
- throw Error(__PRETTY_FUNCTION__, "Network clock event list pointer is NULL");
- }
-
- return mpNetworkClockEvtList->removeElement(station_id);
-}
-
-
-bool NetworkClockProcessor::processNextEvt ( const Network_Clock_Tick max_tick_value )
-{
- logFunction();
- bool bProcess = true;
-
- /* If all stations are IDLE,
- * get and process events at the current tick in the NetworkClockEvtList.
- * If max tick value is reached, return false. */
-
- if ( (NULL != mpNetworkClockEvtList) && (NULL != mpSystemManager) )
- {
- if (mpSystemManager->areAllActiveStationsIdle())
- {
- NetworkClockEvt * pEvtToProcess = NULL;
- Network_Clock_Tick currentTickValue = getCurrentTickValue();
-
- // If an event has been get, update tick and process evt
- //
- if (mpNetworkClockEvtList->getNextElement(currentTickValue, pEvtToProcess))
- {
- if (NULL == pEvtToProcess)
- {
- throw Error(__PRETTY_FUNCTION__, "get event pointer is NULL");
- }
- if ( (0 == max_tick_value) || (max_tick_value > currentTickValue) )
- {
- bProcess = setCurrentTickValue(currentTickValue);
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "processing event at tick " << dec << getCurrentTickValue() << "..." << endl;
-#endif /* CONFIG_LOG */
- bProcess &= callMemberFunction (*this, arrayProcess[pEvtToProcess->getNetworkClockType()]) (*pEvtToProcess);
- if (bProcess)
- {
- // clear event that has been processed
- mpNetworkClockEvtList->removeElement(currentTickValue, *pEvtToProcess);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "event at tick " << dec << getCurrentTickValue() << " has not been correctly processed!" << endl;
-#endif /* CONFIG_LOG */
- }
- }
- else
- {
- setCurrentTickValue(max_tick_value);
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "tick " << dec << getCurrentTickValue() << " is reached" << endl;
-#endif /* CONFIG_LOG */
- bProcess = false;
- }
- }
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "A pointer is NULL");
- }
-
- return bProcess;
-}
-
-
-bool NetworkClockProcessor::processEvtNone ( NetworkClockEvt & evt_to_process )
-{
- logFunction();
-
- errno = ENOMSG;
- throw Error(__PRETTY_FUNCTION__, "event cannot be sent because type is not set", errno);
-
- return false;
-}
-
-
-bool NetworkClockProcessor::processEvtRemove ( NetworkClockEvt & evt_to_process )
-{
- logFunction();
-
- errno = ENOMSG;
- throw Error(__PRETTY_FUNCTION__, "event cannot be sent because type is set to REMOVE", errno);
-
- return false;
-}
-
-
-// Goal of this method is to fill SCI msg data that have to be sent on an output pipe
-//
-bool NetworkClockProcessor::processEvtStation ( NetworkClockEvt & evt_to_process )
-{
- logFunction();
- bool bProcessStation = false;
-
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "sending network clock SCI message..." << endl;
-#endif /* CONFIG_LOG */
-
- ClockSciMsg clockSciMsgToSend(this);
-
- // Decompose current tick value into two uint32_t values
- //
- uint32_t netclockHigh=0, netclockLow=0;
- netclockLow = (uint32_t)(getCurrentTickValue());
- netclockHigh = (uint32_t)(((uint64_t)(getCurrentTickValue()) >> 32));
-
- // Fill specialized SCI msg header
- //
- struct Network_Clock_Header clockSciMsgHeader = { NETWORK_CLOCK_VERSION,
- static_cast<uint8_t>(evt_to_process.getNetworkClockType()),
- evt_to_process.getNetworkClockId(),
- 0x0000, // flags
- 0x0000, // reserved
- netclockHigh,
- netclockLow };
-
- // Set specialized SCI msg header
- //
- bProcessStation = clockSciMsgToSend.setSpecializedSciMsgHeader(clockSciMsgHeader);
-
- // As specialized SCI msg header will be sent on an output pipe, 'hton' functions have to be called
- //
- clockSciMsgToSend.setId(htons(clockSciMsgToSend.getSpecializedSciMsgHeader().id));
- clockSciMsgToSend.setTickHigh(htonl(clockSciMsgToSend.getSpecializedSciMsgHeader().tick_high));
- clockSciMsgToSend.setTickLow(htonl(clockSciMsgToSend.getSpecializedSciMsgHeader().tick_low));
-
- // Fill specialized SCI msg attributes:
- // - header size
- //
- bProcessStation &= clockSciMsgToSend.setSpecializedSciMsgHeaderSize(static_cast<unsigned long>(sizeof(Network_Clock_Header)));
-
- // Fill SCI msg attributes:
- // - type
- //
- bProcessStation &= clockSciMsgToSend.setSciMsgType(SCI_MSG_TYPE_NETWORK_CLOCK);
-
- // Fill specialized SCI msg data length and specialized SCI msg data
- // When sending a clock SCI msg, there is no clock SCI msg data
- //
- bProcessStation &= clockSciMsgToSend.setSpecializedSciMsgDataLength(0);
- bProcessStation &= clockSciMsgToSend.setSpecializedSciMsgData(NULL);
-
- // Fill SCI msg attributes:
- // - station id
- //
- bProcessStation &= clockSciMsgToSend.setSciMsgStationId(evt_to_process.getStationId());
-
- if (0 != bProcessStation)
- {
- // SCI msg is sent on an output pipe by the SCI server
- //
- bProcessStation = sendEvtMsg (clockSciMsgToSend);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "event cannot be sent because it is not correctly filled in!" << endl;
-#endif /* CONFIG_LOG */
- }
-
- return bProcessStation;
-}
-
-
-bool NetworkClockProcessor::processEvtFunctionCall ( NetworkClockEvt & evt_to_process )
-{
- logFunction();
-
- errno = ENOMSG;
- throw Error(__PRETTY_FUNCTION__, "event cannot be sent because type is set to FUNCTION_CALL", errno);
-
- return false;
-}
-
-
-bool NetworkClockProcessor::processEvtPhy ( NetworkClockEvt & evt_to_process )
-{
- logFunction();
-
- return getPhy()->receiveEvt(evt_to_process);
-}
-
-
-bool NetworkClockProcessor::processEvtSystem ( NetworkClockEvt & evt_to_process )
-{
- logFunction();
-
- return mpSystemManager->updateStationStatus(evt_to_process.getStationId(), MAXIMUS_STATION_STATUS_IDLE);
-}
-
-
-bool NetworkClockProcessor::processEvtEthernet ( NetworkClockEvt & evt_to_process )
-{
- logFunction();
-
- errno = ENOMSG;
- throw Error(__PRETTY_FUNCTION__, "event cannot be processed because type is set to ETHERNET", errno);
-
- return false;
-}
-
-
-// private methods
-//
-
-
-bool NetworkClockProcessor::sendEvtMsg ( ClockSciMsg & clock_sci_msg_to_send )
-{
- logFunction();
- bool bSend = false;
-
- if (NULL != mpSciServer)
- {
- bSend = mpSciServer->fillSciMsg (clock_sci_msg_to_send);
- bSend &= mpSciServer->sendSciMsg (clock_sci_msg_to_send);
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
-
- return bSend;
-}
-
-
-void NetworkClockProcessor::registerClockSciMsg ( )
-{
- logFunction();
-
- if (NULL != mpSciServer)
- {
- mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_NETWORK_CLOCK, new ClockSciMsg(this));
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-Network_Clock_Tick NetworkClockProcessor::getCurrentTickValue ( ) const
-{
- return mCurrentTickValue;
-}
-
-
-bool NetworkClockProcessor::setCurrentTickValue ( const Network_Clock_Tick tick_value )
-{
- bool bTick = false;
-
- mCurrentTickValue = tick_value;
- bTick = mpSciServer->updateTickValue(mCurrentTickValue);
-#if CONFIG_LOG
- bTick &= logger.updateTickValue(mCurrentTickValue);
-#endif /* CONFIG_LOG */
-
- return bTick;
-}
-
-
-NetworkClockEvtList * NetworkClockProcessor::getNetworkClockEvtList ( )
-{
- return mpNetworkClockEvtList;
-}
-
-
-IPhy * NetworkClockProcessor::getPhy ( ) const
-{
- if (NULL == mpPhyProcessor)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY processor pointer is NULL");
- }
-
- return mpPhyProcessor;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/networkclock/src/NetworkClockProcessorTest.cpp b/cesar/maximus/networkclock/src/NetworkClockProcessorTest.cpp
deleted file mode 100644
index c2aac959ea..0000000000
--- a/cesar/maximus/networkclock/src/NetworkClockProcessorTest.cpp
+++ /dev/null
@@ -1,401 +0,0 @@
-
-#include "NetworkClockProcessorTest.h"
-
-#include "NetworkClockEvtList.h"
-#include "NetworkClockEvt.h"
-#include "NetworkClockProcessor.h"
-#include "SciServer.h"
-#include "SystemManager.h"
-#include "FunctionCallManager.h"
-#include "PhyProcessor.h"
-#include "Station.h"
-#include "EthernetProcessor.h"
-#include "PhySciMsgPre.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (NetworkClockProcessorTest);
-
-
-void NetworkClockProcessorTest::setUp (void)
-{
- logTest();
-
- try
- {
- mpSciServer = new SciServer();
- if (NULL != mpSciServer)
- {
- mpFunctionCallManager = new FunctionCallManager(mpSciServer);
- mpSystemManager = new SystemManager(mpSciServer);
- mpPhyProcessor = new PhyProcessor(mpSciServer);
- mpEthernet = new EthernetProcessor(mpSciServer);
- if ( (NULL != mpFunctionCallManager)
- && (NULL != mpSystemManager)
- && (NULL != mpPhyProcessor)
- && (NULL != mpEthernet) )
- {
- mpNetworkClockProcessor = new NetworkClockProcessor(mpSciServer, mpSystemManager, mpFunctionCallManager, mpPhyProcessor, mpEthernet);
- }
- }
- }
- catch ( Error &e )
- {
- e.display();
- }
-}
-
-
-void NetworkClockProcessorTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpNetworkClockProcessor)
- {
- delete (mpNetworkClockProcessor);
- mpNetworkClockProcessor = NULL;
- }
- if (NULL != mpFunctionCallManager)
- {
- delete (mpFunctionCallManager);
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpSystemManager)
- {
- delete (mpSystemManager);
- mpSystemManager = NULL;
- }
- if (NULL != mpPhyProcessor)
- {
- delete (mpPhyProcessor);
- mpPhyProcessor = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete (mpSciServer);
- mpSciServer = NULL;
- }
- if (NULL != mpEthernet)
- {
- delete (mpEthernet);
- mpEthernet = NULL;
- }
-}
-
-
-void NetworkClockProcessorTest::createEvtTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- try
- {
- NetworkClockEvt evt (123, NETWORK_CLOCK_TYPE_NONE, 456);
- mpNetworkClockProcessor->createEvt(555, evt);
- }
- catch ( Error &e )
- {
- e.display();
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::removeEvtTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- try
- {
- NetworkClockEvt evt (789, NETWORK_CLOCK_TYPE_NONE, 1011);
-
- CPPUNIT_ASSERT_MESSAGE ( "removeEvt failed",
- !mpNetworkClockProcessor->removeEvt(555, evt) );
-
- CPPUNIT_ASSERT_MESSAGE ( "insertEvt failed",
- mpNetworkClockProcessor->insertEvt(555, evt) );
-
- CPPUNIT_ASSERT_MESSAGE ( "removeEvt failed",
- mpNetworkClockProcessor->removeEvt(555, evt) );
- }
- catch ( Error &e )
- {
- e.display();
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::removeEvtsTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- try
- {
- NetworkClockEvt evt (789, NETWORK_CLOCK_TYPE_NONE, 1011);
-
- CPPUNIT_ASSERT_MESSAGE ( "removeEvt failed",
- !mpNetworkClockProcessor->removeEvts(789) );
-
- CPPUNIT_ASSERT_MESSAGE ( "insertEvt failed",
- mpNetworkClockProcessor->insertEvt(555, evt) );
-
- CPPUNIT_ASSERT_MESSAGE ( "removeEvt failed",
- mpNetworkClockProcessor->removeEvts(789) );
- }
- catch ( Error &e )
- {
- e.display();
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processNextEvtTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- try
- {
- Sci_Msg_Station_Id stationId = 0;
- stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
- NetworkClockEvt evt (stationId, NETWORK_CLOCK_TYPE_STATION, 0);
-
- CPPUNIT_ASSERT_MESSAGE ( "insertEvt failed",
- mpNetworkClockProcessor->insertEvt(0, evt) );
-
- mpSystemManager->updateStationStatus(stationId, MAXIMUS_STATION_STATUS_IDLE);
-/*
- CPPUNIT_ASSERT_MESSAGE ( "processNextEvt failed",
- mpNetworkClockProcessor->processNextEvt() );
-*/
- NetworkClockEvt evt1 (stationId, NETWORK_CLOCK_TYPE_STATION, 0);
-
- CPPUNIT_ASSERT_MESSAGE ( "insertEvt failed",
- mpNetworkClockProcessor->insertEvt(1, evt1) );
-
- mpSystemManager->updateStationStatus(stationId, MAXIMUS_STATION_STATUS_IDLE);
-/*
- CPPUNIT_ASSERT_MESSAGE ( "processNextEvt failed",
- mpNetworkClockProcessor->processNextEvt() );
-*/
- NetworkClockEvt evtToProcess (stationId, NETWORK_CLOCK_TYPE_STATION, 0);
-
- CPPUNIT_ASSERT_MESSAGE ( "insertEvt failed",
- mpNetworkClockProcessor->insertEvt(4, evtToProcess) );
-
- mpNetworkClockProcessor->getNetworkClockEvtList()->displayListOfEvts();
- mpSystemManager->updateStationStatus(stationId, MAXIMUS_STATION_STATUS_IDLE);
-/*
- CPPUNIT_ASSERT_MESSAGE ( "processNextEvt failed",
- mpNetworkClockProcessor->processNextEvt() );
-*/
- mpSystemManager->removeStation(stationId);
- }
- catch ( Error &e )
- {
- e.display();
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processEvtNoneTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- bool bTest = false;
- try
- {
- NetworkClockEvt evt (0, NETWORK_CLOCK_TYPE_NONE, 0);
- CPPUNIT_ASSERT_MESSAGE ( "processEvtNone failed",
- !mpNetworkClockProcessor->processEvtNone(evt) );
- }
- catch ( Error &e )
- {
- bTest = true;
- }
- CPPUNIT_ASSERT_MESSAGE ( "processEvtNone failed", bTest );
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processEvtRemoveTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- bool bTest = false;
- try
- {
- NetworkClockEvt evt (0, NETWORK_CLOCK_TYPE_REMOVE, 0);
- CPPUNIT_ASSERT_MESSAGE ( "processEvtRemove failed",
- !mpNetworkClockProcessor->processEvtRemove(evt) );
- }
- catch ( Error &e )
- {
- bTest = true;
- }
- CPPUNIT_ASSERT_MESSAGE ( "processEvtRemove failed", bTest );
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processEvtStationTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- try
- {
- // Create a station
- //
- Sci_Msg_Station_Id stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
- NetworkClockEvt evt (stationId, NETWORK_CLOCK_TYPE_STATION, 2324);
- mpSystemManager->updateStationStatus ( stationId, MAXIMUS_STATION_STATUS_IDLE );
-
- CPPUNIT_ASSERT_MESSAGE ( "processEvtStation failed",
- mpNetworkClockProcessor->processEvtStation(evt) );
-
- mpSystemManager->removeStation(stationId);
- }
- catch ( Error &e )
- {
- e.display();
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processEvtFunctionCallTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- bool bTest = false;
- try
- {
- NetworkClockEvt evt (0, NETWORK_CLOCK_TYPE_FUNCTION_CALL, 0);
- CPPUNIT_ASSERT_MESSAGE ( "processEvtFunctionCall failed",
- !mpNetworkClockProcessor->processEvtFunctionCall(evt) );
- }
- catch ( Error &e )
- {
- bTest = true;
- }
- CPPUNIT_ASSERT_MESSAGE ( "processEvtFunctionCall failed", bTest );
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processEvtPhyTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- Sci_Msg_Station_Id stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
- PhySciMsgPre preamble(mpPhyProcessor);
- NetworkClockEvt evt (0, NETWORK_CLOCK_TYPE_PHY, 0, &preamble);
- CPPUNIT_ASSERT_MESSAGE ( "processEvtPhy failed",
- mpNetworkClockProcessor->processEvtPhy(evt) );
- mpSystemManager->removeStation(stationId);
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processEvtSystemTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- Sci_Msg_Station_Id stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
- NetworkClockEvt evt (stationId, NETWORK_CLOCK_TYPE_SYSTEM, 0);
- CPPUNIT_ASSERT_MESSAGE ( "processEvtSystem failed",
- mpNetworkClockProcessor->processEvtSystem(evt) );
- mpSystemManager->removeStation(stationId);
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
-
-void NetworkClockProcessorTest::processEvtEthernetTest (void)
-{
- logTest();
-
- if ( NULL != mpNetworkClockProcessor )
- {
- bool bTest = false;
- try
- {
- NetworkClockEvt evt (0, NETWORK_CLOCK_TYPE_ETHERNET, 0);
- CPPUNIT_ASSERT_MESSAGE ( "processEvtEthernet failed",
- !mpNetworkClockProcessor->processEvtEthernet(evt) );
- }
- catch ( Error &e )
- {
- bTest = true;
- }
- CPPUNIT_ASSERT_MESSAGE ( "processEvtEthernet failed", bTest );
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized NetworkClockProcessor pointer is NULL" );
- }
-}
-
diff --git a/cesar/maximus/phy/Module b/cesar/maximus/phy/Module
deleted file mode 100644
index 24c72a04fa..0000000000
--- a/cesar/maximus/phy/Module
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES := PhyProcessor.cpp PhySciMsg.cpp PhySciMsgPre.cpp PhySciMsgFc.cpp PhySciMsgMpdu.cpp PhySciMsgNoise.cpp
-ifdef UNITTEST
-SOURCES += PhyProcessorTest.cpp PhySciMsgTest.cpp PhySciMsgPreTest.cpp PhySciMsgFcTest.cpp PhySciMsgMpduTest.cpp PhySciMsgNoiseTest.cpp
-endif
-HOST_INCLUDES += maximus/phy/inc
diff --git a/cesar/maximus/phy/inc/IPhy.h b/cesar/maximus/phy/inc/IPhy.h
deleted file mode 100644
index 8cdf8915ab..0000000000
--- a/cesar/maximus/phy/inc/IPhy.h
+++ /dev/null
@@ -1,234 +0,0 @@
-/************************************************************************
- IPhy.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/IPhy.h
-**************************************************************************/
-
-#ifndef IPHY_H
-#define IPHY_H
-
-#include "hal_phy_types.h"
-#include "networkclock_types.h" // for 'Network_Clock_Tick'
-
-#include <boost/function.hpp> // for 'PhyMpduCb'
-
-class PhySciMsg;
-class PhySciMsgMpdu;
-class NetworkClockEvt;
-class INetworkClock;
-class IChannel;
-
-typedef boost::function <void (PhySciMsgMpdu &)> PhyMpduCb;
-
-
-/**
- * class IPhy
- */
-
-class IPhy
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- IPhy ( ) { }
-
- /**
- * Empty Destructor
- */
- virtual ~IPhy ( ) { }
-
- // public methods
- //
-
- /**
- * @param interface_cb
- * Initialize PHY with an interface callback function for PHY SCI message MPDU reception.
- */
- virtual bool init ( PhyMpduCb interface_cb ) = 0;
-
- /**
- * Initialize PHY with the PLC frequency for PHY SCI message of type ZERO_CROSS.
- * @param frequency
- * @return bool
- */
- virtual bool init ( const float frequency ) = 0;
-
- /**
- * @return PhySciMsg *
- */
- virtual PhySciMsg * createMsg ( ) = 0;
-
- /**
- * Creates a PHY SCI message MPDU.
- * @return PhySciMsgMpdu *
- */
- virtual PhySciMsgMpdu * createMpdu ( ) = 0;
-
- /**
- * Sends a PHY SCI message MPDU.
- * This message has to be configured before transmission.
- * @param p_mpdu
- * @return bool
- */
- virtual bool sendMpdu ( PhySciMsgMpdu * p_mpdu ) = 0;
-
- /**
- * Sends the PHY SCI message associated to the received Network Clock event.
- * @param received_evt
- * @return bool
- */
- virtual bool receiveEvt ( NetworkClockEvt & received_evt ) = 0;
-
- /**
- * Processes the received PHY SCI message of type NONE or NOISE.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receiveInvalid ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * Processes the received PHY SCI message of type PREAMBLE.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receivePre ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * Processes the received PHY SCI message of type FC_HYBRID_MODE or FC_AV_ONLY_MODE.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receiveFc ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * Processes the received PHY SCI message of type PRS.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receivePrs ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * Processes the received PHY SCI message of type MPDU_PAYLOAD.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receiveMpdu ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * Processes the received PHY SCI message of type TONEMASK.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receiveTonemask ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * Processes the received PHY SCI message of type TONEMAP.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receiveTonemap ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * Processes the received PHY SCI message of type RX.
- * @return bool
- * @param received_phy_sci_msg
- */
- virtual bool receiveRx ( PhySciMsg & received_phy_sci_msg ) = 0;
-
- /**
- * @return bool
- * @param p_network_clock the new value of mpNetworkClock
- */
- virtual bool setNetworkClock ( INetworkClock * p_network_clock ) = 0;
-
- /**
- * @return bool
- * @param p_channel the new value of mpChannel
- */
- virtual bool setChannel ( IChannel * p_channel ) = 0;
-
- /**
- * Sets the channel perturbation.
- * @param is_channel_enabled the new value of mIsChannelEnabled
- */
- virtual bool setIsChannelEnabled ( const bool is_channel_enabled ) = 0;
-
- /**
- * Gets the TX ID.
- * @return Phy_Tx_Id
- */
- virtual Phy_Tx_Id getTxId ( ) const = 0;
-
- /**
- * Gets the tonemask.
- * @return mpTonemask
- */
- virtual const uint8_t * getTonemask ( ) const = 0;
-
- /**
- * Check if the channel perturbation is enabled.
- * @return mIsChannelEnabled
- */
- virtual bool isChannelEnabled ( ) const = 0;
-
- /**
- * Sets the power line frequency.
- * @param frequency the new value of mFrequency
- * @return bool
- */
- virtual bool setFrequency ( const float frequency ) = 0;
-
- /**
- * Gets the power line frequency.
- * @return mFrequency
- */
- virtual float getFrequency ( ) const = 0;
-
- /**
- * Activate the wrong preambles transmission feature.
- * @param average_duration average number of ticks 25 MHz between two consecutive wrong preambles
- * @param std_deviation the standard deviation
- * @return bool
- */
- virtual bool activateFalseAlarm ( const Network_Clock_Tick average_duration, const float std_deviation ) = 0;
-
- /**
- * Deactivate the wrong preambles transmission feature.
- * @return bool
- */
- virtual bool deactivateFalseAlarm ( ) = 0;
-
-};
-
-
-#endif // IPHY_H
diff --git a/cesar/maximus/phy/inc/PhyProcessor.h b/cesar/maximus/phy/inc/PhyProcessor.h
deleted file mode 100644
index 27531f2e91..0000000000
--- a/cesar/maximus/phy/inc/PhyProcessor.h
+++ /dev/null
@@ -1,512 +0,0 @@
-/************************************************************************
- PhyProcessor.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/inc/PhyProcessor.h
-**************************************************************************/
-
-#ifndef PHYPROCESSOR_H
-#define PHYPROCESSOR_H
-
-#include "IPhy.h"
-
-#include "phy_types.h"
-
-#include <map> // for 'map' and 'multimap'
-
-class ISci;
-class PhySciMsgNoise;
-class PhySciMsgPre;
-
-struct Expected_Tx
-{
- Phy_Tx_Id src_tx_id; // expected transmission ID
- Sci_Msg_Station_Id src_station_id; // expected transmitting station ID
-};
-struct lttx
-{
- bool operator() ( const Expected_Tx tx1, const Expected_Tx tx2 ) const
- {
- if (tx1.src_tx_id != tx2.src_tx_id)
- {
- return tx1.src_tx_id < tx2.src_tx_id;
- }
- else
- {
- return tx1.src_station_id < tx2.src_station_id;
- }
- }
-};
-typedef std::multimap<const Expected_Tx, const Sci_Msg_Station_Id, lttx> RxStationsList; // list of destination stations
-struct Frame_Control
-{
- uint32_t fc_10;
- uint32_t fc_av[4];
-};
-typedef std::map<const Expected_Tx, Frame_Control, lttx> RxFcList; // list of received Frame Control
-struct Mpdu_Payload
-{
- unsigned short int msg_nb; // number of PHY SCI messages MPDU that have been received
- unsigned long data_length;
- unsigned char * p_data;
- uint32_t pb_header[MAC_MAX_PB_PER_MPDU];
-};
-typedef std::map<const Expected_Tx, Mpdu_Payload, lttx> RxMpduList; // list of received MPDU
-
-
-/**
- * class PhyProcessor
- * Simulates the real HomePlugAV physical interface and data bus.
- */
-
-class PhyProcessor : public IPhy
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
- ISci * mpSciServer;
- INetworkClock * mpNetworkClock;
- IChannel * mpChannel;
-
- bool mIsChannelEnabled;
-
- unsigned int mNbOfCarriers;
- uint8_t * mpTonemask;
-
- Phy_Tx_Id mTxId; // unique ID incremented for each transmission
- // (PREAMBLE, FC, MPDU, and NOISE if enabled).
- RxStationsList mListOfRxStations;
-
- PhyMpduCb mInterfaceCb;
- RxFcList mListOfRxFc;
- RxMpduList mListOfRxMpdu;
-
- float mFrequency;
- Network_Clock_Tick mZeroCrossDelay;
- PhySciMsg * mpZeroCross;
-
- // For the wrong preambles transmission feature
- bool mIsFalseAlarmActivated;
- PhySciMsgPre * mpWrongPre;
- Network_Clock_Tick mAverageDuration;
- float mStdDeviation;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- PhyProcessor ( ISci * p_sci_server );
-
- /**
- * Empty Destructor
- */
- virtual ~PhyProcessor ( );
-
- // public methods
- //
-
- /**
- * @param interface_cb
- * Initialize PHY with an interface callback function for PHY SCI message MPDU reception.
- */
- bool init ( PhyMpduCb interface_cb );
-
- /**
- * Initialize PHY with the PLC frequency for PHY SCI message of type ZERO_CROSS.
- * @param frequency
- * @return bool
- */
- bool init ( const float frequency );
-
- /**
- * @return PhySciMsg *
- */
- PhySciMsg * createMsg ( );
-
- /**
- * Creates a PHY SCI message MPDU.
- * @return PhySciMsgMpdu *
- */
- PhySciMsgMpdu * createMpdu ( );
-
- /**
- * Sends a PHY SCI message MPDU.
- * This message has to be configured before transmission.
- * @param p_mpdu
- * @return bool
- */
- bool sendMpdu ( PhySciMsgMpdu * p_mpdu );
-
- /**
- * Sends the PHY SCI message associated to the received Network Clock event.
- * @return bool
- * @param received_evt
- */
- bool receiveEvt ( NetworkClockEvt & received_evt );
-
- /**
- * Processes the received PHY SCI message of type NONE or NOISE.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receiveInvalid ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * Processes the received PHY SCI message of type PREAMBLE.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receivePre ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * Processes the received PHY SCI message of type FC_HYBRID_MODE or FC_AV_ONLY_MODE.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receiveFc ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * Processes the received PHY SCI message of type PRS.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receivePrs ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * Processes the received PHY SCI message of type MPDU_PAYLOAD.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receiveMpdu ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * Processes the received PHY SCI message of type TONEMASK.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receiveTonemask ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * Processes the received PHY SCI message of type TONEMAP.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receiveTonemap ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * Processes the received PHY SCI message of type RX.
- * @return bool
- * @param received_phy_sci_msg
- */
- bool receiveRx ( PhySciMsg & received_phy_sci_msg );
-
- /**
- * @return bool
- * @param phy_sci_msg_to_send
- */
- bool sendMsgToAllStations ( PhySciMsg & phy_sci_msg_to_send ) const;
-
- /**
- * Activate the wrong preambles transmission feature.
- * @param average_duration average number of ticks 25 MHz between two consecutive wrong preambles
- * @param std_deviation the standard deviation
- * @return bool
- */
- bool activateFalseAlarm ( const Network_Clock_Tick average_duration, const float std_deviation );
-
- /**
- * Deactivate the wrong preambles transmission feature.
- * @return bool
- */
- bool deactivateFalseAlarm ( );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return bool
- * @param p_network_clock the new value of mpNetworkClock
- */
- bool setNetworkClock ( INetworkClock * p_network_clock );
-
- /**
- * @return bool
- * @param p_channel the new value of mpChannel
- */
- bool setChannel ( IChannel * p_channel );
-
- /**
- * Sets the channel perturbation.
- * @param is_channel_enabled the new value of mIsChannelEnabled
- */
- bool setIsChannelEnabled ( const bool is_channel_enabled );
-
- /**
- * Gets the TX ID.
- * @return mTxId
- */
- Phy_Tx_Id getTxId ( ) const;
-
- /**
- * Gets the tonemask.
- * @return mpTonemask
- */
- const uint8_t * getTonemask ( ) const;
-
- /**
- * Check if the channel perturbation is enabled.
- * @return mIsChannelEnabled
- */
- bool isChannelEnabled ( ) const;
-
- /**
- * Sets the power line frequency.
- * @param frequency the new value of mFrequency
- * @return bool
- */
- bool setFrequency ( const float frequency );
-
- /**
- * Gets the power line frequency.
- * @return mFrequency
- */
- float getFrequency ( ) const;
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the PHY processor class attributes.
- */
- void initAttributes ( );
-
- /**
- * Registers the PHY SCI message creation function to the SCI server.
- */
- void registerPhySciMsg ( );
-
- /**
- * Computes PREAMBLE transmission duration.
- * @return preamble delay in ticks
- */
- Network_Clock_Tick calculatePreDelay ( ) const;
-
- /**
- * Computes Frame Control transmission duration.
- * @return Frame Control delay in ticks
- */
- Network_Clock_Tick calculateFcDelay ( Phy_Fc_Mode fc_mode ) const;
-
- /**
- * Computes MPDU payload transission duration.
- * @return MPDU payload delay in ticks
- */
- Network_Clock_Tick calculateMpduDelay ( Phy_Mod mod,
- Phy_Fecrate fecrate,
- unsigned short int pb_size,
- Phy_Nb_Of_Pbs pb_nb,
- Phy_Gil gil ) const;
-
- /**
- * @return bool
- * @param phy_sci_msg_to_send
- */
- bool fillMsg ( PhySciMsg & phy_sci_msg_to_send ) const;
-
- /**
- * @return a pointer to SCI server
- */
- ISci * getSciServer ( ) const;
-
- /**
- * @return a pointer to Network Clock Processor
- */
- INetworkClock * getNetworkClock ( ) const;
-
- /**
- * Gets a pointer to Channel.
- * @return mpChannel
- */
- IChannel * getChannel ( ) const;
-
- /**
- * Gets the number of carriers.
- * @return mNbOfCarriers
- */
- unsigned int getNbOfCarriers ( ) const;
-
- /**
- * Sets the number of carriers.
- * @return bool
- * @param nb_of_carriers the new value of mNbOfCarriers
- */
- bool setNbOfCarriers ( const unsigned int nb_of_carriers );
-
- /**
- * Sets the tonemask.
- * @return bool
- * @param length the tonemask length in octets
- * @param p_tonemask the new value of mpTonemask
- */
- bool setTonemask ( const unsigned int length, const uint8_t * p_tonemask );
-
- /**
- * Increments the TX ID.
- * @return bool
- */
- bool incrementTxId ( );
-
- /**
- * Gets the interface callback function for PHY SCI message MPDU reception.
- * @return mInterfaceCb
- */
- PhyMpduCb getInterfaceCb ( ) const;
-
- /**
- * Gets the zero-cross delay for PHY SCI message of type ZERO_CROSS transmission.
- * @return mZeroCrossDelay
- */
- Network_Clock_Tick getZeroCrossDelay ( ) const;
-
- /**
- * Sets the zero-cross delay for PHY SCI message of type ZERO_CROSS transmission.
- * @param zero_cross_delay the new value of mZeroCrossDelay
- * @return bool
- */
- bool setZeroCrossDelay ( const Network_Clock_Tick zero_cross_delay );
-
- /**
- * Gets a pointer to the PHY SCI message of type ZERO_CROSS.
- * @return mpZeroCross
- */
- PhySciMsg * getZeroCross ( ) const;
-
- /**
- * Schedules an event for next PHY SCI message of type ZERO_CROSS transmission.
- * @return bool
- */
- bool scheduleZeroCross ( );
-
- /**
- * Sends a PHY SCI message of type MPDU to destination stations.
- * @param mpdu the PHY SCI message MPDU to send
- * @return bool
- */
- bool sendMpduToDestStations ( PhySciMsgMpdu & mpdu );
-
- /**
- * Sends an empty PHY SCI message of type NOISE to destination stations.
- * @param noise the empty PHY SCI message NOISE to send
- * @return bool
- */
- bool sendEmptyNoiseToDestStations ( PhySciMsgNoise & noise );
-
- /**
- * Sends PHY SCI message(s) of type MPDU
- * and a PHY SCI message of type NOISE
- * to destination stations.
- * @param mpdu the PHY SCI message of type MPDU
- * @return bool
- */
- bool sendMpduAndNoiseToDestStations ( PhySciMsgMpdu & mpdu );
-
- /**
- * Update the list of destination stations.
- * Once a PHY SCI message MPDU has been sent to the destination stations,
- * remove the destination stations from the reception list.
- */
- void updateListOfRxStations ( PhySciMsgMpdu & mpdu );
-
- /**
- * Check if the wrong preambles transmission is enabled or not.
- * @return mIsFalseAlarmActivated
- */
- bool isFalseAlarmActivated ( ) const;
-
- /**
- * Gets a pointer to the PHY SCI message of type PREAMBLE with the flag PHY_FLAG_WRONG_PREAMBLE set.
- * @return mpWrongPre
- */
- PhySciMsgPre * getWrongPre ( ) const;
-
- /**
- * Gets the average number of ticks 25 MHz between 2 consecutive wrong preambles transmissions.
- * @return mAverageDuration
- */
- Network_Clock_Tick getAverageDuration ( ) const;
-
- /**
- * Gets the standard deviation (used to calculate date of the next wrong preamble transmission).
- * @return mStdDeviation
- */
- float getStdDeviation ( ) const;
-
- /**
- * Calculate date of next wrong preamble transmission.
- * @return the calculated date in ticks 25 MHz
- */
- Network_Clock_Tick calculateNextWrongPreDate ( ) const;
-
- /**
- * Schedules an event for next wrong preamble transmission.
- * @param tick_wrong_pre the next wrong preamble should be transmitted at current date + tick_wrong_pre (in 25 MHz)
- * @return bool
- */
- bool scheduleNextWrongPre ( const Network_Clock_Tick tick_wrong_pre ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // PHYPROCESSOR_H
diff --git a/cesar/maximus/phy/inc/PhyProcessorTest.h b/cesar/maximus/phy/inc/PhyProcessorTest.h
deleted file mode 100644
index bcb8fdf1ac..0000000000
--- a/cesar/maximus/phy/inc/PhyProcessorTest.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-#ifndef PHYPROCESSORTEST_H
-#define PHYPROCESSORTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class PhyProcessor;
-class CoreEngine;
-
-
-class PhyProcessorTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (PhyProcessorTest);
- CPPUNIT_TEST (initTest);
- CPPUNIT_TEST (createMsgTest);
- CPPUNIT_TEST (createMpduTest);
- CPPUNIT_TEST (sendMsgTest);
- CPPUNIT_TEST (sendMpduTest);
- CPPUNIT_TEST (receiveEvtTest);
- CPPUNIT_TEST (receiveInvalidTest);
- CPPUNIT_TEST (receivePreTest);
- CPPUNIT_TEST (receiveFcTest);
- CPPUNIT_TEST (receivePrsTest);
- CPPUNIT_TEST (receiveMpduTest);
- CPPUNIT_TEST (receiveTonemaskTest);
- CPPUNIT_TEST (receiveTonemapTest);
- CPPUNIT_TEST (receiveRxTest);
- CPPUNIT_TEST (setNetworkClockTest);
- CPPUNIT_TEST (setChannelTest);
- CPPUNIT_TEST (setIsChannelEnabledTest);
- CPPUNIT_TEST (setFrequencyTest);
- CPPUNIT_TEST (activateFalseAlarmTest);
- CPPUNIT_TEST (deactivateFalseAlarmTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void initTest (void);
- void createMsgTest (void);
- void createMpduTest (void);
- void sendMsgTest (void);
- void sendMpduTest (void);
- void receiveEvtTest (void);
- void receiveInvalidTest (void);
- void receivePreTest (void);
- void receiveFcTest (void);
- void receivePrsTest (void);
- void receiveMpduTest (void);
- void receiveTonemaskTest (void);
- void receiveTonemapTest (void);
- void receiveRxTest (void);
- void setNetworkClockTest (void);
- void setChannelTest (void);
- void setIsChannelEnabledTest (void);
- void setFrequencyTest (void);
- void activateFalseAlarmTest (void);
- void deactivateFalseAlarmTest (void);
-
-private:
-
- PhyProcessor * mpPhyProcessor;
- CoreEngine * mpCoreEngine;
-
-};
-
-
-#endif // PHYPROCESSORTEST_H
diff --git a/cesar/maximus/phy/inc/PhySciMsg.h b/cesar/maximus/phy/inc/PhySciMsg.h
deleted file mode 100644
index e08348c527..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsg.h
+++ /dev/null
@@ -1,524 +0,0 @@
-/************************************************************************
- PhySciMsg.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/inc/PhySciMsg.h
-**************************************************************************/
-
-#ifndef PHYSCIMSG_H
-#define PHYSCIMSG_H
-
-#include "SciMsg.h"
-
-#include "phy_types.h"
-#include "hal_phy_types.h"
-#include "networkclock_types.h"
-
-
-class IPhy;
-
-
-/**
- * class PhySciMsg
- */
-
-class PhySciMsg : public SciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
-protected:
-
- // protected attributes
- //
-
- // Get from specialized SCI msg header
- //
- Phy_Type mSpecializedSciMsgType;
- Phy_Mpdu_Format mMpduFormat;
- Phy_Nb_Of_Pbs mNbOfPbs;
- unsigned short int mNbOfMsgs;
- Phy_Fc_Mode mFcMode;
- Phy_Short_Ppdu mShortPpdu;
- Phy_Mod mMod;
- Phy_Fecrate mFecrate;
- Phy_Gil mGil;
- Phy_Tonemap_Index mTonemapIndex;
- Phy_Tx_Id mTxId;
- Phy_Flags mFlags;
- bool mIsEncrypted;
- bool mIsCrcOk;
- unsigned short int mPbSize;
- unsigned short int mReserved; // NOT USED YET
- Phy_Nb_Of_Symbols mNbOfSymbols;
- uint32_t mIvArray[3];
- uint32_t mNekArray[4];
- uint32_t mPbMeasurementArray[PHY_PB_MAX_NB];
- uint32_t mPbHeaderArray[PHY_PB_MAX_NB];
-
- // Specialized SCI msg header
- //
- Phy_Header mSpecializedSciMsgHeader;
-
- IPhy * mpPhyProcessor;
-
- bool mIsSent;
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- PhySciMsg ( IPhy * p_phy_processor );
-
- /**
- * Empty Destructor
- */
- virtual ~PhySciMsg ( );
-
- // public methods
- //
-
- /**
- * Creates a PHY SCI message.
- * @return SciMsg *
- */
- SciMsg * create ( ) const;
-
- /**
- * Handles a received PHY SCI message.
- * @return bool
- */
- bool dispatchMsg ( );
-
- /**
- * When receiving a PHY SCI message,
- * extracts the PHY SCI message header from the received SCI message data.
- * @return bool
- */
- bool identifySpecializedSciMsgHeader ( );
-
- /**
- * Checks that software versions are compatible,
- * i.e. checks specialized SCI msg compatibility (check specialized SCI msg version).
- * @return bool
- */
- bool checkCompatibility ( ) const;
-
- /**
- * Checks PHY SCI message header values ranges,
- * i.e. checks specialized SCI msg validity (check specialized SCI msg header coherence).
- * @return bool
- */
- bool checkValidity ( ) const;
-
- /**
- * Displays the PHY SCI message header contents.
- */
- void displaySpecializedSciMsgHeader ( ) const;
-
- /**
- * Display the specialized SCI message type.
- */
- void displaySpecializedSciMsgType ( int log_level ) const;
-
- /**
- * Sets the PHY SCI message attributes before transmission.
- * @param clock_id ID of the Network Clock event received message
- * @return bool
- */
- virtual bool prepare ( Network_Clock_Id clock_id = 0 );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- // protected attribute accessor methods
- //
-
- /**
- * Gets a pointer to the PHY SCI message header.
- * @return mSpecializedSciMsgHeader into a void pointer
- */
- void * returnSpecializedSciMsgHeader ( ) const;
-
- /**
- * Gets the PHY SCI message header.
- * @return mSpecializedSciMsgHeader
- */
- const Phy_Header & getSpecializedSciMsgHeader ( ) const;
-
- /**
- * Sets the value of the PHY SCI message header.
- * @return bool
- * @param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader
- */
- bool setSpecializedSciMsgHeader ( const Phy_Header & specialized_sci_msg_header );
-
- /**
- * Gets a pointer to the PHY processor.
- * @return mpPhyProcessor
- */
- IPhy * getPhyProcessor ( ) const;
-
- /**
- * Gets the PHY SCI message type.
- * @return mSpecializedSciMsgType
- */
- Phy_Type getSpecializedSciMsgType ( ) const;
-
- /**
- * Sets the PHY SCI message type.
- * @return bool
- * @param type the new value of mSpecializedSciMsgType
- */
- bool setSpecializedSciMsgType ( const Phy_Type type );
-
- /**
- * Gets the PHY SCI message MPDU format.
- * @return mMpduFormat
- */
- Phy_Mpdu_Format getMpduFormat ( ) const;
-
- /**
- * Sets the PHY SCI message MPDU format.
- * @return bool
- * @param mpdu_format the new value of mMpduFormat
- */
- bool setMpduFormat ( const Phy_Mpdu_Format mpdu_format );
-
- /**
- * Gets the PHY SCI message PB number.
- * @return mNbOfPbs
- */
- Phy_Nb_Of_Pbs getNbOfPbs ( ) const;
-
- /**
- * Sets the PHY SCI message PB number.
- * @return bool
- * @param nb_of_pbs the new value of mNbOfPbs
- */
- bool setNbOfPbs ( const Phy_Nb_Of_Pbs nb_of_pbs );
-
- /**
- * Gets the number of PHY SCI messages (composing the MPDU).
- * @return mNbOfMsgs
- */
- unsigned short int getNbOfMsgs ( ) const;
-
- /**
- * Sets the number of PHY SCI messages (composing the MPDU).
- * @param nb_of_msgs the new value of mNbOfMsgs
- * @return bool
- */
- bool setNbOfMsgs ( const unsigned short int nb_of_msgs );
-
- /**
- * Sets the PHY SCI message Frame Control mode.
- * @return mFcMode
- */
- Phy_Fc_Mode getFcMode ( ) const;
-
- /**
- * Sets the PHY SCI message Frame Control mode.
- * @return bool
- * @param fc_mode the new value of mFcMode
- */
- virtual bool setFcMode ( const Phy_Fc_Mode fc_mode );
-
- /**
- * Gets the PHY SCI message short PPDU.
- * @return mShortPpdu
- */
- Phy_Short_Ppdu getShortPpdu ( ) const;
-
- /**
- * Sets the PHY SCI message short PPDU.
- * @return bool
- * @param short_ppdu the new value of mShortPpdu
- */
- virtual bool setShortPpdu ( const Phy_Short_Ppdu short_ppdu );
-
- /**
- * Gets the PHY SCI message modulation.
- * @return mMod
- */
- Phy_Mod getMod ( ) const;
-
- /**
- * Sets the PHY SCI message modulation.
- * @return bool
- * @param mod the new value of mMod
- */
- virtual bool setMod ( const Phy_Mod mod );
-
- /**
- * Gets the PHY SCI message FEC rate.
- * @return mFecrate
- */
- Phy_Fecrate getFecrate ( ) const;
-
- /**
- * Sets the PHY SCI message FEC rate.
- * @return bool
- * @param fecrate the new value of mFecrate
- */
- virtual bool setFecrate ( const Phy_Fecrate fecrate );
-
- /**
- * Gets the PHY SCI message Guard Interval.
- * @return mGil
- */
- Phy_Gil getGil ( ) const;
-
- /**
- * Sets the PHY SCI message Guard Interval.
- * @return bool
- * @param gil the new value of mGil
- */
- virtual bool setGil ( const Phy_Gil gil );
-
- /**
- * Gets the PHY SCI message tonemap index.
- * @return mTonemapIndex
- */
- Phy_Tonemap_Index getTonemapIndex ( ) const;
-
- /**
- * Sets the PHY SCI message tonemap index.
- * @return bool
- * @param tonemap_index the new value of mTonemapIndex
- */
- bool setTonemapIndex ( const Phy_Tonemap_Index tonemap_index );
-
- /**
- * Sets the PHY SCI message transmission ID.
- * @return mTxId
- */
- Phy_Tx_Id getTxId ( ) const;
-
- /**
- * Gets the PHY SCI message transmission ID.
- * @return bool
- * @param tx_id the new value of mTxId
- */
- bool setTxId ( const Phy_Tx_Id tx_id );
-
- /**
- * Gets the PHY SCI message flags.
- * @return mFlags
- */
- Phy_Flags getFlags ( ) const;
-
- /**
- * Sets the PHY SCI message flags.
- * @return bool
- * @param flags the new value of mFlags
- */
- virtual bool setFlags ( const Phy_Flags flags );
-
- /**
- * Gets if the PHY SCI message is encrypted or not.
- * @return mIsEncrypted
- */
- bool isEncrypted ( ) const;
-
- /**
- * Sets if the PHY SCI message is encrypted or not.
- * @return bool
- * @param is_encrypted the new value of mIsEncrypted
- */
- bool setIsEncrypted ( const bool is_encrypted );
-
- /**
- * Gets if the PHY SCI message CRC is OK or not.
- * @return mIsCrcOk
- */
- bool isCrcOk ( ) const;
-
- /**
- * Sets if the PHY SCI message CRC is OK or not.
- * @return bool
- * @param is_crc_ok the new value of mIsCrcOk
- */
- bool setIsCrcOk ( const bool is_crc_ok );
-
- /**
- * Gets the PHY SCI message PB size.
- * @return mPbSize
- */
- unsigned short int getPbSize ( ) const;
-
- /**
- * Sets the PHY SCI message PB size.
- * @return bool
- * @param pb_size the new value of mPbSize
- */
- bool setPbSize ( const unsigned short int pb_size );
-
- /**
- * Sets the PHY SCI message reserved field (NOT USED YET).
- * @return mReserved
- */
- inline unsigned short int getReserved ( ) const { return mReserved; }
-
- /**
- * Sets the PHY SCI message reserved field (NOT USED YET).
- * @return bool
- * @param reserved the new value of mReserved
- */
- inline bool setReserved ( const unsigned short int reserved ) { mReserved = reserved;
- return true; }
-
- /**
- * Gets the PHY SCI message symbols number.
- * @return mNbOfSymbols
- */
- Phy_Nb_Of_Symbols getNbOfSymbols ( ) const;
-
- /**
- * Sets the PHY SCI message symbols number.
- * @return bool
- * @param nb_of_symbols the new value of mNbOfSymbols
- */
- bool setNbOfSymbols ( const Phy_Nb_Of_Symbols nb_of_symbols );
-
- /**
- * Gets the PHY SCI message IV array.
- * @return mIvArray
- */
- const uint32_t * getIv ( ) const;
-
- /**
- * Sets the PHY SCI message IV array.
- * @return bool
- * @param iv the new value of mIvArray
- */
- bool setIv ( const uint32_t iv[3] );
-
- /**
- * Gets the PHY SCI message NEK array.
- * @return mNekArray
- */
- const uint32_t * getNek ( ) const;
-
- /**
- * Sets the PHY SCI message NEK array.
- * @return bool
- * @param nek the new value of mNekArray
- */
- bool setNek ( const uint32_t nek[4] );
-
- /**
- * Gets the PHY SCI message PB measurement array.
- * @return mPbMeasurementArray
- */
- const uint32_t * getPbMeasurement ( ) const;
-
- /**
- * Sets the PHY SCI message PB measurement array.
- * @return bool
- * @param pb_measurement the new value of mPbMeasurementArray
- */
- bool setPbMeasurement ( const uint32_t pb_measurement[PHY_PB_MAX_NB] );
-
- /**
- * Gets the PHY SCI message PB header array.
- * @return mPbHeaderArray
- */
- const uint32_t * getPbHeader ( ) const;
-
- /**
- * @return bool
- * @param pb_header the new value of mPbHeaderArray
- */
- bool setPbHeader ( const uint32_t pb_header[PHY_PB_MAX_NB] );
-
- /**
- * Checks if the PHY SCI message has been sent.
- * @return mIsSent
- */
- virtual bool isSent ( ) const;
-
- /**
- * Sets if the PHY SCI message has been sent.
- * @param is_sent the new value of mIsSent
- * @return bool
- */
- bool setIsSent ( const bool is_sent );
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the PHY SCI message class attributes.
- */
- void initAttributes ( );
-
- /**
- * Displays the PHY SCI message header IV.
- */
- void displayIv ( ) const;
-
- /**
- * Displays the PHY SCI message header NEK.
- */
- void displayNek ( ) const;
-
- /**
- * Displays the PHY SCI message header PBs measurements.
- */
- void displayPbMeasurement ( ) const;
-
- /**
- * Displays the PHY SCI message header PBs headers.
- */
- void displayPbHeader ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // PHYSCIMSG_H
diff --git a/cesar/maximus/phy/inc/PhySciMsgFc.h b/cesar/maximus/phy/inc/PhySciMsgFc.h
deleted file mode 100644
index 2e12770611..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgFc.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/************************************************************************
- PhySciMsgFc.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/inc/PhySciMsgFc.h
-**************************************************************************/
-
-#ifndef PHYSCIMSGFC_H
-#define PHYSCIMSGFC_H
-
-#include "PhySciMsg.h"
-
-
-/**
- * class PhySciMsgFc
- */
-
-class PhySciMsgFc : public PhySciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- uint32_t mFc10;
- uint32_t mFcAvArray[4];
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- * Creates a PHY message of type FC_HYBRID_MODE or FC_AV_ONLY_MODE.
- * @param p_phy_processor a pointer to the PHY interface
- */
- PhySciMsgFc ( IPhy * p_phy_processor );
-
- /**
- * Empty Destructor
- */
- virtual ~PhySciMsgFc ( );
-
- // public methods
- //
-
- /**
- * Sets the PHY SCI message class attributes before transmission,
- * and fills specialized SCI msg data length and specialized SCI msg data
- * for a PHY message of type FC_AV_ONLY_MODE or FC_HYBRID_MODE.
- * @param clock_id ID of the Network Clock event received message
- * @return bool
- */
- bool prepare ( Network_Clock_Id clock_id );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Gets the Frame Control 1.0.
- * @return mFc10
- */
- uint32_t getFc10 ( ) const;
-
- /**
- * Sets the Frame Control 1.0.
- * @param fc_10 the new value of mFc10
- * @return bool
- */
- bool setFc10 ( const uint32_t fc_10 );
-
- /**
- * Gets the Frame Control AV.
- * @return mFcAvArray
- */
- const uint32_t * getFcAv ( ) const;
-
- /**
- * Sets the Frame Control AV.
- * @param fc_av the new value of mFcAvArray
- * @return bool
- */
- bool setFcAv ( const uint32_t fc_av[4] );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the PHY SCI message class attributes.
- * Fills PHY SCI message type.
- */
- void initAttributes ( );
-
- // private attribute accessor methods
- //
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // PHYSCIMSGFC_H
diff --git a/cesar/maximus/phy/inc/PhySciMsgFcTest.h b/cesar/maximus/phy/inc/PhySciMsgFcTest.h
deleted file mode 100644
index 3c9a5f4f83..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgFcTest.h
+++ /dev/null
@@ -1,42 +0,0 @@
-
-#ifndef PHYSCIMSGFCTEST_H
-#define PHYSCIMSGFCTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class PhySciMsgFc;
-class IPhy;
-class ISci;
-
-
-class PhySciMsgFcTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (PhySciMsgFcTest);
- CPPUNIT_TEST (prepareTest);
- CPPUNIT_TEST (fc10Test);
- CPPUNIT_TEST (fcAvTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void prepareTest (void);
- void fc10Test (void);
- void fcAvTest (void);
-
-private:
-
- ISci * mpSci;
- IPhy * mpPhy;
- PhySciMsgFc * mpPhySciMsgFc;
-
-};
-
-
-#endif // PHYSCIMSGFCTEST_H
diff --git a/cesar/maximus/phy/inc/PhySciMsgMpdu.h b/cesar/maximus/phy/inc/PhySciMsgMpdu.h
deleted file mode 100644
index abad1632e0..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgMpdu.h
+++ /dev/null
@@ -1,303 +0,0 @@
-/************************************************************************
- PhySciMsgMpdu.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/inc/PhySciMsgMpdu.h
-**************************************************************************/
-
-#ifndef PHYSCIMSGMPDU_H
-#define PHYSCIMSGMPDU_H
-
-#include "PhySciMsg.h"
-
-class PhySciMsgPre;
-class PhySciMsgFc;
-
-
-/**
- * class PhySciMsgMpdu
- */
-
-class PhySciMsgMpdu : public PhySciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- unsigned long mPayloadLength;
- unsigned char * mpPayload;
- unsigned long mDuplicatedPbLength;
-
- PhySciMsgPre * mpPre;
- PhySciMsgFc * mpFc;
-
- unsigned short int mNbOfPbsInLastMsg;
- unsigned char mPbsArray[MAC_MAX_PB_PER_MPDU*MAC_PB520_BYTES];
- uint32_t mPbsHeadersArray[MAC_MAX_PB_PER_MPDU];
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- * Creates a PHY SCI message of type MPDU_PAYLOAD.
- * @param p_phy_processor a pointer to the PHY interface
- */
- PhySciMsgMpdu ( IPhy * p_phy_processor );
-
- /**
- * Copy Constructor
- * Creates a PHY SCI message of type MPDU_PAYLOAD.
- * @param phy_sci_msg a PHY SCI message
- */
- PhySciMsgMpdu ( PhySciMsg & phy_sci_msg );
-
- /**
- * Empty Destructor
- */
- virtual ~PhySciMsgMpdu ( );
-
- // public methods
- //
-
- /**
- * Segment the MPDU payload into PBs.
- * Fills PBs headers.
- * @return bool
- */
- bool segment ( );
-
- /**
- * Sets the PHY SCI message class attributes before transmission,
- * and fills specialized SCI msg data length and specialized SCI msg data
- * for a PHY message of type MPDU_PAYLOAD.
- * @param clock_id ID of the Network Clock event received message
- * @return bool
- */
- bool prepare ( Network_Clock_Id clock_id );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Gets the MPDU payload length.
- * @return mPayloadLength
- */
- unsigned long getPayloadLength ( ) const;
-
- /**
- * Gets the MPDU payload.
- * @return mpPayload
- */
- const unsigned char * getPayload ( ) const;
-
- /**
- * Gets the length of a duplicated PB.
- * @return mDuplicatedPbLength
- */
- inline unsigned long getDuplicatedPbLength ( ) const { return mDuplicatedPbLength; }
-
- /**
- * Sets the length of a duplicated PB.
- * @param length of a duplicated PB
- */
- inline void setDuplicatedPbLength ( unsigned long length ) { mDuplicatedPbLength = length; }
-
- /**
- * @param length the new value of mPayloadLength
- * @param p_payload the new value of mpPayload
- * @return bool
- */
- bool setMpdu ( const unsigned long length, const unsigned char * p_payload );
-
- /**
- * Gets the PHY SCI message PREAMBLE.
- * @return mpPre
- */
- PhySciMsgPre * getPre ( ) const;
-
- /**
- * Gets the PHY SCI message FC.
- * @return mpFc
- */
- PhySciMsgFc * getFc ( ) const;
-
- /**
- * Gets the number of PBs into the last PHY SCI message composing the MPDU.
- * @return mNbOfPbsInLastMsg
- */
- unsigned short int getNbOfPbsInLastMsg ( ) const;
-
- /**
- * Sets the number of PBs into the last PHY SCI message composing the MPDU.
- * @param nb_of_pbs_in_last_msg the new value of mNbOfPbsInLastMsg
- * @return bool
- */
- bool setNbOfPbsInLastMsg ( const unsigned short int nb_of_pbs_in_last_msg );
-
- /**
- * Gets a pointer to the PBs of the nth PHY SCI message composing the MPDU.
- * @return &mPbsArray[n*PHY_PB_MAX_NB*MAC_PB520_BYTES]
- */
- const unsigned char * getPbs ( const unsigned short int n = 0 ) const;
-
- /**
- * Checks if the PHY SCI message has been sent (MPDU, or FC in case of a short PPDU).
- * @return (mIsSent || mpFc->mIsSent)
- */
- bool isSent ( ) const;
-
- /**
- * Checks if the MPDU has been completely received
- * (i.e. all PHY SCI messages MPDU composing the MPDU have been received).
- * @param nb_of_received_msgs number of PHY SCI messages MPDU that have been received
- * @return nb_of_received_msgs == mNbOfMsgs
- */
- bool isReceived ( const unsigned short int nb_of_received_msgs ) const;
-
- /**
- * Sets the PHY SCI message Frame Control mode for PREAMBLE, FC and MPDU.
- * @return bool
- * @param fc_mode the new value of mFcMode, mpPre->mFcMode and mpFc->mFcMode
- */
- bool setFcMode ( const Phy_Fc_Mode fc_mode );
-
- /**
- * Sets the PHY SCI message short PPDU for PREAMBLE, FC and MPDU.
- * @return bool
- * @param short_ppdu the new value of mShortPpdu, mpPre->mShortPpdu and mpFc->mShortPpdu
- */
- bool setShortPpdu ( const Phy_Short_Ppdu short_ppdu );
-
- /**
- * Sets the PHY SCI message modulation for PREAMBLE, FC and MPDU.
- * @return bool
- * @param mod the new value of mMod, mpPre->mMod and mpFc->mMod
- */
- bool setMod ( const Phy_Mod mod );
-
- /**
- * Sets the PHY SCI message FEC rate for PREAMBLE, FC and MPDU.
- * @return bool
- * @param fecrate the new value of mFecrate, mpPre->mFecrate and mpFc->mFecrate
- */
- bool setFecrate ( const Phy_Fecrate fecrate );
-
- /**
- * Sets the PHY SCI message Guard Interval for PREAMBLE, FC and MPDU.
- * @return bool
- * @param gil the new value of mGil, mpPre->mGil and mpFc->mGil
- */
- bool setGil ( const Phy_Gil gil );
-
- /**
- * Sets the PHY SCI message flags for PREAMBLE, FC and MPDU.
- * @return bool
- * @param flags the new value of mFlags, mpPre->mFlags and mpFc->mFlags
- */
- bool setFlags ( const Phy_Flags flags );
-
- /**
- * Gets the Frame Control 1.0 of the PHY SCI message FC.
- * @return mpFc->mFc10
- */
- uint32_t getFc10 ( ) const;
-
- /**
- * Sets the Frame Control 1.0 of the PHY SCI message FC.
- * @param fc_10 the new value of mpFc->mFc10
- * @return bool
- */
- bool setFc10 ( const uint32_t fc_10 );
-
- /**
- * Gets the Frame Control AV of the PHY SCI message FC.
- * @return mpFc->mFcAvArray
- */
- const uint32_t * getFcAv ( ) const;
-
- /**
- * Sets the Frame Control AV of the PHY SCI message FC.
- * @param fc_av the new value of mpFc->mFcAvArray
- * @return bool
- */
- bool setFcAv ( const uint32_t fc_av[4] );
-
- /**
- * Gets a pointer to the PB Header of the nth PHY SCI message composing the MPDU.
- * @return &mPbsHeadersArray[n*PHY_PB_MAX_NB]
- */
- const uint32_t * getPbsHeaders ( const unsigned short int n ) const;
-
- /**
- * Sets the (n)th PB header.
- * @param n indicates the number of the PB to set
- * @param pb_header the value of the (n)th PB Header
- * @return bool
- */
- bool setPbsHeaders ( const unsigned short int n, const uint32_t pb_header );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the PHY SCI message class attributes.
- * Fills PHY SCI message type.
- * @param p_phy_processor a pointer to the PHY interface
- */
- void initAttributes ( IPhy * p_phy_processor );
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // PHYSCIMSGMPDU_H
diff --git a/cesar/maximus/phy/inc/PhySciMsgMpduTest.h b/cesar/maximus/phy/inc/PhySciMsgMpduTest.h
deleted file mode 100644
index ce0b2fc8d3..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgMpduTest.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#ifndef PHYSCIMSGMPDUTEST_H
-#define PHYSCIMSGMPDUTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class PhySciMsgMpdu;
-class IPhy;
-class ISci;
-
-
-class PhySciMsgMpduTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (PhySciMsgMpduTest);
- CPPUNIT_TEST (segmentTest);
- CPPUNIT_TEST (prepareTest);
- CPPUNIT_TEST (setMpduTest);
- CPPUNIT_TEST (setNbOfMsgsTest);
- CPPUNIT_TEST (setNbOfPbsInLastMsgTest);
- CPPUNIT_TEST (setPbsHeadersTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void segmentTest (void);
- void prepareTest (void);
- void setMpduTest (void);
- void setNbOfMsgsTest (void);
- void setNbOfPbsInLastMsgTest (void);
- void setPbsHeadersTest (void);
-
-private:
-
- ISci * mpSci;
- IPhy * mpPhy;
- PhySciMsgMpdu * mpPhySciMsgMpdu;
-
-};
-
-
-#endif // PHYSCIMSGMPDUTEST_H
diff --git a/cesar/maximus/phy/inc/PhySciMsgNoise.h b/cesar/maximus/phy/inc/PhySciMsgNoise.h
deleted file mode 100644
index 3afeab00d5..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgNoise.h
+++ /dev/null
@@ -1,87 +0,0 @@
-
-#ifndef PHYSCIMSGNOISE_H_
-#define PHYSCIMSGNOISE_H_
-
-#include "PhySciMsg.h"
-
-
-/**
- * class PhySciMsgNoise
- */
-
-class PhySciMsgNoise : public PhySciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- * Creates a PHY message of type NOISE.
- * @param p_phy a pointer to the PHY interface
- */
- PhySciMsgNoise ( IPhy * p_phy );
-
- /**
- * Empty Destructor
- */
- virtual ~PhySciMsgNoise ( );
-
- // public methods
- //
-
- /**
- * Sets the PHY SCI message class attributes before transmission
- * for a PHY message of type NOISE.
- * @return bool
- */
- bool prepare ( );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the PHY SCI message class attributes:
- * fills PHY SCI message type,
- * and specialized SCI msg data length.
- *
- */
- void initAttributes ( );
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif /*PHYSCIMSGNOISE_H_*/
diff --git a/cesar/maximus/phy/inc/PhySciMsgNoiseTest.h b/cesar/maximus/phy/inc/PhySciMsgNoiseTest.h
deleted file mode 100644
index 250af709e3..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgNoiseTest.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#ifndef PHYSCIMSGNOISETEST_H_
-#define PHYSCIMSGNOISETEST_H_
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class PhySciMsgNoise;
-class IPhy;
-class ISci;
-
-
-class PhySciMsgNoiseTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (PhySciMsgNoiseTest);
- CPPUNIT_TEST (prepareTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void prepareTest (void);
-
-private:
-
- ISci * mpSci;
- IPhy * mpPhy;
- PhySciMsgNoise * mpPhySciMsgNoise;
-
-};
-
-
-#endif /*PHYSCIMSGNOISETEST_H_*/
diff --git a/cesar/maximus/phy/inc/PhySciMsgPre.h b/cesar/maximus/phy/inc/PhySciMsgPre.h
deleted file mode 100644
index 5cdce244c1..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgPre.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/************************************************************************
- PhySciMsgPre.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/inc/PhySciMsgPre.h
-**************************************************************************/
-
-#ifndef PHYSCIMSGPRE_H
-#define PHYSCIMSGPRE_H
-
-#include "PhySciMsg.h"
-
-
-/**
- * class PhySciMsgPre
- */
-
-class PhySciMsgPre : public PhySciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- * Creates a PHY message of type PREAMBLE.
- * @param p_phy_processor a pointer to the PHY interface
- */
- PhySciMsgPre ( IPhy * p_phy_processor );
-
- /**
- * Empty Destructor
- */
- virtual ~PhySciMsgPre ( );
-
- // public methods
- //
-
- /**
- * Sets the PHY SCI message class attributes before transmission,
- * and fills specialized SCI msg data length and specialized SCI msg data
- * for a PHY SCI message of type PREAMBLE.
- * @param clock_id ID of the Network Clock event received message
- * @return bool
- */
- bool prepare ( Network_Clock_Id clock_id );
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * Initializes the PHY SCI message class attributes.
- * Fills PHY SCI message type.
- */
- void initAttributes ( );
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // PHYSCIMSGPRE_H
diff --git a/cesar/maximus/phy/inc/PhySciMsgPreTest.h b/cesar/maximus/phy/inc/PhySciMsgPreTest.h
deleted file mode 100644
index ff00d90436..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgPreTest.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#ifndef PHYSCIMSGPRETEST_H
-#define PHYSCIMSGPRETEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class PhySciMsgPre;
-class IPhy;
-class ISci;
-
-
-class PhySciMsgPreTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (PhySciMsgPreTest);
- CPPUNIT_TEST (prepareTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void prepareTest (void);
-
-private:
-
- ISci * mpSci;
- IPhy * mpPhy;
- PhySciMsgPre * mpPhySciMsgPre;
-
-};
-
-
-#endif // PHYSCIMSGPRETEST_H
diff --git a/cesar/maximus/phy/inc/PhySciMsgTest.h b/cesar/maximus/phy/inc/PhySciMsgTest.h
deleted file mode 100644
index 4619423ac9..0000000000
--- a/cesar/maximus/phy/inc/PhySciMsgTest.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#ifndef PHYSCIMSGTEST_H
-#define PHYSCIMSGTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class PhySciMsg;
-class PhyProcessor;
-class SciServer;
-
-
-class PhySciMsgTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (PhySciMsgTest);
- CPPUNIT_TEST (dispatchMsgTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void dispatchMsgTest (void);
-
-private:
-
- PhySciMsg * mpPhySciMsg;
- PhyProcessor * mpPhyProcessor;
- SciServer * mpSciServer;
-
-};
-
-
-#endif // PHYSCIMSGTEST_H
diff --git a/cesar/maximus/phy/src/PhyProcessor.cpp b/cesar/maximus/phy/src/PhyProcessor.cpp
deleted file mode 100644
index ff42ea10bd..0000000000
--- a/cesar/maximus/phy/src/PhyProcessor.cpp
+++ /dev/null
@@ -1,1533 +0,0 @@
-/************************************************************************
- PhyProcessor.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/src/PhyProcessor.cpp
-**************************************************************************/
-
-#include "PhyProcessor.h"
-
-#include "PhySciMsg.h"
-#include "PhySciMsgMpdu.h"
-#include "PhySciMsgNoise.h"
-#include "PhySciMsgPre.h"
-#include "ISci.h"
-#include "NetworkClockEvt.h"
-#include "INetworkClock.h"
-#include "IChannel.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include "hal/phy/maximus/dur/inc/maximus_dur.h"
-#include "hal/phy/maximus/inc/maximus_defs.h" // for 'MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK' and 'MAXIMUS_PHY_MPDU_RECEPTION_DELAY_TCK'
-#include "mac/common/timings.h" // for 'MAC_PREAMBLE_TCK', 'MAC_PREAMBLE_HYBRID_TCK', 'MAC_FC_10_TCK', and 'MAC_FC_AV_TCK'
-
-#include <string> // for 'memset()' and 'memcpy()'
-#include <netinet/in.h> // for 'htonl()' and 'htons()'
-#include <boost/random/mersenne_twister.hpp> // for random
-#include <boost/random/normal_distribution.hpp>
-#include <boost/random/variate_generator.hpp>
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-PhyProcessor::PhyProcessor ( ISci * p_sci_server ):
-mpSciServer(NULL),
-mpNetworkClock(NULL),
-mpChannel(NULL),
-mIsChannelEnabled(false),
-mNbOfCarriers(0),
-mpTonemask(NULL),
-mTxId(0),
-mInterfaceCb(NULL),
-mFrequency(0),
-mZeroCrossDelay(0),
-mpZeroCross(NULL),
-mIsFalseAlarmActivated(false),
-mpWrongPre(NULL),
-mAverageDuration(0),
-mStdDeviation(0)
-{
- logFunction();
-
- if (NULL != p_sci_server)
- {
- mpSciServer = p_sci_server;
- registerPhySciMsg();
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL", errno);
- }
-
- initAttributes();
-}
-
-
-void PhyProcessor::initAttributes ( )
-{
- logFunction();
-}
-
-
-PhyProcessor::~PhyProcessor ( )
-{
- logFunction();
-
- if (NULL != mpSciServer)
- {
- mpSciServer = NULL;
- }
- if (NULL != mpNetworkClock)
- {
- mpNetworkClock = NULL;
- }
- if (NULL != mpChannel)
- {
- mpChannel = NULL;
- }
- if (NULL != mpTonemask)
- {
- delete [] mpTonemask;
- mpTonemask = NULL;
- }
- mListOfRxStations.clear();
- mListOfRxFc.clear();
- if (NULL != mpZeroCross)
- {
- delete(mpZeroCross);
- mpZeroCross = NULL;
- }
- for (RxMpduList::iterator it = mListOfRxMpdu.begin(); it != mListOfRxMpdu.end();)
- {
- RxMpduList::iterator pos = it;
- ++it;
- if (NULL != pos->second.p_data)
- {
- delete [] pos->second.p_data;
- }
- }
- mListOfRxMpdu.clear();
-
- if (NULL != mpWrongPre)
- {
- delete(mpWrongPre);
- mpWrongPre = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool PhyProcessor::init ( PhyMpduCb interface_cb )
-{
- logFunction();
- bool bInit = false;
-
- if (NULL != interface_cb)
- {
- mInterfaceCb = interface_cb;
- bInit = true;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Callback function address is NULL", errno);
- }
-
- return bInit;
-}
-
-
-bool PhyProcessor::init ( const float frequency )
-{
- logFunction();
- bool bInit = false;
-
- // Create a PHY SCI message of type ZERO_CROSS
- mpZeroCross = new PhySciMsg(this);
- bInit = mpZeroCross->setSpecializedSciMsgType(PHY_TYPE_ZERO_CROSS);
- bInit &= mpZeroCross->setFlags(PHY_FLAG_CRC_OK);
- bInit &= mpZeroCross->setSciMsgStationId(getpid());
-
- // Set power line frequency
- bInit = setFrequency(frequency);
-
- if (0 != frequency)
- {
- // Calculate zero-cross delay, and set it
- Network_Clock_Tick zeroCrossDelay = (Network_Clock_Tick)(25000000/(2*frequency));
- bInit &= setZeroCrossDelay(zeroCrossDelay);
-
- // Schedules a PHY SCI message of type ZERO_CROSS
- bInit &= scheduleZeroCross();
- }
-
- return bInit;
-}
-
-
-PhySciMsg * PhyProcessor::createMsg ( )
-{
- logFunction();
-
- return new PhySciMsg(this);
-}
-
-
-PhySciMsgMpdu * PhyProcessor::createMpdu ( )
-{
- logFunction();
-
- return new PhySciMsgMpdu(this);
-}
-
-
-bool PhyProcessor::sendMpdu ( PhySciMsgMpdu * p_mpdu )
-{
- logFunction();
- bool bSendMpdu = false;
-
- if (NULL == p_mpdu)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message MPDU pointer is NULL", errno);
- }
-
- // Schedule PREAMBLE message
- Network_Clock_Tick tickPre = getNetworkClock()->getCurrentTickValue() + calculatePreDelay();
- NetworkClockEvt evtPre ( 0, // station_id
- NETWORK_CLOCK_TYPE_PHY,
- 0, // id = 0 for PREAMBLE
- (void *)p_mpdu->getPre() );
- bSendMpdu = getNetworkClock()->insertEvt(tickPre, evtPre);
-
- // Schedule FC message
- Network_Clock_Tick tickFc = getNetworkClock()->getCurrentTickValue() + calculateFcDelay(p_mpdu->getFcMode());
- NetworkClockEvt evtFc ( 0, // station_id
- NETWORK_CLOCK_TYPE_PHY,
- 0, // id = 0 for FC
- (void *)p_mpdu->getFc() );
- bSendMpdu &= getNetworkClock()->insertEvt(tickFc, evtFc);
-
- // Schedule MPDU message(s)
- if (!p_mpdu->getShortPpdu())
- {
- // segmentation in PBs
- bSendMpdu &= p_mpdu->segment();
-
- Network_Clock_Tick tickMpdu = getNetworkClock()->getCurrentTickValue() \
- + calculateMpduDelay(p_mpdu->getMod(), \
- p_mpdu->getFecrate(), \
- p_mpdu->getPbSize(), \
- p_mpdu->getNbOfPbs(), \
- p_mpdu->getGil());
-
- // insert a Network Clock event
- NetworkClockEvt evtMpdu ( 0, // station_id
- NETWORK_CLOCK_TYPE_PHY,
- p_mpdu->getNbOfMsgs(), // id = message number for MPDU
- (void *)p_mpdu );
- bSendMpdu &= getNetworkClock()->insertEvt(tickMpdu, evtMpdu);
- }
-
- if (!bSendMpdu)
- {
- throw Error(__PRETTY_FUNCTION__, "cannot send MPDU", errno);
- }
-
- return bSendMpdu;
-}
-
-
-bool PhyProcessor::receiveEvt ( NetworkClockEvt & received_evt )
-{
- logFunction();
- bool bReceiveEvt = true;
-
- PhySciMsg * pPhySciMsgToSend = (PhySciMsg *)received_evt.getData();
- if (NULL == pPhySciMsgToSend)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message pointer is NULL", errno);
- }
-
- if (PHY_TYPE_PREAMBLE == pPhySciMsgToSend->getSpecializedSciMsgType())
- {
- // Increment TX ID at the beginning of each transmission
- bReceiveEvt &= incrementTxId();
- }
-
- if (PHY_TYPE_MPDU_PAYLOAD == pPhySciMsgToSend->getSpecializedSciMsgType())
- {
- PhySciMsgMpdu * pMpdu = (PhySciMsgMpdu *)received_evt.getData();
-
- // Set TX ID
- bReceiveEvt &= pMpdu->setTxId(getTxId());
-
- // Set station ID to Maximus PID
- bReceiveEvt &= pMpdu->setSciMsgStationId(getpid());
-
- if (!isChannelEnabled())
- {
- // For each PHY SCI message composing the MPDU
- for (int n=1; n<=pMpdu->getNbOfMsgs(); n++)
- {
- // Prepare PHY SCI message before transmission
- bReceiveEvt &= pMpdu->prepare(n);
-
- // Set PHY SCI message PB Header
- bReceiveEvt &= pMpdu->setPbHeader(pMpdu->getPbsHeaders(n-1));
-
- // Send PHY SCI message MPDU
- bReceiveEvt &= sendMpduToDestStations(*pMpdu);
- }
-
- // Send empty PHY SCI message NOISE
- PhySciMsgNoise noise(this);
- bReceiveEvt &= noise.setTxId(pMpdu->getTxId()); // set TX ID
- bReceiveEvt &= noise.setSciMsgStationId(pMpdu->getSciMsgStationId()); // set station ID to Maximus PID
- bReceiveEvt &= sendEmptyNoiseToDestStations(noise);
-
- // Update list of destination stations
- if (pMpdu->isSent())
- {
- updateListOfRxStations(*pMpdu);
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message MPDU has not been correctly sent");
- }
- }
- else
- {
- bReceiveEvt &= sendMpduAndNoiseToDestStations(*pMpdu);
- }
- }
- else if (PHY_TYPE_ZERO_CROSS == pPhySciMsgToSend->getSpecializedSciMsgType())
- {
- if (0 != getFrequency())
- {
- bReceiveEvt &= scheduleZeroCross();
- bReceiveEvt &= sendMsgToAllStations(*pPhySciMsgToSend);
- }
- }
- else if ( (PHY_TYPE_PREAMBLE == pPhySciMsgToSend->getSpecializedSciMsgType())
- && (PHY_FLAG_WRONG_PREAMBLE == (pPhySciMsgToSend->getFlags() & PHY_FLAG_WRONG_PREAMBLE)) )
- {
- if (isFalseAlarmActivated())
- {
- // Prepare PHY SCI message before transmission
- bReceiveEvt &= pPhySciMsgToSend->prepare(received_evt.getNetworkClockId());
-
- bReceiveEvt &= sendMsgToAllStations(*pPhySciMsgToSend);
-
- bReceiveEvt &= scheduleNextWrongPre(calculateNextWrongPreDate());
- }
- }
- else
- {
- // Prepare PHY SCI message before transmission
- bReceiveEvt &= pPhySciMsgToSend->prepare(received_evt.getNetworkClockId());
-
- bReceiveEvt &= sendMsgToAllStations(*pPhySciMsgToSend);
- }
-
- return bReceiveEvt;
-}
-
-
-bool PhyProcessor::receiveInvalid ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
-
- errno = ENOMSG;
- throw Error(__PRETTY_FUNCTION__, "receive PHY SCI message of invalid type", errno);
-
- return false;
-}
-
-
-bool PhyProcessor::receivePre ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
-
- if (isChannelEnabled())
- {
- getChannel()->receivePre(received_phy_sci_msg.getSciMsgStationId(), getNetworkClock()->getCurrentTickValue());
- }
-
- return sendMsgToAllStations(received_phy_sci_msg);
-}
-
-
-bool PhyProcessor::receiveFc ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
-
- // Check PHY SCI message data length
- if ( ((PHY_TYPE_FC_HYBRID_MODE == received_phy_sci_msg.getSpecializedSciMsgType())
- && (5*sizeof(uint32_t) != received_phy_sci_msg.getSpecializedSciMsgDataLength()))
- || ((PHY_TYPE_FC_AV_ONLY_MODE == received_phy_sci_msg.getSpecializedSciMsgType())
- && (4*sizeof(uint32_t) != received_phy_sci_msg.getSpecializedSciMsgDataLength()))
- || (NULL == received_phy_sci_msg.getSpecializedSciMsgData()) )
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "received PHY SCI message FC is incorrect", errno);
- }
-
- if (NULL != getInterfaceCb())
- {
- Frame_Control fc;
- unsigned char * pDataIndex = received_phy_sci_msg.getSpecializedSciMsgData();
- if (PHY_TYPE_FC_HYBRID_MODE == received_phy_sci_msg.getSpecializedSciMsgType())
- {
- memcpy(&fc.fc_10, pDataIndex, sizeof(uint32_t));
- pDataIndex += sizeof(uint32_t);
- }
- else
- {
- fc.fc_10 = 0;
- }
- memcpy(fc.fc_av, pDataIndex, 4*sizeof(uint32_t));
-
- Expected_Tx tx;
- tx.src_tx_id = received_phy_sci_msg.getTxId();
- tx.src_station_id = received_phy_sci_msg.getSciMsgStationId();
- mListOfRxFc[tx] = fc;
- }
-
- if (isChannelEnabled())
- {
- getChannel()->receiveFc(received_phy_sci_msg.getSciMsgStationId(), getNetworkClock()->getCurrentTickValue());
- }
-
- return sendMsgToAllStations(received_phy_sci_msg);
-}
-
-
-bool PhyProcessor::receivePrs ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
-
- return sendMsgToAllStations(received_phy_sci_msg);
-}
-
-
-bool PhyProcessor::receiveMpdu ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
- bool bReceiveMpdu = true;
-
- PhySciMsgMpdu mpdu(received_phy_sci_msg);
-
- // Check PHY SCI message data length
- if ( (0 == mpdu.getSpecializedSciMsgDataLength())
- || (NULL == mpdu.getSpecializedSciMsgData()) )
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "received PHY SCI message MPDU is incorrect", errno);
- }
-
- /**
- * Lots of things to do in this function...
- * Not optimized at all, but easier to understand!
- * Following order has to be respected:
- * 1. IF there is a reception callback
- * OR IF the channel perturbation is enabled,
- * THEN update list of received MPDU.
- * 2. IF there is a reception callback
- * AND IF the entire MPDU has been received,
- * THEN call the reception callback.
- * 3. IF the channel perturbation is disabled
- * AND IF there is no reception callback
- * OR IF there is a reception callback AND IF the entire MPDU has been received,
- * THEN re-send the received MPDU and an empty NOISE at the end of the MPDU transmission
- * to destination stations.
- * 4. IF the channel perturbation is enabled
- * AND IF the entire MPDU has been received,
- * THEN send the entire MPDU (with PB measurement) and the NOISE to destination stations
- * (noise must be sent only at the end of the MPDU transmission).
- * 5. IF the entire MPDU has been received,
- * THEN update RX lists.
- */
-
- // Create Expected_Tx for the list of received MPDU and the list of received FC
- Expected_Tx tx;
- tx.src_tx_id = mpdu.getTxId();
- tx.src_station_id = mpdu.getSciMsgStationId();
-
-
- /* 1. Update list of received MPDU. */
-
- if ((NULL != getInterfaceCb()) || isChannelEnabled())
- {
- // Create Mpdu_Payload for the list of received MPDU
- Mpdu_Payload payload;
- memset(&payload, '\0', sizeof(struct Mpdu_Payload));
-
- // Check if a PHY SCI message MPDU with the same transmission ID
- // has already been received from this transmitting station
- bool bFound = false;
- for (RxMpduList::iterator it = mListOfRxMpdu.begin(); it != mListOfRxMpdu.end(); ++it)
- {
- if ((tx.src_tx_id == it->first.src_tx_id)
- && (tx.src_station_id == it->first.src_station_id))
- {
- // If a PHY SCI message MPDU has already been received,
- // update the Mpdu_Payload
- unsigned long dataLength = mListOfRxMpdu[tx].data_length + mpdu.getSpecializedSciMsgDataLength();
- unsigned char * pData = new unsigned char[dataLength];
- memcpy(pData, mListOfRxMpdu[tx].p_data, mListOfRxMpdu[tx].data_length);
- delete [] mListOfRxMpdu[tx].p_data;
- memcpy(pData + mListOfRxMpdu[tx].data_length, mpdu.getSpecializedSciMsgData(), mpdu.getSpecializedSciMsgDataLength());
- payload.msg_nb = mListOfRxMpdu[tx].msg_nb + 1;
- payload.data_length = dataLength;
- payload.p_data = pData;
- memcpy(&payload.pb_header[mListOfRxMpdu[tx].msg_nb * PHY_PB_MAX_NB], mpdu.getPbHeader(), PHY_PB_MAX_NB * sizeof(uint32_t));
-
- bFound = true;
- break;
- }
- }
-
- // It is the 1st PHY SCI message MPDU with the same transmission ID
- // received from this transmitting station
- if (!bFound)
- {
- payload.msg_nb = 1;
- payload.data_length = mpdu.getSpecializedSciMsgDataLength();
- payload.p_data = new unsigned char[payload.data_length];
- memcpy(payload.p_data, mpdu.getSpecializedSciMsgData(), payload.data_length);
- memcpy(payload.pb_header, mpdu.getPbHeader(), PHY_PB_MAX_NB * sizeof(uint32_t));
- }
-
- // Update list of received MPDU
- mListOfRxMpdu[tx] = payload;
- }
- else // update number of received MPDU
- {
- if (0 != mListOfRxMpdu.count(tx))
- {
- mListOfRxMpdu[tx].msg_nb++;
- }
- else
- {
- Mpdu_Payload payload;
- memset(&payload, '\0', sizeof(struct Mpdu_Payload));
- payload.msg_nb = 1;
- mListOfRxMpdu[tx] = payload;
- }
- }
-
-
- /* 2. Call the reception callback. */
-
- if ((NULL != getInterfaceCb()) && mpdu.isReceived(mListOfRxMpdu[tx].msg_nb))
- {
- // Check if a PHY SCI message FC with the same transmission ID
- // has already been received from this transmitting station
- bReceiveMpdu = false;
- for (RxFcList::iterator it = mListOfRxFc.begin(); it != mListOfRxFc.end(); ++it)
- {
- if ((tx.src_tx_id == it->first.src_tx_id)
- && (tx.src_station_id == it->first.src_station_id))
- {
- // Create a PHY SCI message MPDU and configure it
- PhySciMsgMpdu rxMpdu(this);
- bReceiveMpdu = rxMpdu.setSpecializedSciMsgDataLength(mListOfRxMpdu[tx].data_length);
- bReceiveMpdu &= rxMpdu.setSpecializedSciMsgData(mListOfRxMpdu[tx].p_data);
- bReceiveMpdu &= rxMpdu.setFc10((it->second).fc_10);
- bReceiveMpdu &= rxMpdu.setFcAv((it->second).fc_av);
-
- // Call the reception callback
- getInterfaceCb()(rxMpdu);
-
- // Update list of received FC
- mListOfRxFc.erase(it);
-
- break;
- }
- }
-
- // If no PHY SCI message FC with the same transmission ID
- // has been received from this transmitting station,
- // raise an error
- if (!bReceiveMpdu)
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "an MPDU has been received but its FC has not been retrieved", errno);
- }
- }
-
-
- /* 3. Re-send the received MPDU and an empty NOISE at the end of the MPDU transmission
- * to destination stations. */
-
- if (!isChannelEnabled())
- {
- if (NULL == getInterfaceCb())
- {
- sendMpduToDestStations(mpdu);
-
- if (mpdu.isReceived(mListOfRxMpdu[tx].msg_nb))
- {
- // Send empty PHY SCI message NOISE
- PhySciMsgNoise noise(this);
- bReceiveMpdu &= noise.setTxId(mpdu.getTxId());
- bReceiveMpdu &= noise.setSciMsgStationId(mpdu.getSciMsgStationId());
- bReceiveMpdu &= sendEmptyNoiseToDestStations(noise);
-
- // Update list of received MPDU
- mListOfRxMpdu.erase(tx);
-
- // Update list of destination stations
- updateListOfRxStations(mpdu);
- }
- }
- else if (mpdu.isReceived(mListOfRxMpdu[tx].msg_nb))
- {
- // Update PHY SCI message data length and data
- bReceiveMpdu &= mpdu.setMpdu(mListOfRxMpdu[tx].data_length, mListOfRxMpdu[tx].p_data);
-
- // Segmentation in PBs
- bReceiveMpdu &= mpdu.segment();
-
- // For each PHY SCI message composing the MPDU
- for (int n=1; n<=mpdu.getNbOfMsgs(); n++)
- {
- // Prepare PHY SCI message before transmission
- bReceiveMpdu &= mpdu.prepare(n);
-
- bReceiveMpdu &= sendMpduToDestStations(mpdu);
- }
- // Send empty PHY SCI message NOISE
- PhySciMsgNoise noise(this);
- bReceiveMpdu &= noise.setTxId(mpdu.getTxId());
- bReceiveMpdu &= noise.setSciMsgStationId(mpdu.getSciMsgStationId());
- bReceiveMpdu &= sendEmptyNoiseToDestStations(noise);
-
- // Update list of destination stations
- updateListOfRxStations(mpdu);
- }
- }
-
-
- /* 4. Send the entire MPDU (with PB measurement) and the NOISE to destination stations. */
-
- else if (mpdu.isReceived(mListOfRxMpdu[tx].msg_nb))
- {
- // Update PHY SCI message data length and data
- bReceiveMpdu &= mpdu.setMpdu(mListOfRxMpdu[tx].data_length, mListOfRxMpdu[tx].p_data);
-
- // Segmentation in PBs
- bReceiveMpdu &= mpdu.segment();
-
- bReceiveMpdu &= sendMpduAndNoiseToDestStations(mpdu);
- }
-
-
- /* 5. Update RX lists. */
-
- if (((NULL != getInterfaceCb()) || isChannelEnabled()) && mpdu.isReceived(mListOfRxMpdu[tx].msg_nb))
- {
- // Update list of received MPDU
- delete [] mListOfRxMpdu[tx].p_data;
- mListOfRxMpdu.erase(tx);
-
- // Update list of destination stations
- updateListOfRxStations(mpdu);
- }
-
-
- return bReceiveMpdu;
-}
-
-
-bool PhyProcessor::receiveTonemask ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
- bool bReceiveTonemask = false;
-
- // Check PHY SCI message data length
- if ( ((sizeof(unsigned int) + (PHY_CARRIER_NB+7)/8) != received_phy_sci_msg.getSpecializedSciMsgDataLength())
- || (NULL == received_phy_sci_msg.getSpecializedSciMsgData()) )
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "received PHY SCI message TONEMASK is incorrect", errno);
- }
-
- // Set number of active carriers
- unsigned int nbOfCarriers;
- memcpy(&nbOfCarriers, received_phy_sci_msg.getSpecializedSciMsgData(), sizeof(unsigned int));
- setNbOfCarriers(nbOfCarriers);
-
- // Set tonemask
- bReceiveTonemask = setTonemask(received_phy_sci_msg.getSpecializedSciMsgDataLength()-sizeof(unsigned int),
- received_phy_sci_msg.getSpecializedSciMsgData()+sizeof(unsigned int));
-
- if (isChannelEnabled())
- {
- bReceiveTonemask &= getChannel()->setTonemask(getTonemask());
- }
-
- return bReceiveTonemask;
-}
-
-
-bool PhyProcessor::receiveTonemap ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
- bool bReceiveTonemap = true;
-
- if (isChannelEnabled())
- {
- bReceiveTonemap = getChannel()->setTonemap(received_phy_sci_msg.getSciMsgStationId(),
- received_phy_sci_msg.getSpecializedSciMsgDataLength(),
- received_phy_sci_msg.getSpecializedSciMsgData());
- }
-
- return bReceiveTonemap;
-}
-
-
-bool PhyProcessor::receiveRx ( PhySciMsg & received_phy_sci_msg )
-{
- logFunction();
-
- // Check PHY SCI message data length
- if ( (sizeof(Sci_Msg_Station_Id) != received_phy_sci_msg.getSpecializedSciMsgDataLength())
- || (NULL == received_phy_sci_msg.getSpecializedSciMsgData()) )
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "received PHY SCI message RX is incorrect", errno);
- }
-
- // Update list of destination stations
- Expected_Tx tx;
- tx.src_tx_id = received_phy_sci_msg.getTxId();
- tx.src_station_id = *((Sci_Msg_Station_Id *)received_phy_sci_msg.getSpecializedSciMsgData());
- mListOfRxStations.insert(RxStationsList::value_type(tx, received_phy_sci_msg.getSciMsgStationId()));
-
- return true;
-}
-
-
-bool PhyProcessor::sendMsgToAllStations ( PhySciMsg & phy_sci_msg_to_send ) const
-{
- logFunction();
- bool bSendToAll = false;
-
- if (fillMsg(phy_sci_msg_to_send))
- {
- bSendToAll = getSciServer()->sendSciMsgToAllActiveStations(phy_sci_msg_to_send);
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message cannot be sent because it is not correctly filled in", errno);
- }
-
- return bSendToAll;
-}
-
-
-bool PhyProcessor::activateFalseAlarm ( const Network_Clock_Tick average_duration,
- const float std_deviation )
-{
- logFunction();
- bool bActivate = true;
-
- // Check input values
- if ((0 == average_duration) || (0 > std_deviation))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "average duration and/or standard deviation are out-of-range", errno);
- }
-
- // Set false alarm activated, average duration and standard deviation
- mIsFalseAlarmActivated = true;
- mAverageDuration = average_duration;
- mStdDeviation = std_deviation;
-
- if (NULL == mpWrongPre)
- {
- // Create a PHY SCI message of type PREAMBLE and set the flag PHY_FLAG_WRONG_PREAMBLE
- mpWrongPre = new PhySciMsgPre(this);
- bActivate &= mpWrongPre->setFlags(PHY_FLAG_CRC_OK + PHY_FLAG_WRONG_PREAMBLE);
- }
-
- // Schedules the first PHY SCI message of type PREAMBLE with the flag PHY_FLAG_WRONG_PREAMBLE set
- bActivate &= scheduleNextWrongPre(MAXIMUS_PHY_PREAMBLE_DETECTION_DELAY_TCK);
-
- return bActivate;
-}
-
-
-bool PhyProcessor::deactivateFalseAlarm ( )
-{
- mIsFalseAlarmActivated = false;
-
- return true;
-}
-
-
-bool PhyProcessor::setFrequency ( const float frequency )
-{
- bool bFreq = false;
-
- if (0 > frequency)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "frequency is negative", errno);
- }
- else
- {
- if (0 != frequency)
- {
- // Calculate zero-cross delay, and set it
- Network_Clock_Tick zeroCrossDelay = (Network_Clock_Tick)(25000000/(2*frequency));
- bFreq = setZeroCrossDelay(zeroCrossDelay);
-
- if (0 == getFrequency())
- {
- // Schedules a PHY SCI message of type ZERO_CROSS
- bFreq &= scheduleZeroCross();
- }
- }
- else
- {
- mZeroCrossDelay = 0;
- bFreq = true;
- }
-
- mFrequency = frequency;
- }
-
- if (isChannelEnabled())
- {
- // Set beacon period to Channel
- getChannel()->setBeaconPeriod(getFrequency());
- }
-
- return bFreq;
-}
-
-
-float PhyProcessor::getFrequency ( ) const
-{
- if (0 > mFrequency)
- {
- throw Error(__PRETTY_FUNCTION__, "frequency is negative");
- }
-
- return mFrequency;
-}
-
-
-// private methods
-//
-
-
-void PhyProcessor::registerPhySciMsg ( )
-{
- logFunction();
-
- if (!getSciServer()->registerSpecializedSciMsg(SCI_MSG_TYPE_PHY, new PhySciMsg((IPhy*)this)))
- {
- throw Error(__PRETTY_FUNCTION__, "cannot register PHY SCI message to SCI server");
- }
-}
-
-
-Network_Clock_Tick PhyProcessor::calculatePreDelay ( ) const
-{
- logFunction();
-
- return MAXIMUS_PHY_PREAMBLE_DETECTION_DELAY_TCK;
-}
-
-
-Network_Clock_Tick PhyProcessor::calculateFcDelay ( Phy_Fc_Mode fc_mode ) const
-{
- logFunction();
- Network_Clock_Tick fcDelay = 0;
-
- // For frame control transmission/reception time
- unsigned int preDuration = MAC_PREAMBLE_TCK; // in AV mode
- unsigned int fcDuration = MAC_FC_AV_TCK; // in AV mode
-
- // Calculate frame control transimission time
- if ((PHY_FC_MODE_HYBRID_2 == fc_mode)
- || (PHY_FC_MODE_AV_2 == fc_mode))
- {
- fcDuration *= 2; // 2 symbols
- }
- if ((PHY_FC_MODE_HYBRID_1 == fc_mode)
- || (PHY_FC_MODE_HYBRID_2 == fc_mode))
- {
- preDuration = MAC_PREAMBLE_HYBRID_TCK; // in Hybrid mode
- fcDuration += MAC_FC_10_TCK; // in Hybrid mode
- }
- fcDelay = (preDuration - MAXIMUS_PHY_PREAMBLE_DETECTION_DELAY_TCK) \
- + fcDuration \
- + MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK;
-
- return fcDelay;
-}
-
-
-Network_Clock_Tick PhyProcessor::calculateMpduDelay ( Phy_Mod mod,
- Phy_Fecrate fecrate,
- unsigned short int pb_size,
- Phy_Nb_Of_Pbs pb_nb,
- Phy_Gil gil ) const
-{
- logFunction();
- Network_Clock_Tick mpduDelay = 0;
-
- /* MPDU delay depends on tonemask, modulation, fecrate, PB size, number of PBs, guard interval,
- * number of bits per symbol, and number of symbols. */
-
- // Calculate MPDU payload transimission time
- //
- unsigned int bitsPerSymbol = maximus_dur_bits_per_symbol(mod,
- getTonemask(),
- NULL,
- getNbOfCarriers());
- phy_pb_size_t pbSize = (MAC_PB520_BYTES == pb_size) ? PHY_PB_SIZE_520 : PHY_PB_SIZE_136;
- unsigned int symbolNb = maximus_dur_symbol_nb(mod,
- fecrate,
- pbSize,
- bitsPerSymbol,
- pb_nb);
- unsigned int durationInTicks = maximus_dur_data_tck(gil,
- symbolNb);
-
- mpduDelay = durationInTicks - MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK + MAXIMUS_PHY_MPDU_RECEPTION_DELAY_TCK;
-
- return mpduDelay;
-}
-
-
-bool PhyProcessor::fillMsg ( PhySciMsg & phy_sci_msg_to_send ) const
-{
- logFunction();
- bool bFill = false;
-
- // Fill specialized SCI msg header
- //
- struct Phy_Header phySciMsgHeader;
- phySciMsgHeader.version = phy_sci_msg_to_send.getSpecializedSciMsgHeader().version;
- phySciMsgHeader.type = static_cast<uint8_t>(phy_sci_msg_to_send.getSpecializedSciMsgType());
- phySciMsgHeader.mpdu_format = static_cast<uint8_t>(phy_sci_msg_to_send.getMpduFormat());
- phySciMsgHeader.pb_nb = phy_sci_msg_to_send.getNbOfPbs();
- if (PHY_TYPE_MPDU_PAYLOAD == phySciMsgHeader.type)
- {
- phySciMsgHeader.msg_nb = static_cast<uint8_t>(((PhySciMsgMpdu *)&phy_sci_msg_to_send)->getNbOfMsgs());
- }
- else
- {
- phySciMsgHeader.msg_nb = 1;
- }
- phySciMsgHeader.fc_mode = phy_sci_msg_to_send.getFcMode();
- phySciMsgHeader.short_ppdu = phy_sci_msg_to_send.getShortPpdu();
- phySciMsgHeader.mod = phy_sci_msg_to_send.getMod();
- phySciMsgHeader.fecrate = phy_sci_msg_to_send.getFecrate();
- phySciMsgHeader.gil = phy_sci_msg_to_send.getGil();
- phySciMsgHeader.tonemap_index = phy_sci_msg_to_send.getTonemapIndex();
- phySciMsgHeader.tx_id = htons(phy_sci_msg_to_send.getTxId());
- phySciMsgHeader.flags = htons(phy_sci_msg_to_send.getFlags());
- phySciMsgHeader.reserved = htons(phy_sci_msg_to_send.getReserved());
- phySciMsgHeader.symbol_nb = htonl(phy_sci_msg_to_send.getNbOfSymbols());
- for (unsigned int i=0; i<3; i++)
- {
- phySciMsgHeader.iv[i] = htonl(phy_sci_msg_to_send.getIv()[i]);
- }
- for (unsigned int i=0; i<4; i++)
- {
- phySciMsgHeader.nek[i] = htonl(phy_sci_msg_to_send.getNek()[i]);
- }
- for (unsigned int i=0; i<PHY_PB_MAX_NB; i++)
- {
- phySciMsgHeader.pb_measurement[i] = htonl(phy_sci_msg_to_send.getPbMeasurement()[i]);
- phySciMsgHeader.pb_header[i] = htonl(phy_sci_msg_to_send.getPbHeader()[i]);
- }
-
- // Set specialized SCI msg header
- //
- bFill = phy_sci_msg_to_send.setSpecializedSciMsgHeader(phySciMsgHeader);
-
- // Fill specialized SCI msg attributes:
- // - header size
- //
- bFill &= phy_sci_msg_to_send.setSpecializedSciMsgHeaderSize(sizeof(struct Phy_Header));
-
- // Fill SCI msg attributes:
- // - type
- //
- bFill &= phy_sci_msg_to_send.setSciMsgType(SCI_MSG_TYPE_PHY);
-
- return bFill;
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-ISci * PhyProcessor::getSciServer ( ) const
-{
- if (NULL == mpSciServer)
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
-
- return mpSciServer;
-}
-
-
-bool PhyProcessor::setNetworkClock ( INetworkClock * p_network_clock )
-{
- bool bSetNetworkClock = false;
-
- if (NULL == p_network_clock)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Network Clock pointer is NULL", errno);
- }
- else
- {
- mpNetworkClock = p_network_clock;
- bSetNetworkClock = true;
- }
-
- return bSetNetworkClock;
-}
-
-
-INetworkClock * PhyProcessor::getNetworkClock ( ) const
-{
- if (NULL == mpNetworkClock)
- {
- throw Error(__PRETTY_FUNCTION__, "Network Clock pointer is NULL");
- }
-
- return mpNetworkClock;
-}
-
-
-bool PhyProcessor::setChannel ( IChannel * p_channel )
-{
- bool bSetChannel = true;
-
- if (NULL == p_channel)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Channel pointer is NULL", errno);
- }
-
- mpChannel = p_channel;
- if (NULL != mpTonemask)
- {
- bSetChannel = p_channel->setTonemask(getTonemask());
- }
-
- return bSetChannel;
-}
-
-
-IChannel * PhyProcessor::getChannel ( ) const
-{
- if (NULL == mpChannel)
- {
- throw Error(__PRETTY_FUNCTION__, "Channel pointer is NULL");
- }
-
- return mpChannel;
-}
-
-
-bool PhyProcessor::setIsChannelEnabled ( const bool is_channel_enabled )
-{
- mIsChannelEnabled = is_channel_enabled;
-
- return true;
-}
-
-
-bool PhyProcessor::isChannelEnabled ( ) const
-{
- return mIsChannelEnabled;
-}
-
-
-unsigned int PhyProcessor::getNbOfCarriers ( ) const
-{
- if ((PHY_CARRIER_NB < mNbOfCarriers) || (0 == mNbOfCarriers))
- {
- throw Error(__PRETTY_FUNCTION__, "number of carriers has not been correctly set");
- }
-
- return mNbOfCarriers;
-}
-
-
-bool PhyProcessor::setNbOfCarriers ( const unsigned int nb_of_carriers )
-{
- if ((PHY_CARRIER_NB < nb_of_carriers) || (0 == nb_of_carriers))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "number of carriers is out-of-range", errno);
- }
-
- mNbOfCarriers = nb_of_carriers;
- return true;
-}
-
-
-const uint8_t * PhyProcessor::getTonemask ( ) const
-{
- if (NULL == mpTonemask)
- {
- throw Error(__PRETTY_FUNCTION__, "tonemask pointer is NULL");
- }
-
- return mpTonemask;
-}
-
-
-bool PhyProcessor::setTonemask ( const unsigned int length, const uint8_t * p_tonemask )
-{
- if (((PHY_CARRIER_NB+7)/8 != length) || (NULL == p_tonemask))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "tonemask length is incorrect and/or tonemask pointer is NULL", errno);
- }
-
- // If tonemask has already been set, delete it before setting the new one
- if (NULL != mpTonemask)
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "tonemask already set" << endl;
-#endif /* CONFIG_LOG */
- delete [] mpTonemask;
- mpTonemask = NULL;
- }
-
- // Allocate memory and set tonemask
- mpTonemask = new uint8_t[length];
- return (NULL != memcpy(mpTonemask, p_tonemask, length));
-}
-
-
-Phy_Tx_Id PhyProcessor::getTxId ( ) const
-{
- return mTxId;
-}
-
-
-bool PhyProcessor::incrementTxId ( )
-{
- mTxId++;
-
- return true;
-}
-
-
-PhyMpduCb PhyProcessor::getInterfaceCb ( ) const
-{
- return mInterfaceCb;
-}
-
-
-Network_Clock_Tick PhyProcessor::getZeroCrossDelay ( ) const
-{
- if (0 == mZeroCrossDelay)
- {
- throw Error(__PRETTY_FUNCTION__, "zero cross delay equals 0");
- }
-
- return mZeroCrossDelay;
-}
-
-
-bool PhyProcessor::setZeroCrossDelay ( const Network_Clock_Tick zero_cross_delay )
-{
- if (0 == zero_cross_delay)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "zero cross delay equals 0", errno);
- }
-
- mZeroCrossDelay = zero_cross_delay;
-
- return true;
-}
-
-
-PhySciMsg * PhyProcessor::getZeroCross ( ) const
-{
- if (NULL == mpZeroCross)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message of type ZERO_CROSS pointer is NULL");
- }
-
- return mpZeroCross;
-}
-
-
-bool PhyProcessor::scheduleZeroCross ( )
-{
- // Schedule ZERO_CROSS message
- Network_Clock_Tick tickZeroCross = getNetworkClock()->getCurrentTickValue() + getZeroCrossDelay();
- NetworkClockEvt evtZeroCross ( 0, // station_id
- NETWORK_CLOCK_TYPE_PHY,
- 0, // id = 0 for ZERO_CROSS
- (void *)getZeroCross() );
- return getNetworkClock()->insertEvt(tickZeroCross, evtZeroCross);
-}
-
-
-bool PhyProcessor::sendMpduToDestStations ( PhySciMsgMpdu & mpdu )
-{
- logFunction();
- bool bSendToDest = false;
-
- if (fillMsg(mpdu))
- {
- Expected_Tx tx;
- tx.src_tx_id = mpdu.getTxId();
- tx.src_station_id = mpdu.getSciMsgStationId();
-
- // Build list of destination stations
- DestStationsList listOfDestStations;
- for (RxStationsList::iterator it = mListOfRxStations.begin(); it != mListOfRxStations.end(); ++it)
- {
- if ((tx.src_tx_id == it->first.src_tx_id)
- && (tx.src_station_id == it->first.src_station_id))
- {
- listOfDestStations.push_back(it->second);
- }
- }
-
- bSendToDest = getSciServer()->sendSciMsgToDestStations(mpdu, listOfDestStations);
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message MPDU cannot be sent because it is not correctly filled in", errno);
- }
-
- return bSendToDest;
-}
-
-
-bool PhyProcessor::sendEmptyNoiseToDestStations ( PhySciMsgNoise & noise )
-{
- logFunction();
- bool bSendEmptyNoise = noise.prepare();
-
- if (fillMsg(noise))
- {
- // Build list of destination stations
- DestStationsList listOfDestStations;
- for (RxStationsList::iterator it = mListOfRxStations.begin(); it != mListOfRxStations.end(); ++it)
- {
- if ((noise.getTxId() == it->first.src_tx_id)
- && (noise.getSciMsgStationId() == it->first.src_station_id))
- {
- listOfDestStations.push_back(it->second);
- }
- }
-
- bSendEmptyNoise &= getSciServer()->sendSciMsgToDestStations(noise, listOfDestStations);
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Empty PHY SCI message NOISE cannot be sent because it is not correctly filled in", errno);
- }
-
- return bSendEmptyNoise;
-}
-
-
-bool PhyProcessor::sendMpduAndNoiseToDestStations ( PhySciMsgMpdu & mpdu )
-{
- logFunction();
- bool bSendMpduAndNoise = true;
-
- /**
- * Lots of things to do in this function...
- * Following order has to be respected:
- * 1. Compute PB measurement and NOISE for each destination station.
- * 2. Set PB measurement and send MPDU to each destination station.
- * 3. Send NOISE to each destination station.
- * 4. Update list of destination stations.
- */
-
- map<Sci_Msg_Station_Id, uint32_t *> listOfPbMeasurements;
- map<Sci_Msg_Station_Id, PhySciMsgNoise *> listOfNoises;
-
-
- /* 1. Compute PB measurement and NOISE for each destination station. */
- Expected_Tx tx;
- tx.src_tx_id = mpdu.getTxId();
- tx.src_station_id = mpdu.getSciMsgStationId();
-
- // Duplicate MPDU payload
- bSendMpduAndNoise &= getChannel()->duplicateMpduPayload(mpdu);
-
- // For each destination station
- for (RxStationsList::iterator it = mListOfRxStations.begin(); it != mListOfRxStations.end(); ++it)
- {
- if ((tx.src_tx_id == it->first.src_tx_id)
- && (tx.src_station_id == it->first.src_station_id))
- {
- // Create empty PB measurement and empty NOISE
- uint32_t * pbMeasurementArray = new uint32_t[MAC_MAX_PB_PER_MPDU];
- PhySciMsgNoise * pNoise = new PhySciMsgNoise(this);
- bSendMpduAndNoise &= pNoise->setTxId(mpdu.getTxId());
- bSendMpduAndNoise &= pNoise->setSciMsgStationId(mpdu.getSciMsgStationId());
-
- // Let the Channel package fill in the PB measurement and the NOISE
- bSendMpduAndNoise &= getChannel()->addPerturbation(pbMeasurementArray,
- *pNoise,
- mListOfRxMpdu[tx].pb_header,
- mpdu,
- mpdu.getSciMsgStationId(), // ID of the transmitting station
- it->second, // ID of the destination station
- getNetworkClock()->getCurrentTickValue());
-
- // Save the PB measurement and the NOISE for the current destination station
- listOfPbMeasurements[it->second] = pbMeasurementArray;
- listOfNoises[it->second] = pNoise;
- }
- }
-
- // Check number of destination stations
- if (listOfPbMeasurements.size() != listOfNoises.size())
- {
- throw Error(__PRETTY_FUNCTION__, "number of elements in PB measurement and NOISE lists are different");
- }
-
-
- /* 2. Set PB measurement and send MPDU to each destination station. */
-
- // Create an empty list of destination station,
- // that will be composed of one element only
- DestStationsList listOfDestStation;
-
- // For each PHY SCI message composing the MPDU
- for (int n = 0; n < mpdu.getNbOfMsgs(); n++)
- {
- // Prepare PHY SCI message before transmission
- bSendMpduAndNoise &= mpdu.prepare(n+1);
-
- // For each destination station
- for (RxStationsList::iterator it = mListOfRxStations.begin(); it != mListOfRxStations.end(); ++it)
- {
- if ((mpdu.getTxId() == it->first.src_tx_id)
- && (mpdu.getSciMsgStationId() == it->first.src_station_id))
- {
- // Set PB measurement of the current destination station
- bSendMpduAndNoise &= mpdu.setPbMeasurement(listOfPbMeasurements[it->second] + n * PHY_PB_MAX_NB);
-
- if (fillMsg(mpdu))
- {
- // Send the (n+1)th PHY SCI message MPDU to the current destination station
- listOfDestStation.push_back(it->second);
- bSendMpduAndNoise &= getSciServer()->sendSciMsgToDestStations(mpdu, listOfDestStation);
-
- listOfDestStation.clear();
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message MPDU cannot be sent because it is not correctly filled in", errno);
- }
- }
- }
- }
-
-
- /* 3. Send NOISE to each destination station. */
-
- // For each destination station
- for (RxStationsList::iterator it = mListOfRxStations.begin(); it != mListOfRxStations.end(); ++it)
- {
- if ((mpdu.getTxId() == it->first.src_tx_id)
- && (mpdu.getSciMsgStationId() == it->first.src_station_id))
- {
- // Clear list of PB measurements
- delete [] listOfPbMeasurements[it->second];
- listOfPbMeasurements.erase(it->second);
-
- // Prepare PHY SCI message before transmission
- bSendMpduAndNoise &= (listOfNoises[it->second])->prepare();
-
- // Send NOISE to the current destination station
- if (fillMsg(*(listOfNoises[it->second])))
- {
- listOfDestStation.push_back(it->second);
- bSendMpduAndNoise &= getSciServer()->sendSciMsgToDestStations(*(listOfNoises[it->second]), listOfDestStation);
-
- // Clear list of noises
- delete (listOfNoises[it->second]);
- listOfNoises.erase(it->second);
-
- listOfDestStation.clear();
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message NOISE cannot be sent because it is not correctly filled in", errno);
- }
- }
- }
-
-
- /* 4. Update list of destination stations. */
-
- if (mpdu.isSent())
- {
- updateListOfRxStations(mpdu);
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message MPDU has not been correctly sent");
- }
-
-
- return bSendMpduAndNoise;
-}
-
-
-void PhyProcessor::updateListOfRxStations ( PhySciMsgMpdu & mpdu )
-{
- logFunction();
-
- for (RxStationsList::iterator it = mListOfRxStations.begin(); it != mListOfRxStations.end();)
- {
- RxStationsList::iterator pos = it;
- ++it;
- if ((mpdu.getTxId() == pos->first.src_tx_id)
- && (mpdu.getSciMsgStationId() == pos->first.src_station_id))
- {
- mListOfRxStations.erase(pos);
- }
- }
-}
-
-
-bool PhyProcessor::isFalseAlarmActivated ( ) const
-{
- return mIsFalseAlarmActivated;
-}
-
-
-PhySciMsgPre * PhyProcessor::getWrongPre ( ) const
-{
- if (NULL == mpWrongPre)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message of type PREAMBLE pointer is NULL");
- }
-
- return mpWrongPre;
-}
-
-
-Network_Clock_Tick PhyProcessor::getAverageDuration ( ) const
-{
- return mAverageDuration;
-}
-
-
-float PhyProcessor::getStdDeviation ( ) const
-{
- return mStdDeviation;
-}
-
-
-Network_Clock_Tick PhyProcessor::calculateNextWrongPreDate ( ) const
-{
- logFunction();
-
- boost::mt19937 engine;
- engine.seed(static_cast<unsigned int>(time(0)));
- boost::normal_distribution<double> norm(getAverageDuration(), getStdDeviation());
- boost::variate_generator<boost::mt19937, boost::normal_distribution<double> > normal(engine, norm);
-
- return static_cast<Network_Clock_Tick>(normal());
-}
-
-
-bool PhyProcessor::scheduleNextWrongPre ( const Network_Clock_Tick tick_wrong_pre ) const
-{
- logFunction();
-
- // Schedule next wrong PREAMBLE message
- NetworkClockEvt evtWrongPre ( 0, // station_id
- NETWORK_CLOCK_TYPE_PHY,
- 0, // id = 0 for PREAMBLE
- (void *)getWrongPre() );
-
- return getNetworkClock()->insertEvt(getNetworkClock()->getCurrentTickValue() + tick_wrong_pre, evtWrongPre);
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/phy/src/PhyProcessorTest.cpp b/cesar/maximus/phy/src/PhyProcessorTest.cpp
deleted file mode 100644
index 0936ebb7b3..0000000000
--- a/cesar/maximus/phy/src/PhyProcessorTest.cpp
+++ /dev/null
@@ -1,583 +0,0 @@
-
-#include "PhyProcessorTest.h"
-
-#include "PhyProcessor.h"
-#include "CoreEngine.h"
-#include "SystemManager.h"
-#include "PhySciMsg.h"
-#include "PhySciMsgPre.h"
-#include "PhySciMsgFc.h"
-#include "PhySciMsgMpdu.h"
-#include "NetworkClockEvt.h"
-#include "ChannelComputer.h"
-#include "SciServer.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-#include <iostream>
-#include <netinet/in.h> // for 'htons()'
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (PhyProcessorTest);
-
-bool isCbCalledTest = false;
-
-void interfaceCbTest ( PhySciMsgMpdu & mpdu )
-{
- logTest();
-
- isCbCalledTest = true;
-}
-
-
-void PhyProcessorTest::setUp (void)
-{
- logTest();
-
- mpCoreEngine = new CoreEngine();
- mpPhyProcessor = (PhyProcessor*)mpCoreEngine->getPhy();
- CPPUNIT_ASSERT_MESSAGE ( "PHY processor pointer is NULL", NULL != mpPhyProcessor );
-}
-
-
-void PhyProcessorTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpPhyProcessor)
- {
- mpPhyProcessor = NULL;
- }
- if (NULL != mpCoreEngine)
- {
- delete (mpCoreEngine);
- mpCoreEngine = NULL;
- }
-}
-
-
-void PhyProcessorTest::initTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE ( "init failed", mpPhyProcessor->init(&interfaceCbTest) );
- CPPUNIT_ASSERT_MESSAGE ( "init failed", mpPhyProcessor->init(50) );
-}
-
-
-void PhyProcessorTest::createMsgTest (void)
-{
- logTest();
-
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message not correctly created",
- mpPhyProcessor == pPhySciMsg->getPhyProcessor() );
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::createMpduTest (void)
-{
- logTest();
-
- unsigned long length = 5;
- unsigned char payload[length];
- memset(payload, 'M', length);
-
- PhySciMsgMpdu * pPhySciMsgMpdu = mpPhyProcessor->createMpdu();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message MPDU pointer is NULL", NULL != pPhySciMsgMpdu );
-
- pPhySciMsgMpdu->setMpdu(length, payload);
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message MPDU not correctly created",
- (mpPhyProcessor == pPhySciMsgMpdu->getPhyProcessor())
- && (length == pPhySciMsgMpdu->getPayloadLength())
- && (0 == memcmp(payload, pPhySciMsgMpdu->getPayload(), length))
- );
-
- if (NULL != pPhySciMsgMpdu)
- {
- delete (pPhySciMsgMpdu);
- pPhySciMsgMpdu = NULL;
- }
-}
-
-
-void PhyProcessorTest::sendMsgTest (void)
-{
- logTest();
-
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
-
- // create the transmitting station
- mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set the destination station
- pPhySciMsg->setSciMsgStationId(stationId);
-
- // set the type
- pPhySciMsg->setSpecializedSciMsgType(PHY_TYPE_ZERO_CROSS);
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message has not been sent", mpPhyProcessor->sendMsgToAllStations(*pPhySciMsg) );
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::sendMpduTest (void)
-{
- logTest();
-
- // create MPDU
- PhySciMsgMpdu * pPhySciMsgMpdu = mpPhyProcessor->createMpdu();
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message MPDU pointer is NULL", NULL != pPhySciMsgMpdu );
-
- // configure MPDU
- unsigned long length = 5;
- unsigned char payload[length];
- memset(payload, 'M', length);
- pPhySciMsgMpdu->setMpdu(length, payload);
-
- // set modulation
- pPhySciMsgMpdu->setMod(PHY_MOD_ROBO);
-
- // set carrier number and tonemask
- unsigned int carrierNb = PHY_CARRIER_NB;
- uint8_t tonemaskData[sizeof(unsigned int) + ((PHY_CARRIER_NB+7)/8)*sizeof(uint8_t)];
- memcpy(tonemaskData, &carrierNb, sizeof(unsigned int));
- memset(tonemaskData + sizeof(unsigned int), 0xCC, (PHY_CARRIER_NB+7)/8*sizeof(uint8_t));
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
- pPhySciMsg->setSpecializedSciMsgDataLength(sizeof(unsigned int) + ((PHY_CARRIER_NB+7)/8)*sizeof(uint8_t));
- pPhySciMsg->setSpecializedSciMsgData((unsigned char *)tonemaskData);
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message TONEMASK reception error",
- mpPhyProcessor->receiveTonemask(*pPhySciMsg) );
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-
- // set FEC rate
- pPhySciMsgMpdu->setFecrate(PHY_FEC_RATE_1_2);
-
- // set PB number
- pPhySciMsgMpdu->setNbOfPbs(1);
-
- // set Guard Interval
- pPhySciMsgMpdu->setGil(PHY_GIL_417);
-
- // set PB size
- pPhySciMsgMpdu->setPbSize(MAC_PB136_BYTES);
-
- // set FC mode
- pPhySciMsgMpdu->setFcMode(PHY_FC_MODE_HYBRID_1);
-
- // set FC
- uint32_t fc_av[4];
- memset(fc_av, 'A', 4*sizeof(uint32_t));
- uint32_t fc_10 = 10;
- pPhySciMsgMpdu->setFc10(fc_10);
- pPhySciMsgMpdu->setFcAv(fc_av);
-
- // create the transmitting station
- mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set the destination station
- pPhySciMsgMpdu->setSciMsgStationId(stationId);
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message MPDU not sent",
- mpPhyProcessor->sendMpdu(pPhySciMsgMpdu) );
-
- if (NULL != pPhySciMsgMpdu)
- {
- delete (pPhySciMsgMpdu);
- pPhySciMsgMpdu = NULL;
- }
-}
-
-
-void PhyProcessorTest::receiveEvtTest (void)
-{
- logTest();
-
- PhySciMsgMpdu * pPhySciMsgMpdu = mpPhyProcessor->createMpdu(); // will be deleted by 'receiveEvt'
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message MPDU pointer is NULL", NULL != pPhySciMsgMpdu);
-
- unsigned long length = 5;
- unsigned char payload[length];
- memset(payload, 'M', length);
- pPhySciMsgMpdu->setMpdu(length, payload);
-
- pPhySciMsgMpdu->segment();
-
- // create the destination station
- Sci_Msg_Station_Id rxStationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // send an RX message
- PhySciMsg rx(mpPhyProcessor);
- rx.setSciMsgStationId(rxStationId);
- rx.setSpecializedSciMsgDataLength(sizeof(Sci_Msg_Station_Id));
- Sci_Msg_Station_Id txStationId = getpid();
- rx.setSpecializedSciMsgData((unsigned char *)&txStationId);
- CPPUNIT_ASSERT_MESSAGE ( "receiveRx failed", mpPhyProcessor->receiveRx(rx) );
-
- NetworkClockEvt evt(0 /* station_id */, NETWORK_CLOCK_TYPE_PHY, 1 /* id */, (void *)pPhySciMsgMpdu);
-
- CPPUNIT_ASSERT_MESSAGE ( "Event received but not correctly processed",
- mpPhyProcessor->receiveEvt(evt) );
-
- if (NULL != pPhySciMsgMpdu)
- {
- delete (pPhySciMsgMpdu);
- pPhySciMsgMpdu = NULL;
- }
-}
-
-
-void PhyProcessorTest::receiveInvalidTest (void)
-{
- logTest();
- bool bTest = false;
-
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
-
- try
- {
- CPPUNIT_ASSERT_MESSAGE ( "receiveInvalid failed", !mpPhyProcessor->receiveInvalid(*pPhySciMsg) );
- }
- catch (Error & e)
- {
- bTest = true;
- }
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveInvalid failed", bTest);
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::receivePreTest (void)
-{
- logTest();
-
- PhySciMsgPre preamble(mpPhyProcessor);
-
- // create the transmitting station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set station id
- preamble.setSciMsgStationId(stationId);
-
- CPPUNIT_ASSERT_MESSAGE ( "receivePre failed", mpPhyProcessor->receivePre(preamble) );
-}
-
-
-void PhyProcessorTest::receiveFcTest (void)
-{
- logTest();
-
- PhySciMsgFc frameControl(mpPhyProcessor);
-
- // create the transmitting station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set station id
- frameControl.setSciMsgStationId(stationId);
-
- // set PHY SCI message data length and data
- uint32_t fcAv[4];
- memset(fcAv, 'F', 4*sizeof(uint32_t));
- frameControl.setSpecializedSciMsgDataLength(4*sizeof(uint32_t));
- frameControl.setSpecializedSciMsgData((unsigned char *)fcAv);
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg failed", mpPhyProcessor->receiveFc(frameControl) );
-}
-
-
-void PhyProcessorTest::receivePrsTest (void)
-{
- logTest();
-
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
-
- // create the transmitting station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set station id
- pPhySciMsg->setSciMsgStationId(stationId);
-
- // set the type
- pPhySciMsg->setSpecializedSciMsgType(PHY_TYPE_PRS);
-
- CPPUNIT_ASSERT_MESSAGE ( "receivePrs failed", mpPhyProcessor->receivePrs(*pPhySciMsg) );
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::receiveMpduTest (void)
-{
- logTest();
-
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
-
- // create the transmitting station
- Sci_Msg_Station_Id txStationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- Sci_Msg_Station_Id rxStationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set station id
- Sci_Msg_Header sciHdr;
- memset(&sciHdr, '\0', sizeof(struct Sci_Msg_Header));
- sciHdr.station_id = txStationId;
- pPhySciMsg->setSciMsgHeader(sciHdr);
-
- // set type, msg nb and tx id
- Phy_Header phyHdr;
- memset(&phyHdr, '\0', sizeof(struct Phy_Header));
- phyHdr.type = PHY_TYPE_MPDU_PAYLOAD;
- phyHdr.msg_nb = 1;
- phyHdr.tx_id = htons(33);
- pPhySciMsg->setSpecializedSciMsgHeader(phyHdr);
-
- // set PHY SCI message data length and data
- unsigned long dataLength = MAC_PB520_BYTES;
- unsigned char data[dataLength];
- memset(data, 'D', dataLength);
- pPhySciMsg->setSpecializedSciMsgDataLength(dataLength);
- pPhySciMsg->setSpecializedSciMsgData(data);
-
- // set the interface callback function for PHY SCI message MPDU reception
- CPPUNIT_ASSERT_MESSAGE ( "init failed", mpPhyProcessor->init(&interfaceCbTest) );
-
- // send a FC message
- PhySciMsgFc frameControl(mpPhyProcessor);
- frameControl.setSciMsgStationId(txStationId);
- frameControl.setTxId(33);
- uint32_t fcAv[4];
- for (int i=0; i<4; i++)
- {
- fcAv[i] = i;
- }
- frameControl.setSpecializedSciMsgDataLength(4*sizeof(uint32_t));
- frameControl.setSpecializedSciMsgData((unsigned char *)fcAv);
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg failed", mpPhyProcessor->receiveFc(frameControl) );
-
- // send an RX message
- PhySciMsg rx(mpPhyProcessor);
- rx.setSciMsgStationId(rxStationId);
- rx.setTxId(33);
- rx.setSpecializedSciMsgDataLength(sizeof(Sci_Msg_Station_Id));
- rx.setSpecializedSciMsgData((unsigned char *)&txStationId);
- CPPUNIT_ASSERT_MESSAGE ( "receiveRx failed", mpPhyProcessor->receiveRx(rx) );
-
- // send the MPDU
- CPPUNIT_ASSERT_MESSAGE ( "receiveMpdu failed", mpPhyProcessor->receiveMpdu(*pPhySciMsg)
- && isCbCalledTest );
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::receiveTonemaskTest (void)
-{
- logTest();
-
- // set carrier number and tonemask
- unsigned int tonemaskLength = (PHY_CARRIER_NB+7)/8;
- unsigned int carrierNb = PHY_CARRIER_NB-3;
- uint8_t tonemaskData[sizeof(unsigned int) + tonemaskLength];
- memcpy(tonemaskData, &carrierNb, sizeof(unsigned int));
- memset(tonemaskData + sizeof(unsigned int), 0xDD, tonemaskLength);
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg);
- pPhySciMsg->setSpecializedSciMsgDataLength(sizeof(unsigned int) + tonemaskLength);
- pPhySciMsg->setSpecializedSciMsgData((unsigned char *)tonemaskData);
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message TONEMASK reception error",
- mpPhyProcessor->receiveTonemask(*pPhySciMsg));
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::receiveTonemapTest (void)
-{
- logTest();
-
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
-
- // create the transmitting station
- Sci_Msg_Station_Id stationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set station id
- pPhySciMsg->setSciMsgStationId(stationId);
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveTonemap failed", mpPhyProcessor->receiveTonemap(*pPhySciMsg) );
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::receiveRxTest (void)
-{
- logTest();
-
- PhySciMsg * pPhySciMsg = mpPhyProcessor->createMsg();
-
- CPPUNIT_ASSERT_MESSAGE ( "PHY SCI message pointer is NULL", NULL != pPhySciMsg );
-
- // create the transmitting station
- Sci_Msg_Station_Id txStationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // create the destination station
- Sci_Msg_Station_Id rxStationId = mpCoreEngine->getSystem()->createStation(mpCoreEngine->getSystem()->getDefaultStationExecutable());
-
- // set the destination station
- pPhySciMsg->setSciMsgStationId(rxStationId);
-
- // set PHY SCI message data length and data
- pPhySciMsg->setSpecializedSciMsgDataLength(sizeof(Sci_Msg_Station_Id));
- pPhySciMsg->setSpecializedSciMsgData((unsigned char *)&txStationId);
-
- CPPUNIT_ASSERT_MESSAGE ( "receiveRx failed", mpPhyProcessor->receiveRx(*pPhySciMsg) );
-
- if (NULL != pPhySciMsg)
- {
- delete (pPhySciMsg);
- pPhySciMsg = NULL;
- }
-}
-
-
-void PhyProcessorTest::setNetworkClockTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE ( "setNetworkClock failed",
- mpPhyProcessor->setNetworkClock(mpCoreEngine->getNetworkClock()) );
-}
-
-
-void PhyProcessorTest::setChannelTest (void)
-{
- logTest();
-
- SciServer sci;
- SystemManager system((ISci *)&sci);
- ChannelComputer channel(mpPhyProcessor, (ISystem *)&system);
- CPPUNIT_ASSERT_MESSAGE ( "setChannel failed",
- mpPhyProcessor->setChannel((IChannel *)&channel) );
-}
-
-
-void PhyProcessorTest::setIsChannelEnabledTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE ( "setIsChannelEnabled failed",
- mpPhyProcessor->setIsChannelEnabled(true) );
-}
-
-
-void PhyProcessorTest::setFrequencyTest (void)
-{
- logTest();
-
- float freq = 52.5; // in Hz
- CPPUNIT_ASSERT_MESSAGE ( "setFrequency failed",
- mpPhyProcessor->init(50)
- && mpPhyProcessor->setFrequency(freq)
- && (freq == mpPhyProcessor->getFrequency()) );
-}
-
-
-void PhyProcessorTest::activateFalseAlarmTest (void)
-{
- logTest();
-
- Network_Clock_Tick averageDuration = 10;
- float stdDeviation = 0.1;
- CPPUNIT_ASSERT_MESSAGE ( "activateFalseAlarm failed",
- mpPhyProcessor->activateFalseAlarm(averageDuration, stdDeviation) );
- CPPUNIT_ASSERT_MESSAGE ( "activateFalseAlarm failed",
- mpPhyProcessor->activateFalseAlarm(averageDuration, stdDeviation) );
-}
-
-
-void PhyProcessorTest::deactivateFalseAlarmTest (void)
-{
- logTest();
-
- Network_Clock_Tick averageDuration = 10;
- float stdDeviation = 0.1;
- CPPUNIT_ASSERT_MESSAGE ( "deactivateFalseAlarm failed", mpPhyProcessor->deactivateFalseAlarm() );
- CPPUNIT_ASSERT_MESSAGE ( "activateFalseAlarm failed",
- mpPhyProcessor->activateFalseAlarm(averageDuration, stdDeviation) );
- CPPUNIT_ASSERT_MESSAGE ( "deactivateFalseAlarm failed", mpPhyProcessor->deactivateFalseAlarm() );
-}
-
diff --git a/cesar/maximus/phy/src/PhySciMsg.cpp b/cesar/maximus/phy/src/PhySciMsg.cpp
deleted file mode 100644
index 0b8bae74b1..0000000000
--- a/cesar/maximus/phy/src/PhySciMsg.cpp
+++ /dev/null
@@ -1,956 +0,0 @@
-/************************************************************************
- PhySciMsg.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/src/PhySciMsg.cpp
-**************************************************************************/
-
-#include "PhySciMsg.h"
-#include "IPhy.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include "mac/common/tonemap.h" // for 'TONEMAP_INDEX_NB'
-
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <netinet/in.h> // for 'ntohl()' and 'ntohs()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-#include <sstream> // for 'ostringstream'
-#include <string> // for 'memset()' and 'memcpy()'
-#include <boost/function.hpp> // for 'ReceiveFunction'
-using namespace std;
-
-typedef boost::function <bool (IPhy *, PhySciMsg &)> ReceiveFunction;
-ReceiveFunction receiveFunction[PHY_TYPE_NB] = { &IPhy::receiveInvalid, // NONE
- &IPhy::receivePre, // PREAMBLE
- &IPhy::receiveFc, // FC_HYBRID_MODE
- &IPhy::receiveFc, // FC_AV_ONLY_MODE
- &IPhy::receivePrs, // PRS
- &IPhy::receiveMpdu, // MPDU_PAYLOAD
- &IPhy::receiveTonemask, // TONEMASK
- &IPhy::receiveTonemap, // TONEMAP
- &IPhy::receiveInvalid, // NOISE
- &IPhy::receiveRx, // RX
- &IPhy::receiveInvalid }; // ZERO_CROSS
-
-
-// Constructors/Destructors
-//
-
-
-PhySciMsg::PhySciMsg ( IPhy * p_phy_processor ):
-mSpecializedSciMsgType(PHY_TYPE_NONE),
-mMpduFormat(PHY_MPDU_FORMAT_NONE),
-mNbOfPbs(0),
-mNbOfMsgs(1),
-mFcMode(PHY_FC_MODE_NONE),
-mShortPpdu(false),
-mMod(PHY_MOD_NONE),
-mFecrate(PHY_FEC_RATE_NONE),
-mGil(PHY_GIL_NONE),
-mTonemapIndex(0),
-mTxId(0),
-mFlags(PHY_FLAG_NONE),
-mIsEncrypted(false),
-mIsCrcOk(false),
-mPbSize(0),
-mReserved(0),
-mNbOfSymbols(0),
-mpPhyProcessor(NULL),
-mIsSent(false)
-{
- logFunction();
-
- if (NULL != p_phy_processor)
- {
- mpPhyProcessor = p_phy_processor;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY processor pointer is NULL", errno);
- }
-
- initAttributes ();
-}
-
-
-void PhySciMsg::initAttributes ( )
-{
- logFunction();
-
- memset(mIvArray, '\0', 3*sizeof(uint32_t));
- memset(mNekArray, '\0', 4*sizeof(uint32_t));
- memset(mPbMeasurementArray, '\0', PHY_PB_MAX_NB*sizeof(uint32_t));
- memset(mPbHeaderArray, '\0', PHY_PB_MAX_NB*sizeof(uint32_t));
-
- mSpecializedSciMsgHeader.version = PHY_VERSION;
- mSpecializedSciMsgHeader.type = PHY_TYPE_NONE;
- mSpecializedSciMsgHeader.mpdu_format = PHY_MPDU_FORMAT_NONE;
- mSpecializedSciMsgHeader.pb_nb = 0x00;
- mSpecializedSciMsgHeader.msg_nb = 0x01;
- mSpecializedSciMsgHeader.fc_mode = PHY_FC_MODE_NONE;
- mSpecializedSciMsgHeader.short_ppdu = 0x00;
- mSpecializedSciMsgHeader.mod = PHY_MOD_NONE;
- mSpecializedSciMsgHeader.fecrate = PHY_FEC_RATE_NONE;
- mSpecializedSciMsgHeader.gil = PHY_GIL_NONE;
- mSpecializedSciMsgHeader.tonemap_index = 0x00;
- mSpecializedSciMsgHeader.reserved = 0x00;
- mSpecializedSciMsgHeader.tx_id = 0x0000;
- mSpecializedSciMsgHeader.flags = PHY_FLAG_NONE;
- mSpecializedSciMsgHeader.symbol_nb = 0x00000000;
- memset(mSpecializedSciMsgHeader.iv, '\0', 3*sizeof(uint32_t));
- memset(mSpecializedSciMsgHeader.nek, '\0', 4*sizeof(uint32_t));
- memset(mSpecializedSciMsgHeader.pb_measurement, '\0', PHY_PB_MAX_NB*sizeof(uint32_t));
- memset(mSpecializedSciMsgHeader.pb_header, '\0', PHY_PB_MAX_NB*sizeof(uint32_t));
-}
-
-
-PhySciMsg::~PhySciMsg ( )
-{
- logFunction();
-
- if (NULL != mpPhyProcessor)
- {
- mpPhyProcessor = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-SciMsg * PhySciMsg::create ( ) const
-{
- logFunction();
-
- return new PhySciMsg (getPhyProcessor());
-}
-
-
-bool PhySciMsg::dispatchMsg ( )
-{
- logFunction();
-
- bool bDispatch = (receiveFunction[getSpecializedSciMsgType()])(getPhyProcessor(), *this);
-
- if (!bDispatch)
- {
- throw Error(__PRETTY_FUNCTION__, "error while receiving PHY SCI message");
- }
-
- return bDispatch;
-}
-
-
-bool PhySciMsg::identifySpecializedSciMsgHeader ( )
-{
- logFunction();
- bool bIdentifyHeader = false;
-
- if (NULL != SciMsg::getSciMsgData())
- {
- // Set specialized SCI msg header size
- //
- SciMsg::setSpecializedSciMsgHeaderSize((unsigned long)sizeof(struct Phy_Header));
-
- // Get specialized SCI message header contents
- //
- if (SciMsg::getSciMsgDataLength() >= SciMsg::getSpecializedSciMsgHeaderSize()) // check that there are enough data to get the specialized SCI message header
- {
- bIdentifyHeader = setSpecializedSciMsgHeader(*((Phy_Header*)SciMsg::getSciMsgData()));
- }
- else
- {
- errno = ENODATA;
- throw Error(__PRETTY_FUNCTION__, "Not enough data to get the specialized SCI message header", errno);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI message data pointer is NULL");
- }
-
- return bIdentifyHeader;
-}
-
-
-bool PhySciMsg::checkCompatibility ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- if (PHY_VERSION == getSpecializedSciMsgHeader().version)
- {
- bCheck = SciMsg::checkCompatibility();
- }
-
- return bCheck;
-}
-
-
-bool PhySciMsg::checkValidity ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- // Check header values ranges
- //
- if ((PHY_TYPE_NB > getSpecializedSciMsgHeader().type) && (PHY_TYPE_NONE < getSpecializedSciMsgHeader().type)
- && (PHY_MPDU_FORMAT_NB > getSpecializedSciMsgHeader().mpdu_format)
- && (PHY_PB_MAX_NB >= getSpecializedSciMsgHeader().pb_nb)
- && (0 != getSpecializedSciMsgHeader().msg_nb) && (PHY_MSG_MAX_NB_PER_MPDU >= getSpecializedSciMsgHeader().msg_nb)
- && (PHY_FC_MODE_NONE >= getSpecializedSciMsgHeader().fc_mode)
- && ((0 == getSpecializedSciMsgHeader().short_ppdu) || (1 == getSpecializedSciMsgHeader().short_ppdu))
- && (PHY_MOD_NONE >= getSpecializedSciMsgHeader().mod)
- && (PHY_FEC_RATE_NONE >= getSpecializedSciMsgHeader().fecrate)
- && (PHY_GIL_NONE >= getSpecializedSciMsgHeader().gil)
- && (TONEMAP_INDEX_NB > getSpecializedSciMsgHeader().tonemap_index)
- && (PHY_FLAG_MAX >= htons(getSpecializedSciMsgHeader().flags))
- && (MAC_MAX_SYMB_PER_MPDU >= htonl(getSpecializedSciMsgHeader().symbol_nb))
- && (NULL != getSpecializedSciMsgHeader().iv)
- && (NULL != getSpecializedSciMsgHeader().nek)
- && (NULL != getSpecializedSciMsgHeader().pb_measurement)
- && (NULL != getSpecializedSciMsgHeader().pb_header))
- {
- // Check header coherence in case of MPDU payload
- //
- if (PHY_TYPE_MPDU_PAYLOAD == getSpecializedSciMsgHeader().type)
- {
- if (
- (
- ((PHY_MPDU_FORMAT_BEACON == getSpecializedSciMsgHeader().mpdu_format)
- || (PHY_MPDU_FORMAT_SOF == getSpecializedSciMsgHeader().mpdu_format)
- || (PHY_MPDU_FORMAT_SOUND == getSpecializedSciMsgHeader().mpdu_format)
- || (PHY_MPDU_FORMAT_RSOF == getSpecializedSciMsgHeader().mpdu_format))
- && (0 != getSpecializedSciMsgHeader().pb_nb)
- )
- ||
- (
- ((PHY_MPDU_FORMAT_SACK == getSpecializedSciMsgHeader().mpdu_format)
- || (PHY_MPDU_FORMAT_RTS_CTS == getSpecializedSciMsgHeader().mpdu_format))
- && (0 == getSpecializedSciMsgHeader().pb_nb)
- )
- )
- {
- bCheck = SciMsg::checkValidity();
- }
- }
- else
- {
- bCheck = SciMsg::checkValidity();
- }
- }
-
- return bCheck;
-}
-
-
-void PhySciMsg::displaySpecializedSciMsgHeader ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "PHY SCI msg header = " << endl;
- clog << logger(LOG_INFO) << "\tversion = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().version) << endl;
- displaySpecializedSciMsgType(LOG_INFO);
- clog << logger(LOG_INFO) << "\tmpdu format = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().mpdu_format) << endl;
- clog << logger(LOG_INFO) << "\tpb nb = " << dec << static_cast<unsigned short int>(getSpecializedSciMsgHeader().pb_nb) << endl;
- clog << logger(LOG_INFO) << "\tmsg nb = " << dec << static_cast<unsigned short int>(getSpecializedSciMsgHeader().msg_nb) << endl;
- clog << logger(LOG_INFO) << "\tfc mode = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().fc_mode) << endl;
- clog << logger(LOG_INFO) << "\tshort ppdu = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().short_ppdu) << endl;
- clog << logger(LOG_INFO) << "\tmod = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().mod) << endl;
- clog << logger(LOG_INFO) << "\tfecrate = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().fecrate) << endl;
- clog << logger(LOG_INFO) << "\tgil = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().gil) << endl;
- clog << logger(LOG_INFO) << "\ttonemap index = " << dec << static_cast<unsigned short int>(getSpecializedSciMsgHeader().tonemap_index) << endl;
- clog << logger(LOG_INFO) << "\treserved = 0x" << setfill('0') << setw(4) << uppercase << hex << ntohs(getSpecializedSciMsgHeader().reserved) << endl;
- clog << logger(LOG_INFO) << "\ttx id = " << dec << ntohs(getSpecializedSciMsgHeader().tx_id) << endl;
- clog << logger(LOG_INFO) << "\tflags = 0x" << setfill('0') << setw(4) << uppercase << hex << ntohs(getSpecializedSciMsgHeader().flags) << endl;
- clog << logger(LOG_INFO) << "\tsymbol nb = " << dec << ntohl(getSpecializedSciMsgHeader().symbol_nb) << endl;
- displayIv();
- displayNek();
- displayPbMeasurement();
- displayPbHeader();
-#endif /* CONFIG_LOG */
-}
-
-
-bool PhySciMsg::prepare ( Network_Clock_Id clock_id )
-{
- logFunction();
-
- return false;
-}
-
-
-void PhySciMsg::displaySpecializedSciMsgType ( int log_level ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- switch (getSpecializedSciMsgHeader().type)
- {
- case 0:
- clog << logger(log_level) << "\ttype = PHY_TYPE_NONE" << endl;
- break;
- case 1:
- clog << logger(log_level) << "\ttype = PHY_TYPE_PREAMBLE" << endl;
- break;
- case 2:
- clog << logger(log_level) << "\ttype = PHY_TYPE_FC_HYBRID_MODE" << endl;
- break;
- case 3:
- clog << logger(log_level) << "\ttype = PHY_TYPE_FC_AV_ONLY_MODE" << endl;
- break;
- case 4:
- clog << logger(log_level) << "\ttype = PHY_TYPE_PRS" << endl;
- break;
- case 5:
- clog << logger(log_level) << "\ttype = PHY_TYPE_MPDU_PAYLOAD" << endl;
- break;
- case 6:
- clog << logger(log_level) << "\ttype = PHY_TYPE_TONEMASK" << endl;
- break;
- case 7:
- clog << logger(log_level) << "\ttype = PHY_TYPE_TONEMAP" << endl;
- break;
- case 8:
- clog << logger(log_level) << "\ttype = PHY_TYPE_NOISE" << endl;
- break;
- case 9:
- clog << logger(log_level) << "\ttype = PHY_TYPE_RX" << endl;
- break;
- case 10:
- clog << logger(log_level) << "\ttype = PHY_TYPE_ZERO_CROSS" << endl;
- break;
- default:
- clog << logger(log_level) << "\ttype = unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-void PhySciMsg::displayIv ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- ostringstream oss;
- oss << "\tiv = 0x ";
- for (unsigned int i=0; i<3; i++)
- {
- oss << setfill('0') << setw(8) << uppercase << hex << htonl(getSpecializedSciMsgHeader().iv[i]) << " ";
- }
- oss << endl;
- oss.flush();
- clog << logger(LOG_INFO) << oss.str();
-#endif /* CONFIG_LOG */
-}
-
-
-void PhySciMsg::displayNek ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- ostringstream oss;
- oss << "\tnek = 0x ";
- for (unsigned int i=0; i<4; i++)
- {
- oss << setfill('0') << setw(8) << uppercase << hex << htonl(getSpecializedSciMsgHeader().nek[i]) << " ";
- }
- oss << endl;
- oss.flush();
- clog << logger(LOG_INFO) << oss.str();
-#endif /* CONFIG_LOG */
-}
-
-
-void PhySciMsg::displayPbMeasurement ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- ostringstream oss;
- oss << "\tpb_measurement = 0x ";
- for (unsigned int i=0; i<PHY_PB_MAX_NB; i++)
- {
- oss << setfill('0') << setw(8) << uppercase << hex << htonl(getSpecializedSciMsgHeader().pb_measurement[i]) << " ";
- }
- oss << endl;
- oss.flush();
- clog << logger(LOG_INFO) << oss.str();
-#endif /* CONFIG_LOG */
-}
-
-
-void PhySciMsg::displayPbHeader ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- ostringstream oss;
- oss << "\tpb_header = 0x ";
- for (unsigned int i=0; i<PHY_PB_MAX_NB; i++)
- {
- oss << setfill('0') << setw(8) << uppercase << hex << htonl(getSpecializedSciMsgHeader().pb_header[i]) << " ";
- }
- oss << endl;
- oss.flush();
- clog << logger(LOG_INFO) << oss.str();
-#endif /* CONFIG_LOG */
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-void * PhySciMsg::returnSpecializedSciMsgHeader ( ) const
-{
- return (void*)&mSpecializedSciMsgHeader;
-}
-
-
-const Phy_Header & PhySciMsg::getSpecializedSciMsgHeader ( ) const
-{
- return mSpecializedSciMsgHeader;
-}
-
-
-bool PhySciMsg::setSpecializedSciMsgHeader ( const Phy_Header & specialized_sci_msg_header )
-{
- logFunction();
- bool bSetHdr = false;
-
- mSpecializedSciMsgHeader = specialized_sci_msg_header;
-
- // Set specialized SCI msg attributes from specialized SCI msg header
- //
- bSetHdr = setSpecializedSciMsgType (static_cast<Phy_Type>(getSpecializedSciMsgHeader().type));
- bSetHdr &= setMpduFormat (static_cast<Phy_Mpdu_Format>(getSpecializedSciMsgHeader().mpdu_format));
- bSetHdr &= setNbOfPbs (static_cast<Phy_Nb_Of_Pbs>(getSpecializedSciMsgHeader().pb_nb));
- bSetHdr &= setNbOfMsgs (static_cast<unsigned short int>(getSpecializedSciMsgHeader().msg_nb));
- bSetHdr &= setFcMode (static_cast<Phy_Fc_Mode>(getSpecializedSciMsgHeader().fc_mode));
- bSetHdr &= setShortPpdu (static_cast<Phy_Short_Ppdu>(getSpecializedSciMsgHeader().short_ppdu));
- bSetHdr &= setMod (static_cast<Phy_Mod>(getSpecializedSciMsgHeader().mod));
- bSetHdr &= setFecrate (static_cast<Phy_Fecrate>(getSpecializedSciMsgHeader().fecrate));
- bSetHdr &= setGil (static_cast<Phy_Gil>(getSpecializedSciMsgHeader().gil));
- bSetHdr &= setTonemapIndex (static_cast<Phy_Tonemap_Index>(getSpecializedSciMsgHeader().tonemap_index));
- bSetHdr &= setTxId (static_cast<Phy_Tx_Id>(ntohs(getSpecializedSciMsgHeader().tx_id)));
- bSetHdr &= setFlags (static_cast<Phy_Flags>(ntohs(getSpecializedSciMsgHeader().flags)));
- bSetHdr &= setIsEncrypted (PHY_FLAG_ENCRYPTED == (getFlags() & PHY_FLAG_ENCRYPTED));
- bSetHdr &= setIsCrcOk (PHY_FLAG_CRC_OK == (getFlags() & PHY_FLAG_CRC_OK));
- bSetHdr &= setPbSize ((PHY_FLAG_PB512 == (getFlags() & PHY_FLAG_PB512)) ? 512 : 128);
- bSetHdr &= setReserved ((ntohs(getSpecializedSciMsgHeader().reserved)));
- bSetHdr &= setNbOfSymbols (static_cast<Phy_Nb_Of_Symbols>(ntohl(getSpecializedSciMsgHeader().symbol_nb)));
- uint32_t iv[3];
- for (unsigned int i=0; i<3; i++)
- {
- iv[i] = ntohl(getSpecializedSciMsgHeader().iv[i]);
- }
- bSetHdr &= setIv (iv);
- uint32_t nek[4];
- for (unsigned int i=0; i<4; i++)
- {
- nek[i] = ntohl(getSpecializedSciMsgHeader().nek[i]);
- }
- bSetHdr &= setNek (nek);
- uint32_t pbMeasurement[PHY_PB_MAX_NB];
- uint32_t pbHeader[PHY_PB_MAX_NB];
- for (unsigned int i=0; i<PHY_PB_MAX_NB; i++)
- {
- pbMeasurement[i] = ntohl(getSpecializedSciMsgHeader().pb_measurement[i]);
- pbHeader[i] = ntohl(getSpecializedSciMsgHeader().pb_header[i]);
- }
- bSetHdr &= setPbMeasurement (pbMeasurement);
- bSetHdr &= setPbHeader (pbHeader);
-
- displaySpecializedSciMsgHeader();
-
- return bSetHdr;
-}
-
-
-IPhy * PhySciMsg::getPhyProcessor ( ) const
-{
- if (NULL == mpPhyProcessor)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY processor pointer is NULL");
- }
-
- return mpPhyProcessor;
-}
-
-
-Phy_Type PhySciMsg::getSpecializedSciMsgType ( ) const
-{
- return mSpecializedSciMsgType;
-}
-
-
-bool PhySciMsg::setSpecializedSciMsgType ( const Phy_Type type )
-{
- bool bSetType = false;
-
- if ((PHY_TYPE_NB <= type) || (PHY_TYPE_NONE >= type))
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header type is out-of-range", errno);
- }
- else
- {
- mSpecializedSciMsgType = type;
- bSetType = true;
- }
-
- return bSetType;
-}
-
-
-Phy_Mpdu_Format PhySciMsg::getMpduFormat ( ) const
-{
- return mMpduFormat;
-}
-
-
-bool PhySciMsg::setMpduFormat ( const Phy_Mpdu_Format mpdu_format )
-{
- bool bSetMpduFormat = false;
-
- if (PHY_MPDU_FORMAT_NB <= mpdu_format)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header MPDU format is out-of-range", errno);
- }
- else
- {
- mMpduFormat = mpdu_format;
- bSetMpduFormat = true;
- }
-
- return bSetMpduFormat;
-}
-
-
-Phy_Nb_Of_Pbs PhySciMsg::getNbOfPbs ( ) const
-{
- return mNbOfPbs;
-}
-
-
-bool PhySciMsg::setNbOfPbs ( const Phy_Nb_Of_Pbs nb_of_pbs )
-{
- bool bSetPbNb = false;
-
- if (PHY_PB_MAX_NB < nb_of_pbs)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header PB number is out-of-range", errno);
- }
- else
- {
- mNbOfPbs = nb_of_pbs;
-
- bSetPbNb = true;
- }
-
- return bSetPbNb;
-}
-
-
-unsigned short int PhySciMsg::getNbOfMsgs ( ) const
-{
- if ((0 == mNbOfMsgs) || (PHY_MSG_MAX_NB_PER_MPDU < mNbOfMsgs))
- {
- throw Error(__PRETTY_FUNCTION__, "Number of PHY SCI messages is out-of-range");
- }
-
- return mNbOfMsgs;
-}
-
-
-bool PhySciMsg::setNbOfMsgs ( const unsigned short int nb_of_msgs )
-{
- if ( (0 == nb_of_msgs) || (PHY_MSG_MAX_NB_PER_MPDU < nb_of_msgs))
- {
- throw Error(__PRETTY_FUNCTION__, "Number of PHY SCI messages is out-of-range");
- }
-
- mNbOfMsgs = nb_of_msgs;
- return true;
-}
-
-
-Phy_Fc_Mode PhySciMsg::getFcMode ( ) const
-{
- return mFcMode;
-}
-
-
-bool PhySciMsg::setFcMode ( const Phy_Fc_Mode fc_mode )
-{
- bool bSetFcMode = false;
-
- if (PHY_FC_MODE_NONE < fc_mode)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header FC mode is out-of-range", errno);
- }
- else
- {
- mFcMode = fc_mode;
- bSetFcMode = true;
- }
-
- return bSetFcMode;
-}
-
-
-Phy_Short_Ppdu PhySciMsg::getShortPpdu ( ) const
-{
- return mShortPpdu;
-}
-
-
-bool PhySciMsg::setShortPpdu ( const Phy_Short_Ppdu short_ppdu )
-{
- mShortPpdu = short_ppdu;
-
- return true;
-}
-
-
-Phy_Mod PhySciMsg::getMod ( ) const
-{
- return mMod;
-}
-
-
-bool PhySciMsg::setMod ( const Phy_Mod mod )
-{
- bool bSetMod = false;
-
- if (PHY_MOD_NONE < mod)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header modulation is out-of-range", errno);
- }
- else
- {
- mMod = mod;
- bSetMod = true;
- }
-
- return bSetMod;
-}
-
-
-Phy_Fecrate PhySciMsg::getFecrate ( ) const
-{
- return mFecrate;
-}
-
-
-bool PhySciMsg::setFecrate ( const Phy_Fecrate fecrate )
-{
- bool bSetFecrate = false;
-
- if (PHY_FEC_RATE_NONE < fecrate)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header FEC rate is out-of-range", errno);
- }
- else
- {
- mFecrate = fecrate;
- bSetFecrate = true;
- }
-
- return bSetFecrate;
-}
-
-
-Phy_Gil PhySciMsg::getGil ( ) const
-{
- return mGil;
-}
-
-
-bool PhySciMsg::setGil ( const Phy_Gil gil )
-{
- bool bSetGil = false;
-
- if (PHY_GIL_NONE < gil)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header Guard Interval is out-of-range", errno);
- }
- else
- {
- mGil = gil;
- bSetGil = true;
- }
-
- return bSetGil;
-}
-
-
-Phy_Tonemap_Index PhySciMsg::getTonemapIndex ( ) const
-{
- return mTonemapIndex;
-}
-
-
-bool PhySciMsg::setTonemapIndex ( const Phy_Tonemap_Index tonemap_index )
-{
- bool bSetTonemapIndex = false;
-
- if (TONEMAP_INDEX_NB <= tonemap_index)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header tonemap index is out-of-range", errno);
- }
- else
- {
- mTonemapIndex = tonemap_index;
- bSetTonemapIndex = true;
- }
-
- return bSetTonemapIndex;
-}
-
-
-Phy_Tx_Id PhySciMsg::getTxId ( ) const
-{
- return mTxId;
-}
-
-
-bool PhySciMsg::setTxId ( const Phy_Tx_Id tx_id )
-{
- mTxId = tx_id;
-
- return true;
-}
-
-
-Phy_Flags PhySciMsg::getFlags ( ) const
-{
- return mFlags;
-}
-
-
-bool PhySciMsg::setFlags ( const Phy_Flags flags )
-{
- bool bSetFlags = false;
-
- if (PHY_FLAG_MAX < flags)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header flags is out-of-range", errno);
- }
- else
- {
- mFlags = flags;
- bSetFlags = true;
- }
-
- return bSetFlags;
-}
-
-
-bool PhySciMsg::isEncrypted ( ) const
-{
- return mIsEncrypted;
-}
-
-
-bool PhySciMsg::setIsEncrypted ( const bool is_encrypted )
-{
- mIsEncrypted = is_encrypted;
-
- return true;
-}
-
-
-bool PhySciMsg::isCrcOk ( ) const
-{
- return mIsCrcOk;
-}
-
-
-bool PhySciMsg::setIsCrcOk ( const bool is_crc_ok )
-{
- mIsCrcOk = is_crc_ok;
-
- return true;
-}
-
-
-unsigned short int PhySciMsg::getPbSize ( ) const
-{
- return mPbSize;
-}
-
-
-bool PhySciMsg::setPbSize ( const unsigned short int pb_size )
-{
- bool bSetPbSize = false;
-
- if ( (MAC_PB136_BYTES != pb_size) && (MAC_PB520_BYTES != pb_size) )
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PB size is out-of-range", errno);
- }
- else
- {
- mPbSize = pb_size;
- bSetPbSize = true;
- }
-
- return bSetPbSize;
-}
-
-Phy_Nb_Of_Symbols PhySciMsg::getNbOfSymbols ( ) const
-{
- return mNbOfSymbols;
-}
-
-
-bool PhySciMsg::setNbOfSymbols ( const Phy_Nb_Of_Symbols nb_of_symbols )
-{
- bool bSetSymbolNb = false;
-
- if (MAC_MAX_SYMB_PER_MPDU < nb_of_symbols)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message header symbol number is out-of-range", errno);
- }
- else
- {
- mNbOfSymbols = nb_of_symbols;
- bSetSymbolNb = true;
- }
-
- return bSetSymbolNb;
-}
-
-
-const uint32_t * PhySciMsg::getIv ( ) const
-{
- return mIvArray;
-}
-
-
-bool PhySciMsg::setIv ( const uint32_t iv[3] )
-{
- return (NULL != memcpy(mIvArray, iv, 3*sizeof(uint32_t)));
-}
-
-
-const uint32_t * PhySciMsg::getNek ( ) const
-{
- return mNekArray;
-}
-
-
-bool PhySciMsg::setNek ( const uint32_t nek[4] )
-{
- return (NULL != memcpy(mNekArray, nek, 4*sizeof(uint32_t)));
-}
-
-
-const uint32_t * PhySciMsg::getPbMeasurement ( ) const
-{
- return mPbMeasurementArray;
-}
-
-
-bool PhySciMsg::setPbMeasurement ( const uint32_t pb_measurement[PHY_PB_MAX_NB] )
-{
- return (NULL != memcpy(mPbMeasurementArray, pb_measurement, PHY_PB_MAX_NB*sizeof(uint32_t)));
-}
-
-
-const uint32_t * PhySciMsg::getPbHeader ( ) const
-{
- return mPbHeaderArray;
-}
-
-
-bool PhySciMsg::setPbHeader ( const uint32_t pb_header[PHY_PB_MAX_NB] )
-{
- return (NULL != memcpy(mPbHeaderArray, pb_header, PHY_PB_MAX_NB*sizeof(uint32_t)));
-}
-
-
-bool PhySciMsg::isSent ( ) const
-{
- return mIsSent;
-}
-
-
-bool PhySciMsg::setIsSent ( const bool is_sent )
-{
- logFunction();
-
- mIsSent = is_sent;
- return true;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/phy/src/PhySciMsgFc.cpp b/cesar/maximus/phy/src/PhySciMsgFc.cpp
deleted file mode 100644
index 6210fabea3..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgFc.cpp
+++ /dev/null
@@ -1,189 +0,0 @@
-/************************************************************************
- PhySciMsgFc.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/src/PhySciMsgFc.cpp
-**************************************************************************/
-
-#include "PhySciMsgFc.h"
-#include "IPhy.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-PhySciMsgFc::PhySciMsgFc ( IPhy * p_phy_processor ) : PhySciMsg ( p_phy_processor ),
-mFc10(0)
-{
- logFunction();
-
- initAttributes ();
-}
-
-
-void PhySciMsgFc::initAttributes ( )
-{
- logFunction();
-
- memset(mFcAvArray, '\0', 4*sizeof(uint32_t));
-
- // Set PHY SCI message type
- PhySciMsg::setSpecializedSciMsgType(PHY_TYPE_FC_AV_ONLY_MODE);
-}
-
-
-PhySciMsgFc::~PhySciMsgFc( )
-{
- logFunction();
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool PhySciMsgFc::prepare ( Network_Clock_Id clock_id )
-{
- logFunction();
- bool bPrepare = false;
-
- /* For a PHY message of type FC_AV_ONLY_MODE,
- * PHY SCI message data only contain AV Frame Control (128 bits). */
-
- if (PHY_TYPE_FC_AV_ONLY_MODE == PhySciMsg::getSpecializedSciMsgType())
- {
- // Set length of PHY SCI message data
- bPrepare = SciMsg::setSpecializedSciMsgDataLength(4*sizeof(uint32_t));
-
- // Set PHY SCI message data
- bPrepare &= SciMsg::setSpecializedSciMsgData((unsigned char *)getFcAv());
- }
-
- /* For a PHY message of type FC_HYBRID_MODE,
- * PHY SCI message data contain HP1.0.1 Frame Control (25 bits => on 4 octets)
- * and AV Frame Control (128 bits). */
-
- else if (PHY_TYPE_FC_HYBRID_MODE == PhySciMsg::getSpecializedSciMsgType())
- {
- // Set length of PHY SCI message data
- bPrepare = SciMsg::setSpecializedSciMsgDataLength(5*sizeof(uint32_t));
-
- // Set PHY SCI message data
- unsigned char data[5*sizeof(uint32_t)];
- memcpy(data, (unsigned char *)&mFc10, sizeof(uint32_t));
- memcpy(data+sizeof(uint32_t), (unsigned char *)getFcAv(), 4*sizeof(uint32_t));
- bPrepare &= SciMsg::setSpecializedSciMsgData(data);
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message type is not FC");
- }
-
- // Set TX ID
- bPrepare &= PhySciMsg::setTxId(PhySciMsg::getPhyProcessor()->getTxId());
-
- // Set station ID to Maximus PID
- bPrepare &= SciMsg::setSciMsgStationId(getpid());
-
- if (PhySciMsg::getShortPpdu())
- {
- // Indicate that MPDU transmission is finished
- PhySciMsg::setIsSent(true);
- }
-
- return bPrepare;
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-uint32_t PhySciMsgFc::getFc10 ( ) const
-{
- return mFc10;
-}
-
-
-bool PhySciMsgFc::setFc10 ( const uint32_t fc_10 )
-{
- mFc10 = fc_10;
-
- // Set PHY SCI message type
- return PhySciMsg::setSpecializedSciMsgType(PHY_TYPE_FC_HYBRID_MODE);
-}
-
-
-const uint32_t * PhySciMsgFc::getFcAv ( ) const
-{
- return mFcAvArray;
-}
-
-
-bool PhySciMsgFc::setFcAv ( const uint32_t fc_av[4] )
-{
- return (NULL != memcpy(mFcAvArray, fc_av, 4*sizeof(uint32_t)));
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/phy/src/PhySciMsgFcTest.cpp b/cesar/maximus/phy/src/PhySciMsgFcTest.cpp
deleted file mode 100644
index f0bd22fe8f..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgFcTest.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-
-#include "PhySciMsgFcTest.h"
-
-#include "PhySciMsgFc.h"
-#include "PhyProcessor.h"
-#include "SciServer.h"
-
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (PhySciMsgFcTest);
-
-
-void PhySciMsgFcTest::setUp (void)
-{
- logTest();
-
- mpSci = new SciServer();
- mpPhy = new PhyProcessor(mpSci);
- mpPhySciMsgFc = new PhySciMsgFc(mpPhy);
- uint32_t fcAv[4];
- memset(fcAv, '\0', 4*sizeof(uint32_t));
- CPPUNIT_ASSERT_MESSAGE ( "creation failed",
- (mpPhy == mpPhySciMsgFc->getPhyProcessor())
- && (PHY_TYPE_FC_AV_ONLY_MODE == mpPhySciMsgFc->getSpecializedSciMsgType())
- && (0 == mpPhySciMsgFc->getFc10())
- && (0 == memcmp(fcAv, mpPhySciMsgFc->getFcAv(), 4*sizeof(uint32_t))) );
-}
-
-
-void PhySciMsgFcTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgFc)
- {
- delete (mpPhySciMsgFc);
- mpPhySciMsgFc = NULL;
- }
- if (NULL != mpPhy)
- {
- delete (mpPhy);
- mpPhy = NULL;
- }
- if (NULL != mpSci)
- {
- delete (mpSci);
- mpSci = NULL;
- }
-}
-
-
-void PhySciMsgFcTest::prepareTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgFc)
- {
- const uint32_t fc10 = 123;
- uint32_t fcAv[4];
- memset(fcAv, '1', 4*sizeof(uint32_t));
- mpPhySciMsgFc->setFcAv(fcAv);
- CPPUNIT_ASSERT_MESSAGE ( "prepare failed",
- (mpPhySciMsgFc->prepare(0 /* clock_id */ ))
- && (0 == mpPhySciMsgFc->getTxId())
- && (getpid() == mpPhySciMsgFc->getSciMsgStationId())
- && (4*sizeof(uint32_t) == mpPhySciMsgFc->getSpecializedSciMsgDataLength())
- && (0 == memcmp((unsigned char *)fcAv, mpPhySciMsgFc->getSpecializedSciMsgData(), 4*sizeof(uint32_t)))
- && (!mpPhySciMsgFc->isSent()) );
-
- mpPhySciMsgFc->setFc10(fc10);
- mpPhySciMsgFc->setShortPpdu(true);
- CPPUNIT_ASSERT_MESSAGE ( "prepare failed",
- (mpPhySciMsgFc->prepare(0 /* clock_id */ ))
- && (0 == mpPhySciMsgFc->getTxId())
- && (getpid() == mpPhySciMsgFc->getSciMsgStationId())
- && (5*sizeof(uint32_t) == mpPhySciMsgFc->getSpecializedSciMsgDataLength())
- && (0 == memcmp((unsigned char *)&fc10, mpPhySciMsgFc->getSpecializedSciMsgData(), sizeof(uint32_t)))
- && (0 == memcmp((unsigned char *)fcAv, mpPhySciMsgFc->getSpecializedSciMsgData()+sizeof(uint32_t), 4*sizeof(uint32_t)))
- && (mpPhySciMsgFc->isSent()) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message FC pointer is NULL");
- }
-}
-
-
-void PhySciMsgFcTest::fc10Test (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgFc)
- {
- const uint32_t fc10 = 789;
- CPPUNIT_ASSERT_MESSAGE ( "fc10 failed",
- (mpPhySciMsgFc->setFc10(fc10))
- && (fc10 == mpPhySciMsgFc->getFc10())
- && (PHY_TYPE_FC_HYBRID_MODE == mpPhySciMsgFc->getSpecializedSciMsgType()) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message FC pointer is NULL");
- }
-}
-
-
-void PhySciMsgFcTest::fcAvTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgFc)
- {
- uint32_t fcAv[4];
- memset(fcAv, '2', 4*sizeof(uint32_t));
- CPPUNIT_ASSERT_MESSAGE ( "fcAv failed",
- (mpPhySciMsgFc->setFcAv(fcAv))
- && (0 == memcmp((unsigned char *)fcAv, mpPhySciMsgFc->getFcAv(), 4*sizeof(uint32_t))) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message FC pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/phy/src/PhySciMsgMpdu.cpp b/cesar/maximus/phy/src/PhySciMsgMpdu.cpp
deleted file mode 100644
index c8a57d17ff..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgMpdu.cpp
+++ /dev/null
@@ -1,529 +0,0 @@
-/************************************************************************
- PhySciMsgMpdu.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/src/PhySciMsgMpdu.cpp
-**************************************************************************/
-
-#include "PhySciMsgMpdu.h"
-#include "PhySciMsgPre.h"
-#include "PhySciMsgFc.h"
-#include "IPhy.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-PhySciMsgMpdu::PhySciMsgMpdu ( IPhy * p_phy_processor ) : PhySciMsg ( p_phy_processor ),
-mPayloadLength(0),
-mpPayload(NULL),
-mpPre(NULL),
-mpFc(NULL),
-mNbOfPbsInLastMsg(0)
-{
- logFunction();
-
- initAttributes(p_phy_processor);
-}
-
-
-PhySciMsgMpdu::PhySciMsgMpdu ( PhySciMsg & phy_sci_msg ) : PhySciMsg ( phy_sci_msg.getPhyProcessor() ),
-mPayloadLength(0),
-mpPayload(NULL),
-mpPre(NULL),
-mpFc(NULL),
-mNbOfPbsInLastMsg(0)
-{
- logFunction();
-
- // Initialize PHY SCI message MPDU attributes
- initAttributes(phy_sci_msg.getPhyProcessor());
-
- // Copy SCI message attributes
- SciMsg::setSciMsgHeader(*phy_sci_msg.getSciMsgHeader());
-
- // Copy PHY SCI message attributes
- PhySciMsg::setSpecializedSciMsgHeader(phy_sci_msg.getSpecializedSciMsgHeader());
- PhySciMsg::setSpecializedSciMsgDataLength(phy_sci_msg.getSpecializedSciMsgDataLength());
- PhySciMsg::setSpecializedSciMsgData(phy_sci_msg.getSpecializedSciMsgData());
-
- // Copy PHY SCI message MPDU attributes
- setMpdu(PhySciMsg::getSpecializedSciMsgDataLength(), PhySciMsg::getSpecializedSciMsgData());
-}
-
-
-void PhySciMsgMpdu::initAttributes ( IPhy * p_phy_processor )
-{
- logFunction();
-
- // Create PREAMBLE message
- mpPre = new PhySciMsgPre(p_phy_processor);
- if (NULL == mpPre)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message PREAMBLE pointer is NULL");
- }
-
- // Create FC message
- mpFc = new PhySciMsgFc(p_phy_processor);
- if (NULL == mpFc)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message FC pointer is NULL");
- }
-
- memset(mPbsArray, '\0', MAC_MAX_PB_PER_MPDU*MAC_PB520_BYTES);
- memset(mPbsHeadersArray, '\0', MAC_MAX_PB_PER_MPDU * sizeof(uint32_t));
-
- // Set PHY SCI message type
- PhySciMsg::setSpecializedSciMsgType(PHY_TYPE_MPDU_PAYLOAD);
-}
-
-
-PhySciMsgMpdu::~PhySciMsgMpdu ( )
-{
- logFunction();
-
- if (NULL != mpPayload)
- {
- delete [] mpPayload;
- mpPayload = NULL;
- }
- if (NULL != mpPre)
- {
- delete (mpPre);
- mpPre = NULL;
- }
- if (NULL != mpFc)
- {
- delete (mpFc);
- mpFc = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool PhySciMsgMpdu::segment ( )
-{
- logFunction();
- bool bSegment = false;
-
- if ( MAC_PB136_BYTES < getPayloadLength() ) // MPDU is composed of 512-octet PBs
- {
- // Set PB size
- bSegment = PhySciMsg::setPbSize(MAC_PB520_BYTES);
-
- /* Calculate total number of PBs. */
-
- unsigned short int totalNbOfPbs = getPayloadLength() / PhySciMsg::getPbSize();
- if ( 0 != getPayloadLength() % PhySciMsg::getPbSize() )
- {
- totalNbOfPbs++;
- }
- if (MAC_MAX_PB_PER_MPDU < totalNbOfPbs)
- {
- throw Error(__PRETTY_FUNCTION__, "Total number of PBs exceeds maximum number of PBs per MPDU");
- }
-
- /* Calculate number of PHY SCI messages needed to transmit all PBs,
- * and number of PBs to transmit in each PHY SCI message. */
-
- unsigned short int nbOfMsgs = 1;
- unsigned short int nbOfPbs = totalNbOfPbs;
- unsigned short int nbOfPbsInLastMsg = totalNbOfPbs;
-
- if ( PHY_PB_MAX_NB < totalNbOfPbs ) // MPDU is composed of several PHY SCI messages
- {
- nbOfMsgs = totalNbOfPbs / PHY_PB_MAX_NB;
- nbOfPbs = PHY_PB_MAX_NB;
- nbOfPbsInLastMsg = totalNbOfPbs % PHY_PB_MAX_NB;
- if ( 0 != nbOfPbsInLastMsg )
- {
- nbOfMsgs++;
- }
- else
- {
- nbOfPbsInLastMsg = nbOfPbs;
- }
- }
-
- // Set number of PHY SCI messages
- bSegment &= PhySciMsg::setNbOfMsgs(nbOfMsgs);
-
- // Set number of PBs
- bSegment &= PhySciMsg::setNbOfPbs(nbOfPbs);
-
- // Set number of PBs into the last PHY SCI message
- bSegment &= setNbOfPbsInLastMsg(nbOfPbsInLastMsg);
-
- // Reset PBs array
- memset(mPbsArray, '\0', MAC_MAX_PB_PER_MPDU*MAC_PB520_BYTES);
-
- // Set PBs array
- for (int i = 0; i < nbOfMsgs-1; i++)
- {
- memcpy(&mPbsArray[i*PHY_PB_MAX_NB*MAC_PB520_BYTES], getPayload()+i*PHY_PB_MAX_NB*MAC_PB520_BYTES, PHY_PB_MAX_NB*MAC_PB520_BYTES);
- }
- memcpy(&mPbsArray[(nbOfMsgs-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES], getPayload()+(nbOfMsgs-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES, getPayloadLength()-((nbOfMsgs-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES));
- }
-
- else // MPDU is composed of one 128-octet PB
- {
- // Set PB size
- bSegment = PhySciMsg::setPbSize(MAC_PB136_BYTES);
-
- // Set number of PHY SCI messages
- bSegment &= PhySciMsg::setNbOfMsgs(1);
-
- // Set number of PBs
- bSegment &= PhySciMsg::setNbOfPbs(1);
-
- // Set number of PBs into the last PHY SCI message
- bSegment &= setNbOfPbsInLastMsg(1);
-
- // Set PBs array
- memcpy(mPbsArray, getPayload(), getPayloadLength());
- }
-
- return bSegment;
-}
-
-
-bool PhySciMsgMpdu::prepare ( Network_Clock_Id clock_id )
-{
- logFunction();
- bool bPrepare = false;
-
- if ((0 == clock_id) || (PhySciMsg::getNbOfMsgs() < clock_id))
- {
- throw Error(__PRETTY_FUNCTION__, "Network Clock ID is out-of-range");
- }
- else if (PhySciMsg::getNbOfMsgs() == clock_id) // This is the last PHY SCI message composing the MPDU
- {
- // Set number of PBs
- bPrepare = PhySciMsg::setNbOfPbs(getNbOfPbsInLastMsg());
-
- // Indicate that MPDU transmission is finished
- bPrepare &= PhySciMsg::setIsSent(true);
- }
-
- /* For a PHY message of type MPDU_PAYLOAD,
- * PHY SCI message data only contain MPDU payload
- * ('nb_of_pbs' PBs of 128 or 512 octets depending on PHY_FLAG_PB512). */
-
- // Set length of PHY SCI message data = PB number * PB size
- bPrepare = SciMsg::setSpecializedSciMsgDataLength(PhySciMsg::getNbOfPbs()*PhySciMsg::getPbSize());
-
- // Set PHY SCI message data
- bPrepare &= SciMsg::setSpecializedSciMsgData(getPbs(clock_id-1));
-
- return bPrepare;
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-unsigned long PhySciMsgMpdu::getPayloadLength ( ) const
-{
- return mPayloadLength;
-}
-
-
-const unsigned char * PhySciMsgMpdu::getPayload ( ) const
-{
- if (NULL == mpPayload)
- {
- throw Error(__PRETTY_FUNCTION__, "MPDU payload pointer is NULL");
- }
-
- return mpPayload;
-}
-
-
-bool PhySciMsgMpdu::setMpdu ( const unsigned long length, const unsigned char * p_payload )
-{
- logFunction();
- bool bSetMpdu = false;
-
- /* If MPDU payload has already been set,
- * delete the previous MPDU payload. */
-
- if (NULL != mpPayload)
- {
- delete [] mpPayload;
- mpPayload = NULL;
- }
-
- if ((0 != length) && (NULL != p_payload))
- {
- // Set MPDU payload length
- mPayloadLength = length;
-
- // Allocate and set MPDU payload
- mpPayload = new unsigned char [length];
- bSetMpdu = (NULL != memcpy(mpPayload, p_payload, length));
- }
- else
- {
- mPayloadLength = 0;
- mpPayload = NULL;
- }
-
- return bSetMpdu;
-}
-
-
-PhySciMsgPre * PhySciMsgMpdu::getPre ( ) const
-{
- if (NULL == mpPre)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message PREAMBLE pointer is NULL");
- }
-
- return mpPre;
-}
-
-
-PhySciMsgFc * PhySciMsgMpdu::getFc ( ) const
-{
- if (NULL == mpFc)
- {
- throw Error(__PRETTY_FUNCTION__, "PHY SCI message FC pointer is NULL");
- }
-
- return mpFc;
-}
-
-
-unsigned short int PhySciMsgMpdu::getNbOfPbsInLastMsg ( ) const
-{
- if ((0 == mNbOfPbsInLastMsg) || (PHY_PB_MAX_NB < mNbOfPbsInLastMsg))
- {
- throw Error(__PRETTY_FUNCTION__, "Number of PBs into the last PHY SCI message is out-of-range");
- }
-
- return mNbOfPbsInLastMsg;
-}
-
-
-bool PhySciMsgMpdu::setNbOfPbsInLastMsg ( const unsigned short int nb_of_pbs_in_last_msg )
-{
- if ( (0 == nb_of_pbs_in_last_msg) || (PHY_PB_MAX_NB < nb_of_pbs_in_last_msg))
- {
- throw Error(__PRETTY_FUNCTION__, "Number of PBs into the last PHY SCI message is out-of-range");
- }
-
- mNbOfPbsInLastMsg = nb_of_pbs_in_last_msg;
- return true;
-}
-
-
-const unsigned char * PhySciMsgMpdu::getPbs ( const unsigned short int n ) const
-{
- if (PHY_MSG_MAX_NB_PER_MPDU <= n)
- {
- throw Error(__PRETTY_FUNCTION__, "PBs array index exceeds PBs array size");
- }
-
- return &mPbsArray[n*PHY_PB_MAX_NB*MAC_PB520_BYTES];
-}
-
-
-bool PhySciMsgMpdu::isSent ( ) const
-{
- return (PhySciMsg::isSent() || getFc()->isSent());
-}
-
-
-bool PhySciMsgMpdu::isReceived ( const unsigned short int nb_of_received_msgs ) const
-{
- return (nb_of_received_msgs == PhySciMsg::getNbOfMsgs());
-}
-
-
-bool PhySciMsgMpdu::setFcMode ( const Phy_Fc_Mode fc_mode )
-{
- bool bSetFcMode = false;
-
- bSetFcMode = getPre()->setFcMode(fc_mode);
- bSetFcMode &= getFc()->setFcMode(fc_mode);
- bSetFcMode &= PhySciMsg::setFcMode(fc_mode);
-
- return bSetFcMode;
-}
-
-
-bool PhySciMsgMpdu::setShortPpdu ( const Phy_Short_Ppdu short_ppdu )
-{
- bool bSetShort;
-
- bSetShort = getPre()->setShortPpdu(short_ppdu);
- bSetShort &= getFc()->setShortPpdu(short_ppdu);
- bSetShort &= PhySciMsg::setShortPpdu(short_ppdu);
-
- return bSetShort;
-}
-
-
-bool PhySciMsgMpdu::setMod ( const Phy_Mod mod )
-{
- bool bSetMod = false;
-
- bSetMod = getPre()->setMod(mod);
- bSetMod &= getFc()->setMod(mod);
- bSetMod &= PhySciMsg::setMod(mod);
-
- return bSetMod;
-}
-
-
-bool PhySciMsgMpdu::setFecrate ( const Phy_Fecrate fecrate )
-{
- bool bSetFecrate = false;
-
- bSetFecrate = getPre()->setFecrate(fecrate);
- bSetFecrate &= getFc()->setFecrate(fecrate);
- bSetFecrate &= PhySciMsg::setFecrate(fecrate);
-
- return bSetFecrate;
-}
-
-
-bool PhySciMsgMpdu::setGil ( const Phy_Gil gil )
-{
- bool bSetGil = false;
-
- bSetGil = getPre()->setGil(gil);
- bSetGil &= getFc()->setGil(gil);
- bSetGil &= PhySciMsg::setGil(gil);
-
- return bSetGil;
-}
-
-
-bool PhySciMsgMpdu::setFlags ( const Phy_Flags flags )
-{
- bool bSetFlags = false;
-
- bSetFlags = getPre()->setFlags(flags);
- bSetFlags &= getFc()->setFlags(flags);
- bSetFlags &= PhySciMsg::setFlags(flags);
-
- return bSetFlags;
-}
-
-
-uint32_t PhySciMsgMpdu::getFc10 ( ) const
-{
- return getFc()->getFc10();
-}
-
-
-bool PhySciMsgMpdu::setFc10 ( const uint32_t fc_10 )
-{
- return getFc()->setFc10(fc_10);
-}
-
-
-const uint32_t * PhySciMsgMpdu::getFcAv ( ) const
-{
- return getFc()->getFcAv();
-}
-
-
-bool PhySciMsgMpdu::setFcAv ( const uint32_t fc_av[4] )
-{
- return getFc()->setFcAv(fc_av);
-}
-
-
-const uint32_t * PhySciMsgMpdu::getPbsHeaders ( const unsigned short int n ) const
-{
- if (PHY_MSG_MAX_NB_PER_MPDU <= n)
- {
- throw Error(__PRETTY_FUNCTION__, "PBs Headers array index exceeds PBs Headers array size");
- }
-
- return &mPbsHeadersArray[n*PHY_PB_MAX_NB];
-}
-
-
-bool PhySciMsgMpdu::setPbsHeaders ( const unsigned short int n, const uint32_t pb_header )
-{
- if (MAC_MAX_PB_PER_MPDU <= n)
- {
- throw Error(__PRETTY_FUNCTION__, "PB number is out-of-range");
- }
- else
- {
- mPbsHeadersArray[n] = pb_header;
- }
-
- return true;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/phy/src/PhySciMsgMpduTest.cpp b/cesar/maximus/phy/src/PhySciMsgMpduTest.cpp
deleted file mode 100644
index 534d495d9d..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgMpduTest.cpp
+++ /dev/null
@@ -1,321 +0,0 @@
-
-#include "PhySciMsgMpduTest.h"
-
-#include "PhySciMsgMpdu.h"
-#include "PhyProcessor.h"
-#include "SciServer.h"
-
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (PhySciMsgMpduTest);
-
-
-void PhySciMsgMpduTest::setUp (void)
-{
- logTest();
-
- mpSci = new SciServer();
- mpPhy = new PhyProcessor(mpSci);
- mpPhySciMsgMpdu = new PhySciMsgMpdu(mpPhy);
- unsigned char pbs[MAC_MAX_PB_PER_MPDU*MAC_PB520_BYTES];
- memset(pbs, '\0', MAC_MAX_PB_PER_MPDU*MAC_PB520_BYTES);
- CPPUNIT_ASSERT_MESSAGE ( "creation failed",
- (mpPhy == mpPhySciMsgMpdu->getPhyProcessor())
- && (0 == mpPhySciMsgMpdu->getPayloadLength())
- && (NULL != mpPhySciMsgMpdu->getPre())
- && (NULL != mpPhySciMsgMpdu->getFc())
- && (0 == memcmp(pbs, mpPhySciMsgMpdu->getPbs(0), MAC_MAX_PB_PER_MPDU*MAC_PB520_BYTES))
- && (PHY_TYPE_MPDU_PAYLOAD == mpPhySciMsgMpdu->getSpecializedSciMsgType()) );
-}
-
-
-void PhySciMsgMpduTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgMpdu)
- {
- delete (mpPhySciMsgMpdu);
- mpPhySciMsgMpdu = NULL;
- }
- if (NULL != mpPhy)
- {
- delete (mpPhy);
- mpPhy = NULL;
- }
- if (NULL != mpSci)
- {
- delete (mpSci);
- mpSci = NULL;
- }
-}
-
-
-void PhySciMsgMpduTest::segmentTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgMpdu)
- {
- /* Test with one PB of 128 octet. */
-
- unsigned char pb[MAC_PB136_BYTES];
- for (unsigned char i=0; i<MAC_PB136_BYTES; i++)
- {
- pb[i] = i;
- }
- mpPhySciMsgMpdu->setMpdu(MAC_PB136_BYTES, pb);
-
- CPPUNIT_ASSERT_MESSAGE ( "segment failed",
- (mpPhySciMsgMpdu->segment())
- && (MAC_PB136_BYTES == mpPhySciMsgMpdu->getPbSize())
- && (1 == mpPhySciMsgMpdu->getNbOfPbs())
- && (1 == mpPhySciMsgMpdu->getNbOfPbsInLastMsg())
- && (1 == mpPhySciMsgMpdu->getNbOfMsgs())
- && (0 == memcmp(pb, mpPhySciMsgMpdu->getPbs(), MAC_PB136_BYTES)) );
-
- /* Test with n PBs of 512 octets. */
-
- unsigned short int nbOfPbsInLastMsg = 0;
- unsigned short int nbOfMsgs = 0;
- unsigned char c = 'A';
-
- for (int nb=1; nb<100; nb++)
- {
- unsigned short int nbOfPbs;
- if (PHY_PB_MAX_NB < nb)
- {
- nbOfPbs = PHY_PB_MAX_NB;
- }
- else
- {
- nbOfPbs = nb;
- }
- nbOfPbsInLastMsg = nb % PHY_PB_MAX_NB;
- nbOfMsgs = nb / PHY_PB_MAX_NB;
- if (0 != nbOfPbsInLastMsg)
- {
- nbOfMsgs++;
- }
- else
- {
- nbOfPbsInLastMsg = nbOfPbs;
- }
- const unsigned long length = nb*MAC_PB520_BYTES;
- unsigned char payload[length];
- for (unsigned int i=0; i<length; i++)
- {
- payload[i] = c;
- }
- mpPhySciMsgMpdu->setMpdu(length, payload);
-
- CPPUNIT_ASSERT_MESSAGE ( "segment failed",
- (mpPhySciMsgMpdu->segment())
- && (MAC_PB520_BYTES == mpPhySciMsgMpdu->getPbSize())
- && (nbOfPbs == (unsigned short int)mpPhySciMsgMpdu->getNbOfPbs())
- && (nbOfPbsInLastMsg == mpPhySciMsgMpdu->getNbOfPbsInLastMsg())
- && (nbOfMsgs == mpPhySciMsgMpdu->getNbOfMsgs())
- && (0 == memcmp(payload, mpPhySciMsgMpdu->getPbs(), length))
- );
-
- for (int j=0; j<nbOfMsgs-1; j++)
- {
- CPPUNIT_ASSERT_MESSAGE ( "segment failed",
- 0 == memcmp(&payload[j*PHY_PB_MAX_NB*MAC_PB520_BYTES], mpPhySciMsgMpdu->getPbs(j), nbOfPbs*MAC_PB520_BYTES) );
- }
- CPPUNIT_ASSERT_MESSAGE ( "segment failed",
- 0 == memcmp(&payload[(nbOfMsgs-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES], mpPhySciMsgMpdu->getPbs(nbOfMsgs-1), nbOfPbsInLastMsg*MAC_PB520_BYTES) );
-
- c++;
- }
-
- /* Test with random data length. */
-
- const unsigned long dataLength = 20007; // an odd number
- const unsigned short int nbOfPbs = dataLength/MAC_PB520_BYTES + 1;
- nbOfPbsInLastMsg = nbOfPbs % PHY_PB_MAX_NB;
- nbOfMsgs = nbOfPbs / PHY_PB_MAX_NB;
- if (0 != nbOfPbsInLastMsg)
- {
- nbOfMsgs++;
- }
- else
- {
- nbOfPbsInLastMsg = PHY_PB_MAX_NB;
- }
- unsigned char data[nbOfPbs*MAC_PB520_BYTES];
- memset(data, '7', dataLength);
- memset(&data[dataLength], '\0', nbOfPbs*MAC_PB520_BYTES-dataLength);
- mpPhySciMsgMpdu->setMpdu(dataLength, data);
-
- CPPUNIT_ASSERT_MESSAGE ( "segment failed",
- (mpPhySciMsgMpdu->segment())
- && (MAC_PB520_BYTES == mpPhySciMsgMpdu->getPbSize())
- && (PHY_PB_MAX_NB == mpPhySciMsgMpdu->getNbOfPbs())
- && (nbOfPbsInLastMsg == mpPhySciMsgMpdu->getNbOfPbsInLastMsg())
- && (nbOfMsgs == mpPhySciMsgMpdu->getNbOfMsgs())
- && (0 == memcmp(data, mpPhySciMsgMpdu->getPbs(0), (nbOfMsgs-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES))
- && (0 == memcmp(&data[(nbOfMsgs-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES], mpPhySciMsgMpdu->getPbs(nbOfMsgs-1), nbOfPbsInLastMsg*MAC_PB520_BYTES))
- );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message MPDU pointer is NULL");
- }
-}
-
-
-void PhySciMsgMpduTest::prepareTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgMpdu)
- {
- const unsigned short int nbOfPbs = 50;
- unsigned short int nbOfPbsInLastMsg = nbOfPbs % PHY_PB_MAX_NB;
- unsigned short int nbOfMsgs = nbOfPbs / PHY_PB_MAX_NB;
- if (0 != nbOfPbsInLastMsg)
- {
- nbOfMsgs++;
- }
- else
- {
- nbOfPbsInLastMsg = PHY_PB_MAX_NB;
- }
- const unsigned long length = nbOfPbs*MAC_PB520_BYTES;
- unsigned char payload[length];
- unsigned char c = 'A';
- for (int i=0; i<nbOfPbs; i++)
- {
- for (int j=0; j<MAC_PB520_BYTES; j++)
- {
- payload[i*MAC_PB520_BYTES+j] = c;
- }
- c++;
- }
- mpPhySciMsgMpdu->setMpdu(length, payload);
- mpPhySciMsgMpdu->segment();
-
- // Test the PHY SCI messages
- for (int i=1; i<nbOfMsgs; i++)
- {
- CPPUNIT_ASSERT_MESSAGE ( "prepare failed",
- (mpPhySciMsgMpdu->prepare((Network_Clock_Id)i))
- && (PHY_PB_MAX_NB == mpPhySciMsgMpdu->getNbOfPbs())
- && (!mpPhySciMsgMpdu->isSent())
- && (PHY_PB_MAX_NB*MAC_PB520_BYTES == mpPhySciMsgMpdu->getSpecializedSciMsgDataLength())
- && (0 == memcmp(&payload[(i-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES], mpPhySciMsgMpdu->getSpecializedSciMsgData(), PHY_PB_MAX_NB*MAC_PB520_BYTES))
- );
- }
- // Test second (and last) PHY SCI message
- CPPUNIT_ASSERT_MESSAGE ( "prepare failed",
- (mpPhySciMsgMpdu->prepare((Network_Clock_Id)nbOfMsgs))
- && (nbOfPbsInLastMsg == mpPhySciMsgMpdu->getNbOfPbs())
- && (mpPhySciMsgMpdu->isSent())
- && ((unsigned long)nbOfPbsInLastMsg*MAC_PB520_BYTES == mpPhySciMsgMpdu->getSpecializedSciMsgDataLength())
- && (0 == memcmp(&payload[(nbOfMsgs-1)*PHY_PB_MAX_NB*MAC_PB520_BYTES], mpPhySciMsgMpdu->getSpecializedSciMsgData(), nbOfPbsInLastMsg*MAC_PB520_BYTES))
- );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message MPDU pointer is NULL");
- }
-}
-
-
-void PhySciMsgMpduTest::setMpduTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgMpdu)
- {
- unsigned long length1 = 10;
- unsigned char payload1[length1];
- memcpy(payload1, "1234567890", length1);
-
- CPPUNIT_ASSERT_MESSAGE ( "setMpdu failed",
- (mpPhySciMsgMpdu->setMpdu(length1, payload1))
- && (length1 == mpPhySciMsgMpdu->getPayloadLength())
- && (0 == memcmp(payload1, mpPhySciMsgMpdu->getPayload(), length1)) );
-
- unsigned long length2 = 5;
- unsigned char payload2[length2];
- memcpy(payload2, "abcde", length2);
-
- CPPUNIT_ASSERT_MESSAGE ( "setMpdu failed",
- (mpPhySciMsgMpdu->setMpdu(length2, payload2))
- && (length2 == mpPhySciMsgMpdu->getPayloadLength())
- && (0 == memcmp(payload2, mpPhySciMsgMpdu->getPayload(), length2)) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message MPDU pointer is NULL");
- }
-}
-
-
-void PhySciMsgMpduTest::setNbOfMsgsTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgMpdu)
- {
- const unsigned short int n = 8;
- CPPUNIT_ASSERT_MESSAGE ( "setNbOfMsgs failed",
- (mpPhySciMsgMpdu->setNbOfMsgs(n))
- && (n == mpPhySciMsgMpdu->getNbOfMsgs()) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message MPDU pointer is NULL");
- }
-}
-
-
-void PhySciMsgMpduTest::setNbOfPbsInLastMsgTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgMpdu)
- {
- const unsigned short int n = PHY_PB_MAX_NB;
- CPPUNIT_ASSERT_MESSAGE ( "setNbOfPbsInLastMsg failed",
- (mpPhySciMsgMpdu->setNbOfPbsInLastMsg(n))
- && (n == mpPhySciMsgMpdu->getNbOfPbsInLastMsg()) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message MPDU pointer is NULL");
- }
-}
-
-
-void PhySciMsgMpduTest::setPbsHeadersTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgMpdu)
- {
- const unsigned short int n = 31;
- const uint32_t pbHeader = 0x02000000;
- uint32_t expectedPbHeader[PHY_PB_MAX_NB];
- memset(expectedPbHeader, '\0', PHY_PB_MAX_NB * sizeof(uint32_t));
- expectedPbHeader[n] = pbHeader;
- CPPUNIT_ASSERT_MESSAGE ( "setPbsHeaders failed",
- mpPhySciMsgMpdu->setPbsHeaders(n, pbHeader) );
- CPPUNIT_ASSERT_MESSAGE ( "getPbsHeaders failed",
- (0 == memcmp(expectedPbHeader, mpPhySciMsgMpdu->getPbsHeaders(0), PHY_PB_MAX_NB * sizeof(uint32_t))) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message MPDU pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/phy/src/PhySciMsgNoise.cpp b/cesar/maximus/phy/src/PhySciMsgNoise.cpp
deleted file mode 100644
index eb57ccb2a1..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgNoise.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-
-#include "PhySciMsgNoise.h"
-#include "IPhy.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-PhySciMsgNoise::PhySciMsgNoise ( IPhy * p_phy ) : PhySciMsg ( p_phy )
-{
- logFunction();
-
- initAttributes ();
-}
-
-
-void PhySciMsgNoise::initAttributes ( )
-{
- logFunction();
-
- // Set PHY SCI message type
- PhySciMsg::setSpecializedSciMsgType(PHY_TYPE_NOISE);
-}
-
-
-PhySciMsgNoise::~PhySciMsgNoise ( )
-{
- logFunction();
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool PhySciMsgNoise::prepare ( )
-{
- logFunction();
-
- // Set flags
- return PhySciMsg::setFlags(PHY_FLAG_CRC_OK);
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/phy/src/PhySciMsgNoiseTest.cpp b/cesar/maximus/phy/src/PhySciMsgNoiseTest.cpp
deleted file mode 100644
index 521e0feef9..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgNoiseTest.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-
-#include "PhySciMsgNoiseTest.h"
-
-#include "PhySciMsgNoise.h"
-#include "PhyProcessor.h"
-#include "SciServer.h"
-
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-using namespace std;
-
-
-CPPUNIT_TEST_SUITE_REGISTRATION (PhySciMsgNoiseTest);
-
-
-void PhySciMsgNoiseTest::setUp (void)
-{
- logTest();
-
- mpSci = new SciServer();
- mpPhy = new PhyProcessor(mpSci);
- mpPhySciMsgNoise = new PhySciMsgNoise(mpPhy);
- CPPUNIT_ASSERT_MESSAGE ( "creation failed",
- (mpPhy == mpPhySciMsgNoise->getPhyProcessor())
- && (NULL != mpPhySciMsgNoise)
- && (PHY_TYPE_NOISE == mpPhySciMsgNoise->getSpecializedSciMsgType()) );
-}
-
-
-void PhySciMsgNoiseTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgNoise)
- {
- delete (mpPhySciMsgNoise);
- mpPhySciMsgNoise = NULL;
- }
- if (NULL != mpPhy)
- {
- delete (mpPhy);
- mpPhy = NULL;
- }
- if (NULL != mpSci)
- {
- delete (mpSci);
- mpSci = NULL;
- }
-}
-
-
-void PhySciMsgNoiseTest::prepareTest (void)
-{
- logTest();
-
- CPPUNIT_ASSERT_MESSAGE ( "prepare failed",
- (mpPhySciMsgNoise->prepare())
- && (PHY_FLAG_CRC_OK == mpPhySciMsgNoise->getFlags()) );
-}
-
diff --git a/cesar/maximus/phy/src/PhySciMsgPre.cpp b/cesar/maximus/phy/src/PhySciMsgPre.cpp
deleted file mode 100644
index 70089340ad..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgPre.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/************************************************************************
- PhySciMsgPre.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/phy/src/PhySciMsgPre.cpp
-**************************************************************************/
-
-#include "PhySciMsgPre.h"
-#include "IPhy.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-PhySciMsgPre::PhySciMsgPre ( IPhy * p_phy_processor ) : PhySciMsg ( p_phy_processor )
-{
- logFunction();
-
- initAttributes ();
-}
-
-
-void PhySciMsgPre::initAttributes ( )
-{
- logFunction();
-
- // Set PHY SCI message type
- PhySciMsg::setSpecializedSciMsgType(PHY_TYPE_PREAMBLE);
-}
-
-
-PhySciMsgPre::~PhySciMsgPre ( )
-{
- logFunction();
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool PhySciMsgPre::prepare ( Network_Clock_Id clock_id )
-{
- logFunction();
- bool bPrepare = false;
-
- /* For a PHY message of type PREAMBLE,
- * PHY SCI message data are empty. */
-
- // Set TX ID
- bPrepare = PhySciMsg::setTxId(PhySciMsg::getPhyProcessor()->getTxId());
-
- // Set station ID to Maximus PID
- bPrepare &= SciMsg::setSciMsgStationId(getpid());
-
- return bPrepare;
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/phy/src/PhySciMsgPreTest.cpp b/cesar/maximus/phy/src/PhySciMsgPreTest.cpp
deleted file mode 100644
index 9c3fff554d..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgPreTest.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-
-#include "PhySciMsgPreTest.h"
-
-#include "PhySciMsgPre.h"
-#include "PhyProcessor.h"
-#include "SciServer.h"
-
-#include "Logger.h"
-
-// for 'getpid()'
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (PhySciMsgPreTest);
-
-
-void PhySciMsgPreTest::setUp (void)
-{
- logTest();
-
- mpSci = new SciServer();
- mpPhy = new PhyProcessor(mpSci);
- mpPhySciMsgPre = new PhySciMsgPre(mpPhy);
- CPPUNIT_ASSERT_MESSAGE ( "creation failed",
- (mpPhy == mpPhySciMsgPre->getPhyProcessor())
- && (NULL != mpPhySciMsgPre)
- && (PHY_TYPE_PREAMBLE == mpPhySciMsgPre->getSpecializedSciMsgType()) );
-}
-
-
-void PhySciMsgPreTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgPre)
- {
- delete (mpPhySciMsgPre);
- mpPhySciMsgPre = NULL;
- }
- if (NULL != mpPhy)
- {
- delete (mpPhy);
- mpPhy = NULL;
- }
- if (NULL != mpSci)
- {
- delete (mpSci);
- mpSci = NULL;
- }
-}
-
-
-void PhySciMsgPreTest::prepareTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsgPre)
- {
- CPPUNIT_ASSERT_MESSAGE ( "prepare failed",
- (mpPhySciMsgPre->prepare(0 /* clock_id */ ))
- && (0 == mpPhySciMsgPre->getTxId())
- && (getpid() == mpPhySciMsgPre->getSciMsgStationId()) );
- }
- else
- {
- CPPUNIT_FAIL ("PHY SCI message PREAMBLE pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/phy/src/PhySciMsgTest.cpp b/cesar/maximus/phy/src/PhySciMsgTest.cpp
deleted file mode 100644
index 2292a06f5b..0000000000
--- a/cesar/maximus/phy/src/PhySciMsgTest.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-
-#include "PhySciMsgTest.h"
-
-#include "PhySciMsg.h"
-#include "PhyProcessor.h"
-#include "SciServer.h"
-
-#include "Logger.h"
-#include "Error.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (PhySciMsgTest);
-
-
-void PhySciMsgTest::setUp (void)
-{
- logTest();
-
- mpSciServer = new SciServer();
- mpPhyProcessor = new PhyProcessor (mpSciServer);
- mpPhySciMsg = new PhySciMsg (mpPhyProcessor);
-}
-
-
-void PhySciMsgTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsg)
- {
- delete (mpPhySciMsg);
- mpPhySciMsg = NULL;
- }
- if (NULL != mpPhyProcessor)
- {
- delete (mpPhyProcessor);
- mpPhyProcessor = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete (mpSciServer);
- mpSciServer = NULL;
- }
-}
-
-
-void PhySciMsgTest::dispatchMsgTest (void)
-{
- logTest();
-
- if (NULL != mpPhySciMsg)
- {
- int type = PHY_TYPE_TONEMASK;
- unsigned int carrierNb = (PHY_CARRIER_NB+7)/8;
- unsigned char tonemask[sizeof(unsigned int) + carrierNb];
- memcpy(tonemask, &carrierNb, sizeof(unsigned int));
- memset(tonemask + sizeof(unsigned int), 'T', carrierNb);
- mpPhySciMsg->setSpecializedSciMsgDataLength(sizeof(unsigned int) + (PHY_CARRIER_NB+7)/8);
- mpPhySciMsg->setSpecializedSciMsgData(tonemask);
- CPPUNIT_ASSERT_MESSAGE("setSpecializedSciMsgType failed", mpPhySciMsg->setSpecializedSciMsgType((Phy_Type)type));
- CPPUNIT_ASSERT_MESSAGE("dispatchMsg failed", mpPhySciMsg->dispatchMsg());
-
- type = PHY_TYPE_RX;
- Sci_Msg_Station_Id txStationId = 123;
- mpPhySciMsg->setSpecializedSciMsgDataLength(sizeof(Sci_Msg_Station_Id));
- mpPhySciMsg->setSpecializedSciMsgData((unsigned char *)&txStationId);
- CPPUNIT_ASSERT_MESSAGE("setSpecializedSciMsgType failed", mpPhySciMsg->setSpecializedSciMsgType((Phy_Type)type));
- CPPUNIT_ASSERT_MESSAGE("dispatchMsg failed", mpPhySciMsg->dispatchMsg());
- }
- else
- {
- CPPUNIT_FAIL ("PhySciMsg pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/processors/Module b/cesar/maximus/processors/Module
new file mode 100644
index 0000000000..401017927d
--- /dev/null
+++ b/cesar/maximus/processors/Module
@@ -0,0 +1,3 @@
+SOURCES := Processor.cpp EthernetProcessor.cpp FunctionCallProcessor.cpp
+SOURCES += ClockProcessor.cpp PhyProcessor.cpp SystemProcessor.cpp
+
diff --git a/cesar/maximus/processors/inc/ClockProcessor.h b/cesar/maximus/processors/inc/ClockProcessor.h
new file mode 100644
index 0000000000..3f95694966
--- /dev/null
+++ b/cesar/maximus/processors/inc/ClockProcessor.h
@@ -0,0 +1,47 @@
+#ifndef maximus_processors_inc_clockprocessor_h
+#define maximus_processors_inc_clockprocessor_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/inc/ClockProcessor.h
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/sci/inc/ClockSciMsg.h"
+
+class ClockProcessor : public Processor
+{
+private:
+
+ /* Transmitted clock sci message have no data. */
+ ClockSciMsg msg_to_send;
+
+public:
+
+ ClockProcessor (
+ SciServer &ref1,
+ MaximusCallBack &ref2);
+
+ virtual ~ClockProcessor ();
+
+ SciMsg* create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ void dispatchMsgProc (
+ SciMsg *msg_rx);
+
+ void scheduler_send_event (
+ Sci_Msg_Station_Id clock_staid,
+ Network_Clock_Id clock_id,
+ SciMsg *msg);
+};
+
+#endif // maximus_processors_inc_clockprocessor_h
diff --git a/cesar/maximus/processors/inc/EthernetProcessor.h b/cesar/maximus/processors/inc/EthernetProcessor.h
new file mode 100644
index 0000000000..01ef68bbcb
--- /dev/null
+++ b/cesar/maximus/processors/inc/EthernetProcessor.h
@@ -0,0 +1,43 @@
+#ifndef maximus_processors_inc_ethernetprocessor_h
+#define maximus_processors_inc_ethernetprocessor_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/inc/EthernetProcessor.h
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/processors/inc/Processor.h"
+#include <string>
+
+class EthernetProcessor : public Processor
+{
+public:
+
+ EthernetProcessor (
+ SciServer &ref1,
+ MaximusCallBack &ref2);
+
+ virtual ~EthernetProcessor ();
+
+ void dispatchMsgProc (
+ SciMsg *msg_rx);
+
+ SciMsg *create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ void sendEther (
+ std::string &payload,
+ Ethernet_Type type,
+ Sci_Msg_Station_Id sta_id);
+
+};
+
+#endif // maximus_processors_inc_ethernetprocessor_h
diff --git a/cesar/maximus/processors/inc/FunctionCallProcessor.h b/cesar/maximus/processors/inc/FunctionCallProcessor.h
new file mode 100644
index 0000000000..a07bf4a8b2
--- /dev/null
+++ b/cesar/maximus/processors/inc/FunctionCallProcessor.h
@@ -0,0 +1,54 @@
+#ifndef maximus_processors_inc_functioncallprocessor_h
+#define maximus_processors_inc_functioncallprocessor_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/inc/FunctionCallProcessor.h
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/interface/msg/msg.h"
+#include <boost/function.hpp> // for 'CallbackFunction_t'
+#include <map>
+
+typedef boost::function <void (FunctionSciMsg &)> CallbackFunction_t;
+
+typedef std::map <Function_Call_Msg_Id, const CallbackFunction_t>
+CallbacksList_t;
+
+class FunctionCallProcessor : public Processor
+{
+private:
+
+ CallbacksList_t fc_msg_cb_list;
+
+ void displayListOfCallbacks () const;
+
+public:
+
+ FunctionCallProcessor (
+ SciServer &ref1,
+ MaximusCallBack &ref2);
+
+ virtual ~FunctionCallProcessor ();
+
+ SciMsg *create_sci_msg (struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ void sendMsg (
+ MsgFunctionCall &user_msg,
+ const CallbackFunction_t cb);
+
+ void dispatchMsgProc (SciMsg *msg_rx);
+
+ bool is_FunctionCall_empty ();
+};
+
+#endif // maximus_processors_inc_functioncallprocessor_h
diff --git a/cesar/maximus/processors/inc/PhyProcessor.h b/cesar/maximus/processors/inc/PhyProcessor.h
new file mode 100644
index 0000000000..f04b3438c6
--- /dev/null
+++ b/cesar/maximus/processors/inc/PhyProcessor.h
@@ -0,0 +1,221 @@
+#ifndef maximus_processors_inc_phyprocessor_h
+#define maximus_processors_inc_phyprocessor_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/inc/PhyProcessor.h
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/interface/msg/msg.h"
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/sci/inc/PhySciMsg.h"
+#include <boost/random/mersenne_twister.hpp>
+#include <map>
+#include <list>
+
+class ChannelComputer;
+
+struct Expected_Tx
+{
+ /* Expected transmission ID. */
+ Phy_Tx_Id src_tx_id;
+ /* Expected transmitting station ID. */
+ Sci_Msg_Station_Id src_station_id;
+};
+
+struct lttx
+{
+ bool operator() (
+ const Expected_Tx &tx1,
+ const Expected_Tx &tx2) const
+ {
+ if (tx1.src_tx_id != tx2.src_tx_id)
+ return tx1.src_tx_id < tx2.src_tx_id;
+ else
+ return tx1.src_station_id < tx2.src_station_id;
+ }
+};
+
+struct Frame_Control
+{
+ uint32_t fc_10;
+ uint32_t fc_av[4];
+};
+
+/* list of received Frame Control. */
+typedef std::map <const Expected_Tx,
+ Frame_Control,
+ lttx> rx_fc_list_t;
+
+typedef std::multimap <std::pair <Phy_Tx_Id,
+ Sci_Msg_Station_Id>,
+ Sci_Msg_Station_Id> rx_activated_list_t;
+
+typedef std::list <std::pair <MsgMpdu *,
+ PhySciMsg *> > MsgMpdu_list_t;
+
+class PhyProcessor : public Processor
+{
+private:
+
+ ChannelComputer * mpChannel;
+
+ bool mIsChannelEnabled;
+
+ unsigned int mNbOfCarriers;
+ uint8_t * mpTonemask;
+
+ /* unique ID incremented for each transmission. */
+ Phy_Tx_Id phy_TxId;
+ /* (PREAMBLE, FC, MPDU, and NOISE if enabled). */
+ rx_activated_list_t rx_activated_list;
+ rx_fc_list_t rx_fc_list;
+ MsgMpdu_list_t MsgMpdu_list;
+
+ Network_Clock_Tick ZeroCross_interval;
+ PhySciMsg PhySciMsg_ZeroCross;
+
+ /* For the wrong preambles transmission feature. */
+ bool Is_FalseAlarm;
+ PhySciMsg PhySciMsg_WrongPre;
+ boost::mt19937 FalseAlarm_mersenne_twister;
+ Network_Clock_Tick FalseAlarm_avg_interval;
+ float FalseAlarm_deviation;
+
+public:
+
+ PhyProcessor (
+ SciServer &ref1,
+ MaximusCallBack &ref2);
+
+ virtual ~PhyProcessor ();
+
+ void dispatchMsgProc (SciMsg *msg_rx);
+
+ void scheduler_send_event (
+ Sci_Msg_Station_Id clock_staid,
+ Network_Clock_Id clock_id,
+ SciMsg *msg);
+
+ void scheduler_drop_event (SciMsg *msg);
+
+ SciMsg *create_sci_msg (struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ void mpdu_schedule (
+ MsgMpdu *mpdu,
+ PhySciMsg *preamble,
+ PhySciMsg *fc,
+ PhySciMsg *payload);
+
+ void receiveInvalid (PhySciMsg &sci);
+ void receivePre (PhySciMsg &sci);
+ void receiveFc (PhySciMsg &sci);
+ void receivePrs (PhySciMsg &sci);
+ void receive_payload (PhySciMsg &sci);
+ void receiveTonemask (PhySciMsg &sci);
+ void receiveTonemap (PhySciMsg &sci);
+ void receive_rx (PhySciMsg &sci);
+
+ /**
+ * Activate the wrong preambles transmission feature.
+ * @param average_duration average number of ticks 25 MHz between two consecutive wrong preambles
+ * @param std_deviation the standard deviation
+ * @return bool
+ */
+ void activateFalseAlarm (
+ const Network_Clock_Tick avg_interval,
+ const float deviation);
+
+ /**
+ * Deactivate the wrong preambles transmission feature.
+ * @return bool
+ */
+ void deactivateFalseAlarm ();
+
+ /**
+ * @return bool
+ * @param p_channel the new value of mpChannel
+ */
+ bool setChannel (ChannelComputer * p_channel);
+
+ /**
+ * Sets the channel perturbation.
+ * @param is_channel_enabled the new value of mIsChannelEnabled
+ */
+ bool setIsChannelEnabled (const bool is_channel_enabled);
+
+ /**
+ * Gets the tonemask.
+ * @return mpTonemask
+ */
+ const uint8_t * getTonemask () const;
+
+ /**
+ * Check if the channel perturbation is enabled.
+ * @return mIsChannelEnabled
+ */
+ bool isChannelEnabled () const;
+
+ void set_zerocross_freq (const float frequency);
+
+private:
+
+ void del_phy_msg (PhySciMsg *msg);
+
+ void schedule_next_zero_cross ();
+
+ /**
+ * Computes Frame Control transmission duration.
+ * @return Frame Control delay in ticks
+ */
+ Network_Clock_Tick calculateFcDelay (
+ Phy_Fc_Mode fc_mode) const;
+
+ /**
+ * Gets a pointer to Channel.
+ * @return mpChannel
+ */
+ ChannelComputer * getChannel () const;
+
+ /**
+ * Gets the number of carriers.
+ * @return mNbOfCarriers
+ */
+ unsigned int getNbOfCarriers () const;
+
+ /**
+ * Sets the number of carriers.
+ * @return bool
+ * @param nb_of_carriers the new value of mNbOfCarriers
+ */
+ bool setNbOfCarriers (const unsigned int nb_of_carriers);
+
+ void setTonemask (
+ const unsigned int length,
+ const uint8_t * p_tonemask);
+
+ /**
+ * Sends PHY SCI message(s) of type MPDU
+ * and a PHY SCI message of type NOISE
+ * to destination stations.
+ * @param mpdu the PHY SCI message of type MPDU
+ * @return bool
+ */
+ inline void send_mpdu_and_noise (PhySciMsg &sci_payload);
+
+ Network_Clock_Tick roll_die_next_interval () const;
+
+ bool scheduleNextWrongPre (
+ const Network_Clock_Tick next_interval);
+};
+
+
+#endif // maximus_processors_inc_phyprocessor_h
diff --git a/cesar/maximus/processors/inc/Processor.h b/cesar/maximus/processors/inc/Processor.h
new file mode 100644
index 0000000000..e1a650ab56
--- /dev/null
+++ b/cesar/maximus/processors/inc/Processor.h
@@ -0,0 +1,52 @@
+#ifndef maximus_processors_inc_processor_h
+#define maximus_processors_inc_processor_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/inc/Processor.h
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/processors/processors.h"
+#include "maximus/scheduler/scheduler.h"
+#include "maximus/interface/maximus.h"
+#include "maximus/sci/sci_msg.h"
+
+class Processor
+{
+private:
+ Sci_Msg_Type processor_type;
+
+protected:
+
+ SciServer &sci_server;
+ MaximusCallBack &maximus_cb;
+ Scheduler *p_scheduler;
+
+public:
+
+ Processor (SciServer &ref1,
+ MaximusCallBack &ref2,
+ Sci_Msg_Type type);
+
+ virtual ~Processor ();
+
+ virtual SciMsg* create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer) = 0;
+
+ virtual void dispatchMsgProc (SciMsg *msg_rx) = 0;
+
+ inline void register_scheduler (Scheduler *p)
+ {
+ p_scheduler = p;
+ }
+};
+
+#endif /* maximus_processors_inc_processor_h */
diff --git a/cesar/maximus/processors/inc/SystemProcessor.h b/cesar/maximus/processors/inc/SystemProcessor.h
new file mode 100644
index 0000000000..27ce3ef6c8
--- /dev/null
+++ b/cesar/maximus/processors/inc/SystemProcessor.h
@@ -0,0 +1,46 @@
+#ifndef maximus_processors_inc_systemprocessor_h
+#define maximus_processors_inc_systemprocessor_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/inc/SystemProcessor.h
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/interface/station/station.h"
+
+class SystemProcessor : public Processor
+{
+private:
+
+ const stations_list_t &sta_list;
+
+public:
+
+ SystemProcessor (
+ SciServer &ref1,
+ MaximusCallBack &ref2,
+ stations_list_t &ref3);
+
+ virtual ~SystemProcessor ( );
+
+ SciMsg *create_sci_msg (struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ void dispatchMsgProc (SciMsg *msg_rx);
+
+ void send_name (const Station &sta);
+
+ Station *findStation (
+ const Sci_Msg_Station_Id station_id) const;
+
+};
+
+#endif // maximus_processors_inc_systemprocessor_h
diff --git a/cesar/maximus/processors/processors.h b/cesar/maximus/processors/processors.h
new file mode 100644
index 0000000000..801e075747
--- /dev/null
+++ b/cesar/maximus/processors/processors.h
@@ -0,0 +1,23 @@
+#ifndef maximus_processors_processors_h
+#define maximus_processors_processors_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/processors.h
+ * \ingroup maximus_processors
+ *
+ */
+class Processor;
+
+class PhyProcessor;
+class FunctionCallProcessor;
+class ClockProcessor;
+class SystemProcessor;
+class EthernetProcessor;
+
+#endif /* maximus_processors_processors_h */
diff --git a/cesar/maximus/processors/src/ClockProcessor.cpp b/cesar/maximus/processors/src/ClockProcessor.cpp
new file mode 100644
index 0000000000..711858dc06
--- /dev/null
+++ b/cesar/maximus/processors/src/ClockProcessor.cpp
@@ -0,0 +1,95 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/src/ClockProcessor.cpp
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/processors/inc/ClockProcessor.h"
+#include "maximus/sci/inc/ClockSciMsg.h"
+#include "maximus/scheduler/inc/Scheduler.h"
+#include "maximus/utils/inc/Logger.h"
+
+ClockProcessor::ClockProcessor (SciServer &ref1,
+ MaximusCallBack &ref2):
+ Processor (ref1, ref2, SCI_MSG_TYPE_NETWORK_CLOCK),
+ msg_to_send (0)
+{
+ logFunction ();
+
+ msg_to_send.set_clock_type (NETWORK_CLOCK_TYPE_STATION);
+}
+
+ClockProcessor::~ClockProcessor ()
+{
+ logFunction ();
+}
+
+SciMsg *
+ClockProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ logFunction ();
+
+ return new ClockSciMsg (header, buffer);
+}
+
+void
+ClockProcessor::dispatchMsgProc (SciMsg *msg_rx)
+{
+ logFunction ();
+
+ ClockSciMsg &msg = static_cast <ClockSciMsg &> (*msg_rx);
+
+ if (NETWORK_CLOCK_VERSION == msg.get_clock_version ())
+ {
+ Sci_Msg_Station_Id from_sta_id = msg.get_sci_stationid ();
+ Network_Clock_Type type = msg.get_clock_type ();
+ Network_Clock_Id id = msg.get_clock_id ();
+ Network_Clock_Tick msg_tick = msg.get_clock_tick ();
+
+ switch (type)
+ {
+ case NETWORK_CLOCK_TYPE_NB:
+ case NETWORK_CLOCK_TYPE_NONE:
+ maximus_log (LOG_WARNING,
+ "bad event type => do nothing");
+ break;
+
+ case NETWORK_CLOCK_TYPE_REMOVE:
+ p_scheduler->remove_event (
+ msg_tick, from_sta_id, id);
+ break;
+
+ case NETWORK_CLOCK_TYPE_STATION:
+ case NETWORK_CLOCK_TYPE_FUNCTION_CALL:
+ case NETWORK_CLOCK_TYPE_PHY:
+ case NETWORK_CLOCK_TYPE_SYSTEM:
+ case NETWORK_CLOCK_TYPE_ETHERNET:
+ p_scheduler->add_event (
+ msg_tick, from_sta_id, id, type);
+ break;
+ }
+ }
+
+ delete (msg_rx);
+}
+
+void
+ClockProcessor::scheduler_send_event (
+ Sci_Msg_Station_Id clock_staid,
+ Network_Clock_Id clock_id,
+ SciMsg *msg)
+{
+ logFunction ();
+
+ msg_to_send.set_clock_id (clock_id);
+ msg_to_send.set_sci_stationid (clock_staid);
+ msg_to_send.setup_and_send (sci_server);
+}
diff --git a/cesar/maximus/processors/src/EthernetProcessor.cpp b/cesar/maximus/processors/src/EthernetProcessor.cpp
new file mode 100644
index 0000000000..72f4bc6340
--- /dev/null
+++ b/cesar/maximus/processors/src/EthernetProcessor.cpp
@@ -0,0 +1,80 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/src/EthernetProcessor.cpp
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/processors/inc/EthernetProcessor.h"
+#include "maximus/sci/inc/EtherSciMsg.h"
+#include "maximus/interface/inc/MaximusCallBack.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include <cstring>
+
+EthernetProcessor::EthernetProcessor (SciServer &ref1,
+ MaximusCallBack &ref2):
+ Processor (ref1, ref2, SCI_MSG_TYPE_ETHERNET)
+{
+ logFunction ();
+}
+
+EthernetProcessor::~EthernetProcessor ()
+{
+ logFunction ();
+}
+
+SciMsg *
+EthernetProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ logFunction ();
+
+ return new EtherSciMsg (header, buffer);
+}
+
+void
+EthernetProcessor::sendEther (
+ std::string &payload,
+ Ethernet_Type type,
+ Sci_Msg_Station_Id sta_id)
+{
+ logFunction ();
+
+ EtherSciMsg msg (payload.length ());
+
+ unsigned char *data = msg.get_ether_data_addr ();
+ memcpy (data, payload.data (), payload.length ());
+
+ msg.set_ether_type (type);
+ msg.set_sci_stationid (sta_id);
+
+ msg.setup_and_send (sci_server);
+}
+
+void
+EthernetProcessor::dispatchMsgProc (SciMsg *msg_rx)
+{
+ logFunction ();
+
+ EtherSciMsg &msg = static_cast <EtherSciMsg &> (*msg_rx);
+
+ if (ETHERNET_VERSION == msg.get_ether_version ()
+ && 0 != msg.get_ether_data_size ())
+ {
+ maximus_cb.recv_ether_cb (
+ (char *) msg.get_ether_data_addr (),
+ (int) msg.get_ether_data_size (),
+ msg.get_ether_type (),
+ msg.get_sci_stationid ());
+ }
+
+ delete msg_rx;
+}
diff --git a/cesar/maximus/processors/src/FunctionCallProcessor.cpp b/cesar/maximus/processors/src/FunctionCallProcessor.cpp
new file mode 100644
index 0000000000..aae74e9f0a
--- /dev/null
+++ b/cesar/maximus/processors/src/FunctionCallProcessor.cpp
@@ -0,0 +1,175 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/src/FunctionCallProcessor.cpp
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/processors/inc/FunctionCallProcessor.h"
+#include "maximus/sci/inc/FunctionSciMsg.h"
+#include "maximus/interface/msg/inc/MsgFunctionCall.h"
+#include "maximus/utils/inc/Logger.h"
+#include <netinet/in.h>
+#include <iostream>
+
+FunctionCallProcessor::FunctionCallProcessor (SciServer &ref1,
+ MaximusCallBack &ref2):
+ Processor (ref1, ref2, SCI_MSG_TYPE_FUNCTION_CALL)
+{
+ logFunction ();
+}
+
+FunctionCallProcessor::~FunctionCallProcessor ()
+{
+ logFunction ();
+}
+
+SciMsg *
+FunctionCallProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ logFunction ();
+
+ return new FunctionSciMsg (header, buffer);
+}
+
+void
+FunctionCallProcessor::sendMsg (
+ MsgFunctionCall &user_msg,
+ const CallbackFunction_t cb)
+{
+ logFunction ();
+
+ const std::string &name = user_msg.get_function_name ();
+ const ParametersList &list = user_msg.get_parameter_list ();
+
+ /* 1°) Check. */
+ assert (!name.empty());
+ assert (FUNCTION_CALL_ID_MAX_SIZE > name.size());
+ assert (FUNCTION_CALL_PARAM_MAX_NB >= list.size ());
+
+ /* 2°) Register call back function */
+ std::pair <CallbacksList_t::iterator, bool> result;
+ result = fc_msg_cb_list.insert (
+ std::pair <Function_Call_Msg_Id, CallbackFunction_t> (
+ user_msg.get_tx_msg_id (), cb));
+ assert (result.second);
+
+ /* 3°) Determine the size of payload needed. */
+ size_t alloc_size = name.size () + 1;
+
+ ParametersList::const_iterator it;
+ for (it = list.begin (); it != list.end (); ++it)
+ {
+ alloc_size += (*it)->getName ().size ();
+ alloc_size += (*it)->getValueLength ();
+ alloc_size += 3;
+ }
+
+ /* 4°) Fill the payload. */
+ FunctionSciMsg msg (alloc_size);
+ unsigned char *p_data = msg.get_fc_data_addr ();
+
+ int size = name.size ();
+ memcpy (p_data, name.data (), size);
+ p_data[size] = '\0';
+ p_data += size + 1;
+
+ for (it = list.begin (); it != list.end (); ++it)
+ {
+ /* Name field. */
+ size = (*it)->getName ().size ();
+ memcpy (p_data,
+ (*it)->getName ().data (),
+ size);
+ p_data[size] = '\0';
+ p_data += size + 1;
+
+ /* Length field, in big endian. */
+ uint16_t length = (*it)->getValueLength();
+ p_data[0] = static_cast <unsigned char> (length >> 8);
+ p_data[1] = static_cast <unsigned char> (length);
+ p_data += 2;
+
+ /* Value field. */
+ memcpy (p_data,
+ (*it)->getValue (),
+ length);
+ p_data += length;
+ }
+
+ msg.set_fc_msg_id (user_msg.get_msg_id ());
+ msg.set_fc_param_nb (list.size ());
+ msg.set_sci_stationid (user_msg.get_sta_id ());
+
+ msg.setup_and_send (sci_server);
+}
+
+void
+FunctionCallProcessor::dispatchMsgProc (SciMsg *msg_rx)
+{
+ logFunction ();
+
+ FunctionSciMsg &msg = static_cast <FunctionSciMsg &> (*msg_rx);
+
+ if (FUNCTION_CALL_VERSION == msg.get_fc_version ()
+ && FUNCTION_CALL_TYPE_RSP == msg.get_fc_type ())
+ {
+ CallbacksList_t::iterator fc_msg_cb;
+
+ displayListOfCallbacks();
+ fc_msg_cb = fc_msg_cb_list.find (msg.get_fc_msgid ());
+
+ if (fc_msg_cb != fc_msg_cb_list.end ())
+ {
+ const CallbackFunction_t cb = fc_msg_cb->second;
+
+ /* Unregister call back before call it. */
+ fc_msg_cb_list.erase (fc_msg_cb);
+
+ (cb) (msg);
+ }
+ }
+
+ delete msg_rx;
+}
+
+bool
+FunctionCallProcessor::is_FunctionCall_empty ()
+{
+ return fc_msg_cb_list.empty ();
+}
+
+void
+FunctionCallProcessor::displayListOfCallbacks () const
+{
+#if CONFIG_LOG
+ logFunction();
+
+ maximus_log (LOG_INFO, "list of callbacks = ");
+
+ if (!fc_msg_cb_list.empty ())
+ {
+ for (CallbacksList_t::const_iterator
+ it = fc_msg_cb_list.begin();
+ it != fc_msg_cb_list.end();
+ ++it)
+ {
+ maximus_log (LOG_INFO,
+ " [msg id = 0x"
+ << std::hex << it->first
+ << ", callback address = " << &(it->second) << "]");
+ }
+ }
+ else
+ {
+ maximus_log (LOG_INFO, " empty!");
+ }
+#endif /* CONFIG_LOG */
+}
diff --git a/cesar/maximus/processors/src/PhyProcessor.cpp b/cesar/maximus/processors/src/PhyProcessor.cpp
new file mode 100644
index 0000000000..242de992ec
--- /dev/null
+++ b/cesar/maximus/processors/src/PhyProcessor.cpp
@@ -0,0 +1,762 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/src/PhyProcessor.cpp
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/processors/inc/PhyProcessor.h"
+#include "maximus/interface/inc/Maximus.h"
+#include "maximus/scheduler/inc/Scheduler.h"
+#include "maximus/sci/inc/PhySciMsg.h"
+#include "maximus/interface/msg/inc/MsgMpdu.h"
+#include "maximus/processors/inc/ClockProcessor.h"
+#include "maximus/channel/inc/ChannelComputer.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include "common/std.h"
+#include "hal/phy/maximus/dur/inc/maximus_dur.h"
+#include "hal/phy/maximus/inc/maximus_defs.h"
+#include "mac/common/timings.h"
+#include <netinet/in.h>
+#include <boost/random/normal_distribution.hpp>
+#include <boost/random/variate_generator.hpp>
+
+PhyProcessor::PhyProcessor (SciServer &ref1,
+ MaximusCallBack &ref2):
+ Processor (ref1, ref2, SCI_MSG_TYPE_PHY),
+ mpChannel (NULL),
+ mIsChannelEnabled (false),
+ mNbOfCarriers (0),
+ mpTonemask (NULL),
+ phy_TxId (0),
+ ZeroCross_interval (0),
+ PhySciMsg_ZeroCross (0),
+ Is_FalseAlarm (false),
+ PhySciMsg_WrongPre (0),
+ FalseAlarm_avg_interval (0),
+ FalseAlarm_deviation (0)
+{
+ logFunction ();
+
+ PhySciMsg_ZeroCross.set_phy_type (PHY_TYPE_ZERO_CROSS);
+ PhySciMsg_ZeroCross.set_phy_flags (PHY_FLAG_CRC_OK);
+ PhySciMsg_ZeroCross.set_sci_stationid (getpid());
+
+ PhySciMsg_WrongPre.set_phy_type (PHY_TYPE_PREAMBLE);
+ PhySciMsg_WrongPre.set_phy_flags (PHY_FLAG_CRC_OK
+ | PHY_FLAG_WRONG_PREAMBLE);
+
+ FalseAlarm_mersenne_twister.seed (time (0));
+}
+
+PhyProcessor::~PhyProcessor ()
+{
+ logFunction ();
+
+ delete [] mpTonemask;
+}
+
+SciMsg *
+PhyProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ logFunction ();
+
+ return new PhySciMsg (header, buffer);
+}
+
+inline void
+PhyProcessor::del_phy_msg (PhySciMsg *msg)
+{
+ static MsgMpdu_list_t::iterator it;
+ MsgMpdu *mpdu = NULL;
+
+ for (it = MsgMpdu_list.begin ();
+ it != MsgMpdu_list.end ();
+ ++it)
+ {
+ if (it->second == msg)
+ {
+ mpdu = it->first;
+ MsgMpdu_list.erase (it);
+ break;
+ }
+ }
+
+ if (msg != &PhySciMsg_ZeroCross && msg != &PhySciMsg_WrongPre)
+ delete msg;
+
+ if (mpdu)
+ {
+ maximus_log (LOG_INFO, "mpdu sent");
+ mpdu->set_is_sent ();
+ }
+}
+
+void
+PhyProcessor::scheduler_drop_event (SciMsg *msg)
+{
+ logFunction ();
+
+ PhySciMsg *phy_msg = static_cast <PhySciMsg *> (msg);
+
+ del_phy_msg (phy_msg);
+}
+
+void
+PhyProcessor::mpdu_schedule (
+ MsgMpdu *mpdu,
+ PhySciMsg *preamble,
+ PhySciMsg *fc,
+ PhySciMsg *payload)
+{
+ logFunction ();
+
+ /* An Mpdu is composed of 3 (or 2) PhySciMsg messages */
+ if (!preamble || !fc || !payload)
+ {
+ Error e (
+ __PRETTY_FUNCTION__,
+ "Null pointer in input of this function", errno);
+ e.display ();
+ return;
+ }
+
+ Network_Clock_Tick current_tick;
+ Network_Clock_Tick tickPre;
+ Network_Clock_Tick tickFc;
+ Network_Clock_Tick tickMpdu;
+
+ current_tick = p_scheduler->get_current_tick ();
+
+ /* Schedule PREAMBLE message. */
+ tickPre = current_tick
+ + MAXIMUS_PHY_PREAMBLE_DETECTION_DELAY_TCK;
+ p_scheduler->add_phy_event (
+ tickPre, 0, 0, preamble);
+
+ /* Schedule FC message. */
+ Phy_Fc_Mode fc_mode = fc->get_phy_FcMode ();
+
+ unsigned int preDuration = MAC_PREAMBLE_TCK;
+ unsigned int fcDuration = MAC_FC_AV_TCK;
+
+ if ((PHY_FC_MODE_HYBRID_2 == fc_mode)
+ || (PHY_FC_MODE_AV_2 == fc_mode))
+ {
+ fcDuration *= 2;
+ }
+ if ((PHY_FC_MODE_HYBRID_1 == fc_mode)
+ || (PHY_FC_MODE_HYBRID_2 == fc_mode))
+ {
+ preDuration = MAC_PREAMBLE_HYBRID_TCK;
+ fcDuration += MAC_FC_10_TCK;
+ }
+ tickFc = current_tick
+ + (preDuration - MAXIMUS_PHY_PREAMBLE_DETECTION_DELAY_TCK)
+ + fcDuration
+ + MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK;
+
+ p_scheduler->add_phy_event (
+ tickFc, 0, 0, fc);
+
+ /* Schedule PAYLOAD message. */
+ if (!payload->get_phy_shortppdu ())
+ {
+ Phy_Mod mod = payload->get_phy_mod ();
+ Phy_Fecrate fecrate = payload->get_phy_FecRate ();
+ Phy_Flags flags = payload->get_phy_flags ();
+ Phy_Nb_Of_Pbs pb_nb = payload->get_phy_NbOfPbs ();
+ Phy_Gil gil = payload->get_phy_gil ();
+
+ /* MPDU delay depends on tonemask, modulation, fecrate,
+ * PB size, number of PBs, guard interval,
+ * number of bits per symbol, and number of symbols. */
+
+ /* Calculate MPDU payload transimission time. */
+ unsigned int bitsPerSymbol = maximus_dur_bits_per_symbol (
+ mod, getTonemask(), NULL, getNbOfCarriers());
+
+ phy_pb_size_t pbSize = (PHY_FLAG_PB512 & flags) ?
+ PHY_PB_SIZE_520 : PHY_PB_SIZE_136;
+
+ unsigned int symbolNb = maximus_dur_symbol_nb (
+ mod, fecrate, pbSize, bitsPerSymbol, pb_nb);
+
+ unsigned int durationInTicks = maximus_dur_data_tck (
+ gil, symbolNb);
+
+ tickMpdu = current_tick
+ + durationInTicks
+ - MAXIMUS_PHY_FC_RECEPTION_DELAY_TCK
+ + MAXIMUS_PHY_MPDU_RECEPTION_DELAY_TCK;
+
+ p_scheduler->add_phy_event (
+ tickMpdu, 0, 1, payload);
+
+ MsgMpdu_list.push_back (
+ std::make_pair (mpdu, payload));
+ }
+ else
+ {
+ del_phy_msg (payload);
+ MsgMpdu_list.push_back (
+ std::make_pair (mpdu, fc));
+ }
+}
+
+void
+PhyProcessor::dispatchMsgProc (SciMsg *msg_rx)
+{
+ logFunction ();
+
+ typedef void (PhyProcessor::*receive_t)(PhySciMsg &);
+
+ static const receive_t fct[PHY_TYPE_NB] = {
+ &PhyProcessor::receiveInvalid,
+ &PhyProcessor::receivePre,
+ &PhyProcessor::receiveFc,
+ &PhyProcessor::receiveFc,
+ &PhyProcessor::receivePrs,
+ &PhyProcessor::receive_payload,
+ &PhyProcessor::receiveTonemask,
+ &PhyProcessor::receiveTonemap,
+ &PhyProcessor::receiveInvalid,
+ &PhyProcessor::receive_rx,
+ &PhyProcessor::receiveInvalid };
+
+ PhySciMsg &msg = static_cast <PhySciMsg &> (*msg_rx);
+ Phy_Type type = msg.get_phy_type ();
+
+ if (msg.check_phy_fields ()
+ && PHY_VERSION == msg.get_phy_version ()
+ && type < PHY_TYPE_NB)
+ {
+ (this->*fct[type]) (msg);
+ }
+
+ del_phy_msg (static_cast <PhySciMsg *> (msg_rx));
+}
+
+void
+PhyProcessor::scheduler_send_event (
+ Sci_Msg_Station_Id clock_staid,
+ Network_Clock_Id clock_id,
+ SciMsg *msg)
+{
+ PhySciMsg *phy_msg = static_cast <PhySciMsg *> (msg);
+ assert (phy_msg);
+
+ Phy_Type phy_type = phy_msg->get_phy_type ();
+ phy_msg->set_sci_stationid (getpid ());
+
+ switch (phy_type)
+ {
+ case PHY_TYPE_NONE:
+ case PHY_TYPE_NB:
+ errno = EINVAL;
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "Phy_type is invalid", errno);
+
+ case PHY_TYPE_PREAMBLE:
+ phy_TxId++;
+ phy_msg->set_phy_TxId (phy_TxId);
+
+ if (phy_msg->get_phy_flags () & PHY_FLAG_WRONG_PREAMBLE)
+ {
+ if (Is_FalseAlarm)
+ {
+ phy_msg->setup_and_send_to_all (sci_server);
+ scheduleNextWrongPre (roll_die_next_interval ());
+ }
+ }
+ else
+ phy_msg->setup_and_send_to_all (sci_server);
+ break;
+
+ case PHY_TYPE_MPDU_PAYLOAD:
+ phy_msg->set_phy_TxId (phy_TxId);
+ send_mpdu_and_noise (*phy_msg);
+ break;
+
+ case PHY_TYPE_ZERO_CROSS:
+ phy_msg->setup_and_send_to_all (sci_server);
+ schedule_next_zero_cross ();
+ break;
+
+ case PHY_TYPE_PRS:
+ case PHY_TYPE_TONEMASK:
+ case PHY_TYPE_TONEMAP:
+ case PHY_TYPE_RX:
+ /* XXX : is it not a bug ? */
+ phy_msg->setup_and_send_to_all (sci_server);
+ break;
+
+ case PHY_TYPE_NOISE:
+ phy_msg->set_phy_flags (PHY_FLAG_CRC_OK);
+ phy_msg->setup_and_send_to_all (sci_server);
+ break;
+
+ case PHY_TYPE_FC_HYBRID_MODE:
+ case PHY_TYPE_FC_AV_ONLY_MODE:
+ phy_msg->set_phy_TxId (phy_TxId);
+ phy_msg->setup_and_send_to_all (sci_server);
+ break;
+ }
+
+ del_phy_msg (phy_msg);
+}
+
+void
+PhyProcessor::receiveInvalid (PhySciMsg &sci)
+{
+ logFunction();
+
+ errno = ENOMSG;
+ throw Error (__PRETTY_FUNCTION__,
+ "receive PHY SCI message of invalid type",
+ errno);
+}
+
+void
+PhyProcessor::receivePre (PhySciMsg &sci)
+{
+ logFunction ();
+
+ if (isChannelEnabled())
+ {
+ getChannel()->receivePre (
+ sci.get_sci_stationid (),
+ p_scheduler->get_current_tick ());
+ }
+
+ sci.setup_and_send_to_all (sci_server);
+}
+
+void
+PhyProcessor::receiveFc (PhySciMsg &sci)
+{
+ logFunction ();
+ const Phy_Type fc_type = sci.get_phy_type ();
+
+ Frame_Control fc;
+ unsigned char * pDataIndex = sci.get_phy_data_addr ();
+
+ if (PHY_TYPE_FC_HYBRID_MODE == fc_type)
+ {
+ memcpy(&fc.fc_10, pDataIndex, sizeof(uint32_t));
+ pDataIndex += sizeof(uint32_t);
+ }
+ else
+ fc.fc_10 = 0;
+
+ memcpy(fc.fc_av, pDataIndex, 4*sizeof(uint32_t));
+
+ Expected_Tx tx;
+ tx.src_tx_id = sci.get_phy_TxId ();
+ tx.src_station_id = sci.get_sci_stationid();
+ rx_fc_list[tx] = fc;
+
+ if (isChannelEnabled())
+ {
+ getChannel()->receiveFc (
+ sci.get_sci_stationid (),
+ p_scheduler->get_current_tick ());
+ }
+
+ sci.setup_and_send_to_all (sci_server);
+}
+
+void
+PhyProcessor::receivePrs (PhySciMsg &sci)
+{
+ logFunction ();
+ sci.setup_and_send_to_all (sci_server);
+}
+
+void
+PhyProcessor::receive_payload (PhySciMsg &sci)
+{
+ logFunction ();
+
+ Expected_Tx tx;
+ tx.src_tx_id = sci.get_phy_TxId ();
+ tx.src_station_id = sci.get_sci_stationid();
+
+ maximus_cb.recv_phy_mpdu_cb (
+ static_cast <unsigned long> (rx_fc_list[tx].fc_10),
+ (unsigned long *) rx_fc_list[tx].fc_av,
+ sci);
+
+ rx_fc_list.erase (tx);
+ send_mpdu_and_noise (sci);
+}
+
+void
+PhyProcessor::receiveTonemask (PhySciMsg &sci)
+{
+ logFunction ();
+
+ /* Check PHY SCI message data length. */
+ if (((sizeof(unsigned int) + (PHY_CARRIER_NB+7)/8) != sci.get_phy_data_size ())
+ || (NULL == sci.get_phy_data_addr ()))
+ {
+ errno = EINVAL;
+ throw Error(__PRETTY_FUNCTION__, "received PHY SCI message TONEMASK is incorrect", errno);
+ }
+
+ /* Set number of active carriers. */
+ unsigned int nbOfCarriers;
+ memcpy(&nbOfCarriers, sci.get_phy_data_addr (), sizeof(unsigned int));
+ setNbOfCarriers(nbOfCarriers);
+
+ setTonemask (sci.get_phy_data_size () - sizeof (unsigned int),
+ sci.get_phy_data_addr () + sizeof (unsigned int));
+
+ if (isChannelEnabled())
+ {
+ getChannel()->setTonemask (getTonemask ());
+ }
+}
+
+void
+PhyProcessor::receiveTonemap (PhySciMsg & sci)
+{
+ logFunction ();
+
+ if (isChannelEnabled ())
+ {
+ getChannel ()->setTonemap (
+ sci.get_sci_stationid (),
+ sci.get_phy_data_size (),
+ sci.get_phy_data_addr ());
+ }
+}
+
+void
+PhyProcessor::receive_rx (PhySciMsg &sci)
+{
+ logFunction ();
+
+ Sci_Msg_Station_Id sta_id_rx = sci.get_sci_stationid ();
+ unsigned char *data = sci.get_phy_data_addr ();
+
+ /* payload is composed with only one field. */
+ /* TODO XXX : improve this reading operation. */
+ Sci_Msg_Station_Id *sta_id_sender =
+ (Sci_Msg_Station_Id *) data;
+
+ std::pair <Phy_Tx_Id, Sci_Msg_Station_Id> key;
+ key.first = sci.get_phy_TxId ();
+ key.second = *sta_id_sender;
+
+ maximus_log (LOG_INFO, "rx_activated_list.insert (<< 0x" << std::hex << key.first
+ << " , 0x" << std::hex << key.second << "> , 0x"
+ << std::hex << sta_id_rx << ">)");
+
+ rx_activated_list.insert (
+ std::pair <std::pair <Phy_Tx_Id, Sci_Msg_Station_Id>,
+ Sci_Msg_Station_Id> (key, sta_id_rx));
+}
+
+void
+PhyProcessor::activateFalseAlarm (
+ const Network_Clock_Tick avg_interval,
+ const float deviation)
+{
+ logFunction ();
+
+ /* Check input values. */
+ if ((0 == avg_interval) || (0 > deviation))
+ {
+ errno = EINVAL;
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "average duration and/or standard \
+ deviation are out-of-range",
+ errno);
+ }
+
+ FalseAlarm_avg_interval = avg_interval;
+ FalseAlarm_deviation = deviation;
+
+ if (Is_FalseAlarm)
+ {
+ Is_FalseAlarm = true;
+ /* Schedules the first PHY SCI message of type
+ * PREAMBLE with the flag PHY_FLAG_WRONG_PREAMBLE set. */
+ scheduleNextWrongPre (
+ MAXIMUS_PHY_PREAMBLE_DETECTION_DELAY_TCK);
+ }
+}
+
+void
+PhyProcessor::deactivateFalseAlarm ()
+{
+ logFunction ();
+
+ Is_FalseAlarm = false;
+}
+
+void
+PhyProcessor::set_zerocross_freq (
+ const float frequency)
+{
+ logFunction ();
+
+ if (frequency)
+ {
+ ZeroCross_interval = 25000000 / (2 * frequency);
+
+ schedule_next_zero_cross ();
+
+ if (isChannelEnabled ())
+ getChannel ()->setBeaconPeriod (frequency);
+ }
+ else
+ ZeroCross_interval = 0;
+}
+
+bool
+PhyProcessor::setChannel (
+ ChannelComputer * p_channel)
+{
+ logFunction ();
+ bool bSetChannel = true;
+
+ if (NULL == p_channel)
+ {
+ errno = EINVAL;
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "Channel pointer is NULL", errno);
+ }
+
+ mpChannel = p_channel;
+ if (NULL != mpTonemask)
+ {
+ bSetChannel = p_channel->setTonemask(getTonemask());
+ }
+
+ return bSetChannel;
+}
+
+ChannelComputer *
+PhyProcessor::getChannel () const
+{
+ if (NULL == mpChannel)
+ {
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "Channel pointer is NULL");
+ }
+
+ return mpChannel;
+}
+
+bool
+PhyProcessor::setIsChannelEnabled (
+ const bool is_channel_enabled)
+{
+ mIsChannelEnabled = is_channel_enabled;
+
+ return true;
+}
+
+bool
+PhyProcessor::isChannelEnabled () const
+{
+ return mIsChannelEnabled;
+}
+
+unsigned int
+PhyProcessor::getNbOfCarriers () const
+{
+ if ((PHY_CARRIER_NB < mNbOfCarriers)
+ || (0 == mNbOfCarriers))
+ {
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "number of carriers has not been correctly set");
+ }
+
+ return mNbOfCarriers;
+}
+
+bool
+PhyProcessor::setNbOfCarriers (
+ const unsigned int nb_of_carriers)
+{
+ if ((PHY_CARRIER_NB < nb_of_carriers)
+ || (0 == nb_of_carriers))
+ {
+ errno = EINVAL;
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "number of carriers is out-of-range", errno);
+ }
+
+ mNbOfCarriers = nb_of_carriers;
+ return true;
+}
+
+const uint8_t *
+PhyProcessor::getTonemask () const
+{
+ if (NULL == mpTonemask)
+ {
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "tonemask pointer is NULL");
+ }
+
+ return mpTonemask;
+}
+
+void
+PhyProcessor::setTonemask (
+ const unsigned int length,
+ const uint8_t * p_tonemask)
+{
+ if (((PHY_CARRIER_NB+7)/8 != length)
+ || (NULL == p_tonemask))
+ {
+ errno = EINVAL;
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "tonemask length is incorrect and/or tonemask pointer is NULL",
+ errno);
+ }
+
+ /* If tonemask has already been set,
+ * delete it before setting the new one. */
+ if (NULL != mpTonemask)
+ {
+ maximus_log (LOG_INFO, "tonemask already set");
+ delete [] mpTonemask;
+ mpTonemask = NULL;
+ }
+
+ /* Allocate memory and set tonemask. */
+ mpTonemask = new uint8_t[length];
+ memcpy (mpTonemask, p_tonemask, length);
+}
+
+void
+PhyProcessor::schedule_next_zero_cross ()
+{
+ logFunction ();
+
+ if (ZeroCross_interval)
+ {
+ Network_Clock_Tick tickZeroCross =
+ p_scheduler->get_current_tick ()
+ + ZeroCross_interval;
+
+ p_scheduler->add_phy_event (
+ tickZeroCross, 0, 0, &PhySciMsg_ZeroCross);
+ }
+}
+
+inline void
+PhyProcessor::send_mpdu_and_noise (PhySciMsg &sci_payload)
+{
+ logFunction();
+
+ size_t noise_size = 0;
+ const Phy_Tx_Id phy_tx_id = sci_payload.get_phy_TxId ();
+ const Sci_Msg_Station_Id sta_id_sender =
+ sci_payload.get_sci_stationid ();
+
+ std::pair <Phy_Tx_Id, Sci_Msg_Station_Id> key;
+ key.first = phy_tx_id;
+ key.second = sta_id_sender;
+
+ /* Nobody want this payload message! */
+ if (rx_activated_list.count (key) == 0)
+ return;
+ maximus_log (LOG_INFO, "rx_activated_list.count (key) = "
+ << rx_activated_list.count (key));
+
+ rx_activated_list_t::iterator it;
+ std::pair <rx_activated_list_t::iterator,
+ rx_activated_list_t::iterator> range;
+ range = rx_activated_list.equal_range (key);
+
+ if (isChannelEnabled ())
+ noise_size = ((PHY_CARRIER_NB + MAC_MAX_SYMB_PER_MPDU)
+ * sizeof (phy_noise_energy_t));
+
+ PhySciMsg sci_noise (noise_size);
+ sci_noise.set_phy_type (PHY_TYPE_NOISE);
+ sci_noise.set_phy_TxId (phy_tx_id);
+ sci_noise.set_phy_flags (PHY_FLAG_CRC_OK);
+
+ for (it=range.first; it!=range.second; ++it)
+ {
+ const Sci_Msg_Station_Id dst_sta_id = it->second;
+
+ if (noise_size != 0)
+ getChannel()->addPerturbation (
+ sci_noise, sci_payload, sta_id_sender, dst_sta_id);
+
+ sci_noise.set_sci_stationid (sta_id_sender);
+
+ sci_payload.setup_and_send (sci_server, dst_sta_id);
+ sci_noise.setup_and_send (sci_server, dst_sta_id);
+ }
+
+ rx_activated_list.erase (key);
+}
+
+Network_Clock_Tick
+PhyProcessor::roll_die_next_interval () const
+{
+ logFunction();
+
+ /**
+ * Link about boost_random documentation.
+ * Website: http://www.boost.org
+ * URL: /doc/libs/1_46_1/doc/html/boost_random/tutorial.html
+ */
+
+ boost::normal_distribution <double> FalseAlarm_distribution (
+ FalseAlarm_avg_interval,
+ FalseAlarm_deviation);
+
+ boost::variate_generator
+ /* Normally boost::mt19937 should be a reference. */
+ <boost::mt19937,
+ boost::normal_distribution <double> > generator (
+ FalseAlarm_mersenne_twister,
+ FalseAlarm_distribution);
+
+ return static_cast <Network_Clock_Tick> (generator ());
+}
+
+bool
+PhyProcessor::scheduleNextWrongPre (
+ const Network_Clock_Tick next_interval)
+{
+ logFunction ();
+
+ /* XXX TODO : is should be getpid () ? */
+ Sci_Msg_Station_Id maximus_sta_id = 0;
+
+ Network_Clock_Tick tick =
+ p_scheduler->get_current_tick ()
+ + next_interval;
+
+ p_scheduler->add_phy_event (
+ tick, maximus_sta_id, 0, &PhySciMsg_WrongPre);
+
+ return true;
+}
diff --git a/cesar/maximus/processors/src/Processor.cpp b/cesar/maximus/processors/src/Processor.cpp
new file mode 100644
index 0000000000..66adf2c8e0
--- /dev/null
+++ b/cesar/maximus/processors/src/Processor.cpp
@@ -0,0 +1,31 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/src/Processor.cpp
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+
+Processor::Processor (SciServer &ref1,
+ MaximusCallBack &ref2,
+ Sci_Msg_Type type):
+ processor_type (type),
+ sci_server (ref1),
+ maximus_cb (ref2),
+ p_scheduler (NULL)
+{
+ sci_server.register_processor (type, this);
+}
+
+Processor::~Processor ()
+{
+ sci_server.unregister_processor (processor_type);
+}
diff --git a/cesar/maximus/processors/src/SystemProcessor.cpp b/cesar/maximus/processors/src/SystemProcessor.cpp
new file mode 100644
index 0000000000..806fc33cb8
--- /dev/null
+++ b/cesar/maximus/processors/src/SystemProcessor.cpp
@@ -0,0 +1,123 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/processors/src/SystemProcessor.cpp
+ * \ingroup maximus_processors
+ *
+ */
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/processors/inc/SystemProcessor.h"
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/sci/inc/SystemSciMsg.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include <cstring>
+
+SystemProcessor::SystemProcessor (SciServer &ref1,
+ MaximusCallBack &ref2,
+ stations_list_t &ref3):
+ Processor (ref1, ref2, SCI_MSG_TYPE_SYSTEM),
+ sta_list (ref3)
+{
+ logFunction ();
+}
+
+SystemProcessor::~SystemProcessor ( )
+{
+ logFunction ();
+}
+
+SciMsg *
+SystemProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ logFunction ();
+
+ return new SystemSciMsg (header, buffer);
+}
+
+void
+SystemProcessor::dispatchMsgProc (SciMsg *msg_rx)
+{
+ logFunction ();
+
+ SystemSciMsg &msg = static_cast <SystemSciMsg &> (*msg_rx);
+
+ if (SYSTEM_VERSION == msg.get_system_version ()
+ && SYSTEM_TYPE_IDLE == msg.get_system_type ())
+ {
+ Station *pStation = findStation (
+ msg.get_sci_stationid ());
+
+ if (pStation)
+ {
+ pStation->decrementStationIdleCounter ();
+
+ if ((0 == pStation->getStationIdleCounter ())
+ && (MAXIMUS_STATION_STATUS_DEACTIVATED
+ != pStation->getStationStatus ()))
+ {
+ pStation->setStationStatus (
+ MAXIMUS_STATION_STATUS_IDLE);
+ }
+ }
+ }
+
+ delete msg_rx;
+}
+
+void
+SystemProcessor::send_name (
+ const Station &sta)
+{
+ logFunction ();
+
+ std::string station_name = sta.get_station_name ();
+ SystemSciMsg msg (station_name.length () + 1);
+ unsigned char *data = msg.get_system_data_addr ();
+ strcpy ((char *)data, station_name.c_str());
+ msg.set_system_type (SYSTEM_TYPE_STATION_NAME);
+ msg.set_sci_stationid (sta.getStationId ());
+ msg.setup_and_send (sci_server);
+}
+
+Station *
+SystemProcessor::findStation (
+ const Sci_Msg_Station_Id station_id) const
+{
+ logFunction ();
+
+ Station *pStation = NULL;
+
+ stations_list_t::const_iterator it;
+ for (it = sta_list.begin ();
+ it != sta_list.end (); ++it)
+ {
+ if (*it
+ && (station_id == (*it)->getStationId ()) )
+ {
+ pStation = *it;
+ break;
+ }
+ }
+
+ if (NULL == pStation)
+ {
+ maximus_log (LOG_FATAL, "station with id "
+ << std::dec << station_id << " (0x"
+ << std::hex << station_id
+ << ") does not exist");;
+ errno = ENONET;
+ throw Error (
+ __PRETTY_FUNCTION__,
+ "station does not exist", errno);
+ }
+
+ return pStation;
+}
diff --git a/cesar/maximus/python/Config b/cesar/maximus/python/Config
new file mode 100644
index 0000000000..5accfa5fd7
--- /dev/null
+++ b/cesar/maximus/python/Config
@@ -0,0 +1 @@
+CONFIG_LOG = n
diff --git a/cesar/maximus/python/Makefile b/cesar/maximus/python/Makefile
index d8686216cb..781eb3b664 100644
--- a/cesar/maximus/python/Makefile
+++ b/cesar/maximus/python/Makefile
@@ -2,8 +2,7 @@ BASE = ../..
HOST_PROGRAMS = interface.so
-interface.so_SOURCES = interface_module.cpp
-interface.so_MODULES = lib/python maximus lib
+interface.so_MODULES = lib/python maximus/python/boost maximus lib
interface.so_LDLIBS = -fPIC -shared
include $(BASE)/common/make/top.mk
diff --git a/cesar/maximus/python/boost/Module b/cesar/maximus/python/boost/Module
new file mode 100644
index 0000000000..3390d43f98
--- /dev/null
+++ b/cesar/maximus/python/boost/Module
@@ -0,0 +1 @@
+SOURCES := interface.cpp sta.cpp maximus.cpp msg.cpp
diff --git a/cesar/maximus/python/boost/inc/interface.h b/cesar/maximus/python/boost/inc/interface.h
new file mode 100644
index 0000000000..8fadba826f
--- /dev/null
+++ b/cesar/maximus/python/boost/inc/interface.h
@@ -0,0 +1,27 @@
+#ifndef maximus_python_boost_inc_interface_h
+#define maximus_python_boost_inc_interface_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/inc/interface.h
+ * \ingroup maximus_python_boost
+ *
+ */
+
+/**
+ * Note: CallPolicy are very important for python.
+ * Documentation: http://wiki.python.org/moin/boost.python/CallPolicy
+ *
+ * Example: Obj = Maximus::create ()
+ * Explanation: Keeps Maximus object as long as result 'Obj' is alive.
+ */
+#define MAXIMUS_DEPENDENCY (boost::python::with_custodian_and_ward_postcall <0, 1, \
+ boost::python::return_value_policy <\
+ boost::python::manage_new_object> > ())
+
+#endif /* maximus_python_boost_inc_interface_h */
diff --git a/cesar/maximus/python/boost/inc/maximus.h b/cesar/maximus/python/boost/inc/maximus.h
new file mode 100644
index 0000000000..299206a1c8
--- /dev/null
+++ b/cesar/maximus/python/boost/inc/maximus.h
@@ -0,0 +1,18 @@
+#ifndef maximus_python_boost_inc_maximus_h
+#define maximus_python_boost_inc_maximus_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/inc/maximus.h
+ * \ingroup maximus_python_boost
+ *
+ */
+
+void export_maximus ();
+
+#endif /* maximus_python_boost_inc_maximus_h */
diff --git a/cesar/maximus/python/boost/inc/msg.h b/cesar/maximus/python/boost/inc/msg.h
new file mode 100644
index 0000000000..135620eda1
--- /dev/null
+++ b/cesar/maximus/python/boost/inc/msg.h
@@ -0,0 +1,18 @@
+#ifndef maximus_python_boost_inc_msg_h
+#define maximus_python_boost_inc_msg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/inc/msg.h
+ * \ingroup maximus_python_boost
+ *
+ */
+
+void export_msg ();
+
+#endif /* maximus_python_boost_inc_msg_h */
diff --git a/cesar/maximus/python/boost/inc/sta.h b/cesar/maximus/python/boost/inc/sta.h
new file mode 100644
index 0000000000..4b3f84a83d
--- /dev/null
+++ b/cesar/maximus/python/boost/inc/sta.h
@@ -0,0 +1,18 @@
+#ifndef maximus_python_boost_inc_sta_h
+#define maximus_python_boost_inc_sta_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/inc/sta.h
+ * \ingroup maximus_python_boost
+ *
+ */
+
+void export_sta ();
+
+#endif /* maximus_python_boost_inc_sta_h */
diff --git a/cesar/maximus/python/boost/src/interface.cpp b/cesar/maximus/python/boost/src/interface.cpp
new file mode 100644
index 0000000000..16f18c6987
--- /dev/null
+++ b/cesar/maximus/python/boost/src/interface.cpp
@@ -0,0 +1,31 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/src/interface.cpp
+ * \ingroup maximus_python_boost
+ *
+ */
+#include "maximus/python/boost/inc/maximus.h"
+#include "maximus/python/boost/inc/msg.h"
+#include "maximus/python/boost/inc/sta.h"
+#include "maximus/python/boost/inc/interface.h"
+#include <boost/python.hpp>
+
+BOOST_PYTHON_MODULE(interface)
+{
+ /**
+ * Documentation about wrapper split can be found here:
+ *
+ * website: http://www.boost.org
+ * baseurl: /doc/libs/1_51_0/libs/python/doc/tutorial/doc/html/python/techniques.html
+ * anchor: #python.extending_wrapped_objects_in_python
+ */
+ export_maximus ();
+ export_sta ();
+ export_msg ();
+}
diff --git a/cesar/maximus/python/boost/src/maximus.cpp b/cesar/maximus/python/boost/src/maximus.cpp
new file mode 100644
index 0000000000..0f2a971a15
--- /dev/null
+++ b/cesar/maximus/python/boost/src/maximus.cpp
@@ -0,0 +1,87 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/src/maximus.cpp
+ * \ingroup maximus_python_boost
+ *
+ */
+#include "maximus/interface/inc/Maximus.h"
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/interface/msg/inc/MsgFunctionCall.h"
+#include "maximus/python/boost/inc/maximus.h"
+#include "maximus/python/boost/inc/interface.h"
+#include <boost/python.hpp>
+#include <string>
+
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (
+ disturb_channel_overloads,
+ Maximus::disturb_channel, 0, 1)
+
+void
+export_maximus ()
+{
+ void (Maximus::*set_snrx1)(const float) = &Maximus::set_snr;
+ void (Maximus::*set_snrx2)(const std::string &) = &Maximus::set_snr;
+ void (Maximus::*set_snr_from_srcx1)(
+ const float, const Station &, const bool)
+ = &Maximus::set_snr_from_src;
+ void (Maximus::*set_snr_from_srcx2)(
+ const std::string &, const Station &, const bool)
+ = &Maximus::set_snr_from_src;
+ void (Maximus::*set_snr_to_dstx1)(
+ const float, const Station &, const bool)
+ = &Maximus::set_snr_to_dst;
+ void (Maximus::*set_snr_to_dstx2)(
+ const std::string &, const Station &, const bool)
+ = &Maximus::set_snr_to_dst;
+ void (Maximus::*set_snr_from_src_to_dstx1)(
+ const float, const Station &, const Station &, const bool)
+ = &Maximus::set_snr_from_src_to_dst;
+ void (Maximus::*set_snr_from_src_to_dstx2)(
+ const std::string &, const Station &, const Station &, const bool)
+ = &Maximus::set_snr_from_src_to_dst;
+
+
+ boost::python::class_<Maximus, boost::noncopyable>
+ ("Maximus")
+ .def ("init", &Maximus::init)
+ .def ("uninit", &Maximus::stop)
+ .def ("process", &Maximus::process)
+ .def ("create_sta", &Maximus::create_default_sta, MAXIMUS_DEPENDENCY)
+ .def ("create_sta", &Maximus::create_sta_1, MAXIMUS_DEPENDENCY)
+ .def ("create_sta", &Maximus::create_sta_2, MAXIMUS_DEPENDENCY)
+ .def ("create_fcall", &Maximus::create_fc, MAXIMUS_DEPENDENCY)
+ .def ("create_probe", &Maximus::create_probe, MAXIMUS_DEPENDENCY)
+ .def ("get_nb_sta", &Maximus::get_nb_sta)
+ .def ("send_mpdu", &Maximus::send_phy)
+ .def ("set_mpdu_rx", &Maximus::set_phy_rx)
+ .def ("send_msdu", &Maximus::send_ether)
+ .def ("set_msdu_rx", &Maximus::set_ether_rx)
+ .def ("set_msdu_rx_catch_all", &Maximus::set_ether_rx_catch_all)
+ .def ("reset_msdu_rx_catch_all", &Maximus::reset_ether_rx_catch_all)
+ .def ("wait", &Maximus::wait)
+ .def ("wait", &Maximus::wait_evt)
+ .def ("disturb_channel", &Maximus::disturb_channel,
+ disturb_channel_overloads())
+ .def ("get_date", &Maximus::get_date)
+ .def ("set_freq", &Maximus::set_freq)
+ .def ("get_freq", &Maximus::get_freq)
+ .def ("set_snr", set_snrx1)
+ .def ("set_snr", set_snrx2)
+ .def ("set_snr_from_src", set_snr_from_srcx1)
+ .def ("set_snr_from_src", set_snr_from_srcx2)
+ .def ("set_snr_to_dst", set_snr_to_dstx1)
+ .def ("set_snr_to_dst", set_snr_to_dstx2)
+ .def ("set_snr_from_src_to_dst", set_snr_from_src_to_dstx1)
+ .def ("set_snr_from_src_to_dst", set_snr_from_src_to_dstx2)
+ .def ("activate_false_alarm", &Maximus::activate_false_alarm)
+ .def ("deactivate_false_alarm", &Maximus::deactivate_false_alarm)
+ .def ("is_station_idle", &Maximus::is_station_idle)
+ .def ("hide_sta", &Maximus::hide_sta)
+ ;
+}
diff --git a/cesar/maximus/python/boost/src/msg.cpp b/cesar/maximus/python/boost/src/msg.cpp
new file mode 100644
index 0000000000..8dd095b644
--- /dev/null
+++ b/cesar/maximus/python/boost/src/msg.cpp
@@ -0,0 +1,62 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/src/msg.cpp
+ * \ingroup maximus_python_boost
+ *
+ */
+#include "maximus/interface/msg/inc/MsgFunctionCall.h"
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/python/boost/inc/msg.h"
+#include "maximus/python/boost/inc/interface.h"
+#include <boost/python.hpp>
+
+namespace bp = boost::python;
+
+void
+export_msg ()
+{
+ bp::class_<MsgFunctionCall, boost::noncopyable>
+ ("Msg", bp::no_init)
+ .def ("add_param", &MsgFunctionCall::add_param_empty)
+ .def ("add_param", &MsgFunctionCall::add_param_string)
+ .def ("add_param_bool", &MsgFunctionCall::add_param_bool)
+ .def ("add_param_uchar", &MsgFunctionCall::add_param_1)
+ .def ("add_param_ushort", &MsgFunctionCall::add_param_2)
+ .def ("add_param_ulong", &MsgFunctionCall::add_param_4)
+ .def ("add_param_ull", &MsgFunctionCall::add_param_8)
+ .def ("add_param_n_u8", &MsgFunctionCall::add_param_table_1)
+ .def ("add_param_n_u16", &MsgFunctionCall::add_param_table_2)
+ .def ("add_param_n_u32", &MsgFunctionCall::add_param_table_4)
+ .def ("remove_param", &MsgFunctionCall::remove_param)
+ .def ("set_cb", &MsgFunctionCall::set_cb,
+ /* Keeps 'Msg' alive as long as 'callback' is alive.
+ * callback reference will be release after call.
+ * Msg object is used for request and reply. */
+ bp::with_custodian_and_ward <2, 1> ())
+ .def ("remove_cb", &MsgFunctionCall::remove_cb)
+ .def ("set_sta", &MsgFunctionCall::set_sta,
+ /* Keeps 'Station' alive as long as 'Msg' is alive.
+ * see in cesar/ce/fcall/py */
+ bp::with_custodian_and_ward <1, 2> ())
+ .def ("send_async", &MsgFunctionCall::send_async)
+ .def ("send_async", &MsgFunctionCall::send_async_2)
+ .def ("send", &MsgFunctionCall::send)
+ .def ("send", &MsgFunctionCall::send_2)
+ .def ("is_param", &MsgFunctionCall::is_param)
+ .def ("bind_param", &MsgFunctionCall::bind_param_1)
+ .def ("bind_param_string", &MsgFunctionCall::bind_param_string)
+ .def ("bind_param_bool", &MsgFunctionCall::bind_param_bool)
+ .def ("bind_param_ushort", &MsgFunctionCall::bind_param_ushort)
+ .def ("bind_param_ulong", &MsgFunctionCall::bind_param_ulong)
+ .def ("bind_param_ull", &MsgFunctionCall::bind_param_ull)
+ .def ("bind_param_n_u8", &MsgFunctionCall::bind_param_n_u8)
+ .def ("bind_param_n_u16", &MsgFunctionCall::bind_param_n_u16)
+ .def ("bind_param_n_u32", &MsgFunctionCall::bind_param_n_u32)
+ ;
+}
diff --git a/cesar/maximus/python/boost/src/sta.cpp b/cesar/maximus/python/boost/src/sta.cpp
new file mode 100644
index 0000000000..4a4aca5a5e
--- /dev/null
+++ b/cesar/maximus/python/boost/src/sta.cpp
@@ -0,0 +1,30 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/python/boost/src/sta.cpp
+ * \ingroup maximus_python_boost
+ *
+ */
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/python/boost/inc/sta.h"
+#include "maximus/python/boost/inc/interface.h"
+#include <boost/python.hpp>
+
+void
+export_sta ()
+{
+ boost::python::class_<Station, boost::noncopyable>
+ ("Sta", boost::python::no_init)
+ .def ("deactivate", &Station::deactivate)
+ .def ("activate", &Station::activate)
+ .def ("debug", &Station::debug)
+ .def ("is_idle", &Station::is_idle)
+ .def ("get_station_id", &Station::getStationId)
+ .def ("set_name", &Station::set_name)
+ ;
+}
diff --git a/cesar/maximus/python/doc/fulminata_maximus_scenario_engine.xmi b/cesar/maximus/python/doc/fulminata_maximus_scenario_engine.xmi
deleted file mode 100755
index 8946d8348f..0000000000
--- a/cesar/maximus/python/doc/fulminata_maximus_scenario_engine.xmi
+++ /dev/null
@@ -1,1386 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2008-02-19T16:33:55" xmi.version="1.2" >
- <XMI.header>
- <XMI.documentation>
- <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
- <XMI.exporterVersion>1.5.6</XMI.exporterVersion>
- <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
- </XMI.documentation>
- <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
- </XMI.header>
- <XMI.content>
- <UML:Model isSpecification="false" isLeaf="false" isRoot="false" xmi.id="m1" isAbstract="false" name="UML Model" >
- <UML:Namespace.ownedElement>
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="folder" isRoot="false" isAbstract="false" name="folder" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="datatype" isRoot="false" isAbstract="false" name="datatype" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="interface" isRoot="false" isAbstract="false" name="interface" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="constructor" isRoot="false" isAbstract="false" name="constructor" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="enum" isRoot="false" isAbstract="false" name="enum" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="struct" isRoot="false" isAbstract="false" name="struct" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="typedef" isRoot="false" isAbstract="false" name="typedef" />
- <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="friend" isRoot="false" isAbstract="false" name="friend" />
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Logical View" isRoot="false" isAbstract="false" name="Logical View" >
- <UML:Namespace.ownedElement>
- <UML:Package stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Datatypes" isRoot="false" isAbstract="false" name="Datatypes" >
- <UML:Namespace.ownedElement>
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="agtmZAmehdXM" isRoot="false" isAbstract="false" name="int" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="JcPKyEye9iP3" isRoot="false" isAbstract="false" name="char" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="txbVRO36HpfQ" isRoot="false" isAbstract="false" name="bool" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="ZJ5BrRm819Tz" isRoot="false" isAbstract="false" name="float" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="LRcU81Wzx7SM" isRoot="false" isAbstract="false" name="double" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="VVSkI78sPE3E" isRoot="false" isAbstract="false" name="short" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="dpMdwnaHDClJ" isRoot="false" isAbstract="false" name="long" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="CFI9MjVrEwaX" isRoot="false" isAbstract="false" name="unsigned int" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="1iPQuScWFz9B" isRoot="false" isAbstract="false" name="unsigned short" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="mjQxu9G6PXDl" isRoot="false" isAbstract="false" name="unsigned long" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="GgbUcB1crO0m" isRoot="false" isAbstract="false" name="string" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="ARgEDvWDshpX" isRoot="false" isAbstract="false" name="const short int" elementReference="ek5GEEjxefv1" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="mXu6MdkX4QlH" isRoot="false" isAbstract="false" name="const float" elementReference="ZJ5BrRm819Tz" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="psrQPqT9L430" isRoot="false" isAbstract="false" name="const ChannelPoint&amp;" elementReference="VsbjUz1jzxim" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="5ToJ3zPrsGFF" isRoot="false" isAbstract="false" name="ChannelPoint&amp;" elementReference="VsbjUz1jzxim" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="oL4FZe2AHfNk" isRoot="false" isAbstract="false" name="const Network_Clock_Tick" elementReference="OMC8n0NgoyNC" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="WndGhsLWd8YJ" isRoot="false" isAbstract="false" name="uint32_t*" elementReference="7rs81OTZw4E7" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="8gZ2im9FZlVF" isRoot="false" isAbstract="false" name="PhySciMsgNoise&amp;" elementReference="nNLPS46tYU5B" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="hfBiNMiT2GVk" isRoot="false" isAbstract="false" name="const uint32_t*" elementReference="7rs81OTZw4E7" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="kj4rGrwwW6er" isRoot="false" isAbstract="false" name="const PhySciMsgMpdu&amp;" elementReference="r6SeLQ0E8ets" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="WzilSttBcw0q" isRoot="false" isAbstract="false" name="const Sci_Msg_Station_Id" elementReference="iF6aeCsJls2b" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="1XretJvqfug3" isRoot="false" isAbstract="false" name="const unsigned int" elementReference="CFI9MjVrEwaX" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="HSbuMHwp53nG" isRoot="false" isAbstract="false" name="const uint8_t*" elementReference="eNNzwM7vtyZm" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="PfzwSs1KcVMd" isRoot="false" isAbstract="false" name="const Channel_Settings_Key&amp;" elementReference="aXMfZ9tQ8GTx" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="PVMPlwqpaaYi" isRoot="false" isAbstract="false" name="std::map&lt; const Channel_Settings_Key, ChannelSettings *, ltkey >" elementReference="qYY4ISujM3Ed" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="tq6FaofPTzwd" isRoot="false" isAbstract="false" name="StationsList*" elementReference="0IENWuVgMRRQ" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="3YkVVg8j3o2Y" isRoot="false" isAbstract="false" name="IPhy*" elementReference="5VCzTkjjCKbZ" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="rxKsjMRYfTiU" isRoot="false" isAbstract="false" name="ISystem*" elementReference="P5iAKaTM6Drb" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="X118ilRkx2cY" isRoot="false" isAbstract="false" name="const unsigned short int" elementReference="SRA7JvZo6AuO" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="zypnSFDYKlG8" isRoot="false" isAbstract="false" name="const Channel_Mod" elementReference="kbTW3DFGwneP" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="fLpWgryb0030" isRoot="false" isAbstract="false" name="const unsigned char*" elementReference="eniEjhTPROwl" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="b4ob1ibWBqLq" isRoot="false" isAbstract="false" name="PhySciMsgMpdu&amp;" elementReference="r6SeLQ0E8ets" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="NBTpmTxZCmcb" isRoot="false" isAbstract="false" name="const bool" elementReference="txbVRO36HpfQ" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="LlOVV04Zpapx" isRoot="false" isAbstract="false" name="std::vector&lt; ChannelSettings * >&amp;" elementReference="AlwnfvQ24tqq" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="su73E4iG7Y8j" isRoot="false" isAbstract="false" name="const unsigned long" elementReference="mjQxu9G6PXDl" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="41M2qczWxT6z" isRoot="false" isAbstract="false" name="uint8_t*" elementReference="eNNzwM7vtyZm" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="m2IzC9ii2UsR" isRoot="false" isAbstract="false" name="const double" elementReference="LRcU81Wzx7SM" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="448sjDF59poj" isRoot="false" isAbstract="false" name="const ChannelPoint" elementReference="VsbjUz1jzxim" />
- <UML:DataType stereotype="datatype" isSpecification="false" isLeaf="false" visibility="public" namespace="Datatypes" xmi.id="BVdJY7XV1Crz" isRoot="false" isAbstract="false" name="unsigned int&amp;" elementReference="CFI9MjVrEwaX" />
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="ka695HsLyRqa" isRoot="false" isAbstract="false" name="Maximus simulator" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="rGkvr2wbb0ig" isRoot="false" isAbstract="false" name="station_id=1" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="ACuye0MTG4P7" isRoot="false" isAbstract="false" name="station_id=2" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="t1tc2bTZdTo7" isRoot="false" isAbstract="false" name="SCI server" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="EPI1UgANf3xg" isRoot="false" isAbstract="false" name="PHY processor" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="xbRaG9lhs3GA" isRoot="false" isAbstract="false" name="SCI msg" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="y0Zndhh8NjGq" isRoot="false" isAbstract="false" name="PHY SCI msg" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="ouQgLFbCZBH6" isRoot="false" isAbstract="false" name="USER" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="R2g1PPyRrFdJ" isRoot="false" isAbstract="false" name="bool [PHY_CARRIER_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="pKHo6OTH6XRU" isRoot="false" isAbstract="false" name="stationsList" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="MjbCnbmzupQK" isRoot="false" isAbstract="false" name="bool [PHY_CARRIER_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="iF6aeCsJls2b" isRoot="false" isAbstract="false" name="Sci_Msg_Station_Id" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="IVIVFrTsSA9W" isRoot="false" isAbstract="false" name="unsigned char [PHY_CARRIER_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="OTUqbbMS8cB5" isRoot="false" isAbstract="false" name="float [PHY_CARRIER_MAX_NB][interval_nb]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="Y2z0vH5PWhVj" isRoot="false" isAbstract="false" name="unsigned char [TONEMAP_INDEX_NB][PHY_CARRIER_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="NNrPbFIBbTWJ" isRoot="false" isAbstract="false" name="float [interval_nb][PHY_CARRIER_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="OMC8n0NgoyNC" isRoot="false" isAbstract="false" name="Network_Clock_Tick" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="QCc0kys9xMnl" isRoot="false" isAbstract="false" name="const float[interval_nb][PHY_CARRIER_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="pnRk9DVlgulU" isRoot="false" isAbstract="false" name="const unsigned char [PHY_CARRIER_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="0ZbYQWqDJFyR" isRoot="false" isAbstract="false" name="const unsigned char [PHY_CARRIER_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="SRA7JvZo6AuO" isRoot="false" isAbstract="false" name="unsigned short int" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="71EBB6ZerqDE" isRoot="false" isAbstract="false" name="Phy_Tonemap_Index" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="ryY5K4jdy734" isRoot="false" isAbstract="false" name="unsigned char *" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="5hM3oO8IvMZa" isRoot="false" isAbstract="false" name="Phy_Header &amp;" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="yBbPCZ8HGSK2" isRoot="false" isAbstract="false" name="uint8_t [PHY_SYMBOL_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="TwO4O4jLDIiP" isRoot="false" isAbstract="false" name="uint16_t [PHY_CARRIER_MAX_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="p0EIenqzKrdV" isRoot="false" isAbstract="false" name="Point" >
- <UML:Classifier.feature>
- <UML:Attribute isSpecification="false" visibility="public" xmi.id="ihYvkGnalcj8" type="agtmZAmehdXM" name="I" />
- <UML:Attribute isSpecification="false" visibility="public" xmi.id="DcQ21IYgvf4A" type="agtmZAmehdXM" name="Q" />
- <UML:Attribute isSpecification="false" visibility="public" xmi.id="0PpuG29IN9r4" type="CFI9MjVrEwaX" name="C" />
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="lRK3GxXGwC31" isRoot="false" isAbstract="false" isQuery="false" name="code" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="mXxquaFcgKTK" value="" type="eniEjhTPROwl" name="modulation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="tGjpAvxFMVQv" isRoot="false" isAbstract="false" isQuery="false" name="decode" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="fsUnMzU0oJzm" value="" type="eniEjhTPROwl" name="modulation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2UAE6pa80TlD" isRoot="false" isAbstract="false" isQuery="false" name="setC" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="08ssluxBHCfG" value="" type="CFI9MjVrEwaX" name="N" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="VGvoUjjCRsDk" value="" type="ryY5K4jdy734" name="mpdu_payload" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="OgKLO7M3nXAL" value="" type="agtmZAmehdXM" name="mpdu_index" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="iRfrv7uIeAaZ" isRoot="false" isAbstract="false" isQuery="false" name="setIQ" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="VAMLmupGxElF" value="" type="agtmZAmehdXM" name="I" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="uCytgOJgVmGl" value="" type="agtmZAmehdXM" name="Q" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="eniEjhTPROwl" isRoot="false" isAbstract="false" name="unsigned char" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="zwpATNw5hYwj" isRoot="false" isAbstract="false" name="PhyProcessor" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="J5I5GN6BUVNH" isRoot="false" isAbstract="false" name="PhySciMsg &amp;" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="CvLZ2CQ63P41" isRoot="false" isAbstract="false" name="station_id=3" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="IW1PTWwAuJXf" isRoot="false" isAbstract="false" name="unsigned int [MAXIMUS_PHY_MOD_NB]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="ek5GEEjxefv1" isRoot="false" isAbstract="false" name="short int" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="7rs81OTZw4E7" isRoot="false" isAbstract="false" name="uint32_t" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="eNNzwM7vtyZm" isRoot="false" isAbstract="false" name="uint8_t" />
- <UML:Package isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="6elj96McODtx" isRoot="false" isAbstract="false" name="std" >
- <UML:Namespace.ownedElement>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="6elj96McODtx" xmi.id="qYY4ISujM3Ed" isRoot="false" isAbstract="false" name="map" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="6elj96McODtx" xmi.id="AlwnfvQ24tqq" isRoot="false" isAbstract="false" name="vector" />
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Generalization isSpecification="false" child="FA5tCgQO5jOX" visibility="public" namespace="Logical View" xmi.id="guI259xtgWxy" parent="MJNkMwYhFv8H" discriminator="" name="" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="0IENWuVgMRRQ" isRoot="false" isAbstract="false" name="StationsList" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="P5iAKaTM6Drb" isRoot="false" isAbstract="false" name="ISystem" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="kbTW3DFGwneP" isRoot="false" isAbstract="false" name="Channel_Mod" />
- <UML:Generalization isSpecification="false" child="FA5tCgQO5jOX" visibility="public" namespace="Logical View" xmi.id="sOkJkhMy5511" parent="MJNkMwYhFv8H" discriminator="" name="" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="MMOOLBCfmrGJ" isRoot="false" isAbstract="false" name="uint8_t [(PHY_CARRIER_MAX_NB+1)/2]" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="5VCzTkjjCKbZ" isRoot="false" isAbstract="false" name="IPhy" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="nNLPS46tYU5B" isRoot="false" isAbstract="false" name="PhySciMsgNoise" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="r6SeLQ0E8ets" isRoot="false" isAbstract="false" name="PhySciMsgMpdu" />
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="aXMfZ9tQ8GTx" isRoot="false" isAbstract="false" name="Channel_Settings_Key" >
- <UML:Classifier.feature>
- <UML:Attribute isSpecification="false" visibility="public" xmi.id="FsOabmphHzei" type="iF6aeCsJls2b" name="tx_station_id" />
- <UML:Attribute isSpecification="false" visibility="public" xmi.id="jNPug1TGWnt5" type="iF6aeCsJls2b" name="rx_station_id" />
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="umW20xxGpJoP" isRoot="false" isAbstract="false" name="ltkey" >
- <UML:Classifier.feature>
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="3d6Ick1K5QEl" isRoot="false" isAbstract="false" isQuery="false" name="operator ( )" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="wEoKDxqvdkhA" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="TIrIZffdGlvq" value="" type="PfzwSs1KcVMd" name="key1" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="TuAXJMGi1GcR" value="" type="PfzwSs1KcVMd" name="key2" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="zSo720DHUtK4" isRoot="false" isAbstract="false" name="ChannelSettingsList" />
- <UML:Class comment="class ChannelComputer" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="FA5tCgQO5jOX" isRoot="false" isAbstract="false" name="ChannelComputer" >
- <UML:GeneralizableElement.generalization>
- <UML:Generalization xmi.idref="guI259xtgWxy" />
- <UML:Generalization xmi.idref="sOkJkhMy5511" />
- <UML:Generalization xmi.idref="KY1cn4F7HHaL" />
- </UML:GeneralizableElement.generalization>
- <UML:Classifier.feature>
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="vLNKsMwHnQ5O" type="zSo720DHUtK4" name="mListOfChannelSettings" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="uHZmB3x8YrWn" type="SRA7JvZo6AuO" name="mNumberOfCopiesArray" ownerScope="classifier" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="EPgLV4JWKVtq" type="tq6FaofPTzwd" name="mpListOfStations" />
- <UML:Attribute comment="// private attributes//// for random" isSpecification="false" visibility="private" xmi.id="iNWc4oZxCl7B" type="IWPuXt3VypIz" name="mEngine" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="GQR4rnp7JCzr" type="ZJ5BrRm819Tz" name="mPowerScaleArray" ownerScope="classifier" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="GewSP3dgS2iJ" type="41M2qczWxT6z" name="mpTonemask" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="pXR9jOynPIoD" type="CFI9MjVrEwaX" name="mBeaconPeriod" />
- <UML:Operation stereotype="constructor" comment="// Constructors/Destructors// /**
-Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="PNXlmw9fnFuL" isRoot="false" isAbstract="false" isQuery="false" name="ChannelComputer" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="rL49qwyEJTx3" value="" type="3YkVVg8j3o2Y" name="p_phy" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="Neig7djUiPf1" value="" type="rxKsjMRYfTiU" name="p_system" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Empty Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="y8L4KAg9702o" isRoot="false" isAbstract="false" isQuery="false" name="~ ChannelComputer" />
- <UML:Operation comment="// public methods// /**
-Compute PB measurement and NOISE.
-@param pb_measurement_array the PB measurement to fill in (for all PBs composing the MPDU)
-@param noise the PHY SCI message NOISE to fill in
-@param pb_header_array the PB header of each PB composing the MPDU
-@param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload
-@param tx_station_id the ID of the transmitting station
-@param rx_station_id the ID of the destination station
-@param current_tick the current Network Clock tick
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="LRN0s3UGfAwm" isRoot="false" isAbstract="false" isQuery="false" name="addPerturbation" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zd95SlqOdqdd" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="meGU1tTz0m2I" value="" type="WndGhsLWd8YJ" name="pb_measurement_array" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="wiR3gRq1sB2l" value="" type="8gZ2im9FZlVF" name="noise" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="EU1tfvdRXrtX" value="" type="hfBiNMiT2GVk" name="pb_header_array" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="lLWj7Y14EQ5v" value="" type="kj4rGrwwW6er" name="mpdu" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="svwi6wRIRQ94" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="MmVreMONht4n" value="" type="WzilSttBcw0q" name="rx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="P5reTuXLoR2s" value="" type="oL4FZe2AHfNk" name="current_tick" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Add Channel Settings to the list.
-Called when a station is created => create its associated Channel Settings.
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="MTBnuIpE5I5h" isRoot="false" isAbstract="false" isQuery="false" name="addChannelSettings" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zR12RM2LZqgm" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="eS2KL67i9wMc" value="" type="WzilSttBcw0q" name="created_station_id" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Called when the PHY processor receives a preamble.
-@param current_tick the current Network Clock tick
-@param tx_station_id the ID of the transmitting station
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="qrweJyXfPgQH" isRoot="false" isAbstract="false" isQuery="false" name="receivePre" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="nUhRCPZC2hFS" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="yDV1VZg7ziRI" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="mY0vULWJCSxT" value="" type="oL4FZe2AHfNk" name="current_tick" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Called when the PHY processor receives a frame control.
-@param current_tick the current Network Clock tick
-@param tx_station_id the ID of the transmitting station
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="OS6l8U35hW6C" isRoot="false" isAbstract="false" isQuery="false" name="receiveFc" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="S5r4uSfttewJ" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="3nK2TjIGGJ9i" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="ef1o7xGTPMFW" value="" type="oL4FZe2AHfNk" name="current_tick" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// private methods// /**
-Initializes the Channel Computer class attributes." isSpecification="false" isLeaf="false" visibility="private" xmi.id="jRbAQQ47XE3x" isRoot="false" isAbstract="false" isQuery="false" name="initAttributes" />
- <UML:Operation comment="Update the list of Channel Settings.
-Called when channel perturbation has to be added.
-Check if stations have been removed => remove their associated Channel Settings." isSpecification="false" isLeaf="false" visibility="private" xmi.id="qQZrSJeClEK9" isRoot="false" isAbstract="false" isQuery="false" name="updateListOfChannelSettings" />
- <UML:Operation comment="// public methods// /**
-Duplicate the MPDU payload.
-@param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="OZe7W5VrVgaA" isRoot="false" isAbstract="false" isQuery="false" name="duplicateMpduPayload" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="1weamIKXm0wx" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="eXkNB8JdLiXJ" value="" type="b4ob1ibWBqLq" name="mpdu" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Find Channel Settings.
-@param tx_station_id the ID of the transmitting station
-@param rx_station_id the ID of the destination station
-@return a list of Channel Settings" isSpecification="false" isLeaf="false" visibility="public" xmi.id="09RFjqmd0dax" isRoot="false" isAbstract="false" isQuery="false" name="findChannelSettings" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PU9PBOsdRjfL" type="LlOVV04Zpapx" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="T1b73JO0VdWP" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="MN7FXFtWPJl8" value="" type="WzilSttBcw0q" name="rx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="7Vk78K2bMeiN" value="" type="NBTpmTxZCmcb" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// public attribute accessor methods// // private attribute accessor methods// /**
-Sets the tonemask.
-@param p_tonemask the new value of mpTonemask
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="fYXdFW0u7v45" isRoot="false" isAbstract="false" isQuery="false" name="setTonemask" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="9KF3z9Ky5yWr" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="TmjfeN9KMrw5" value="" type="HSbuMHwp53nG" name="p_tonemask" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the tonemap of the current transmission.
-@return bool
-@param tx_station_id the ID of the transmitting station
-@param length the tonemap length in octets
-@param p_tonemap the tonemap" isSpecification="false" isLeaf="false" visibility="public" xmi.id="BALxxO2awYCA" isRoot="false" isAbstract="false" isQuery="false" name="setTonemap" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="FqMzqJwDn3by" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="2C4956EYqxBS" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="ILncAjhMt1Hp" value="" type="su73E4iG7Y8j" name="length" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="PJPKpbUslW1r" value="" type="fLpWgryb0030" name="p_tonemap" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the beacon period in ticks 25 MHz.
-@return bool
-@param frequency the power-line frequency" isSpecification="false" isLeaf="false" visibility="public" xmi.id="dGNRBZuSsh40" isRoot="false" isAbstract="false" isQuery="false" name="setBeaconPeriod" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="RTZrAFCJXPKU" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="OkMGld58vSSk" value="" type="mXu6MdkX4QlH" name="frequency" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets a tonemask value.
-@param carrier_index
-@return a boolean value indicating if the requested carrier is enabled or not" isSpecification="false" isLeaf="false" visibility="private" xmi.id="XLTP0YPPGkf1" isRoot="false" isAbstract="false" isQuery="false" name="getTonemask" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="YeSdbwSqlppZ" type="NBTpmTxZCmcb" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="Li9EAazAUZwt" value="" type="X118ilRkx2cY" name="carrier_index" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the beacon period in ticks 25 MHz.
-@return mBeaconPeriod" isSpecification="false" isLeaf="false" visibility="private" xmi.id="2s4IahHvPPAX" isRoot="false" isAbstract="false" isQuery="false" name="getBeaconPeriod" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6mnrpOpFpM6x" type="1XretJvqfug3" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// protected methods// All following protected methods could be declared as private methods,// but they are declared as protected methods to be unitarly tested.///**
-Gets the sigma factor.
-@param modulation the tonemap modulation
-@param snr_in_db the SNR value in dB
-@return the sigma factor" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="z7iRgeJqCCrj" isRoot="false" isAbstract="false" isQuery="false" name="getSigma" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="bGG7gbbED2qo" type="m2IzC9ii2UsR" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="VuoAPHpR7tih" value="" type="zypnSFDYKlG8" name="modulation" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="YzaxOiULnAlS" value="" type="mXu6MdkX4QlH" name="snr_in_db" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the PowerScale.
-@param modulation the tonemap modulation
-@return 1 / (PowerScale^2)" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="jfqqWYV4W41s" isRoot="false" isAbstract="false" isQuery="false" name="getPowerScale" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="yGeh3UH7E2y1" type="mXu6MdkX4QlH" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="mTCaex2QzINB" value="" type="zypnSFDYKlG8" name="modulation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the linear SNR.
-@param snr_in_db the SNR value in dB
-@return the linear SNR value" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="P3rRYhqHMh6s" isRoot="false" isAbstract="false" isQuery="false" name="getLinearSnr" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="OnED8IAhZOoD" type="m2IzC9ii2UsR" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="DbwjfvcQPoy1" value="" type="mXu6MdkX4QlH" name="snr_in_db" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Add noise.
-@param point the original point coordinates
-@param sigma the sigma factor
-@return the noise point coordinates" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="jyRgGnpfqf5M" isRoot="false" isAbstract="false" isQuery="false" name="addNoise" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="xOPBQDzMUe4V" type="448sjDF59poj" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="MvcjciboHWXv" value="" type="psrQPqT9L430" name="point" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="R7LqtHpaFHGV" value="" type="m2IzC9ii2UsR" name="sigma" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Compute the BER.
-@param codeA / codeB the 2 codes to compare
-@return the BER" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="XOXms3hJA084" isRoot="false" isAbstract="false" isQuery="false" name="computeBer" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="6LdINbJlNWwV" type="X118ilRkx2cY" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="HxcWCtzEv87e" value="" type="X118ilRkx2cY" name="codeA" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="LKjS9WAeshOk" value="" type="X118ilRkx2cY" name="codeB" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Compute the noise.
-@param pointA / pointB the 2 points coordinates
-@return the (distance)^2 between the 2 points" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="k41t27vK3XoF" isRoot="false" isAbstract="false" isQuery="false" name="computeNoise" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="o6CNS1YQPybn" type="1XretJvqfug3" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="OmSJsXxBrfey" value="" type="psrQPqT9L430" name="pointA" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="9oazTyhE0i53" value="" type="psrQPqT9L430" name="pointB" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Compute the FER.
-@param ber the BER of the current PB
-@param n the average number of bits coded per carrier on the current PB
-@param modulation the tonemap modulation
-@return the FER" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="o0LrX74wtWDl" isRoot="false" isAbstract="false" isQuery="false" name="computeFer" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Ba9dCD9GWmYt" type="mXu6MdkX4QlH" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="39xsoZovNOuo" value="" type="X118ilRkx2cY" name="ber" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="Lb2LH5O55hub" value="" type="1XretJvqfug3" name="n" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="pzViTiSVrNNd" value="" type="zypnSFDYKlG8" name="modulation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Compute the CRC error.
-@param fer the FER of the current PB
-@return the CRC error" isSpecification="false" isLeaf="false" visibility="protected" xmi.id="wAYHYS5t16DH" isRoot="false" isAbstract="false" isQuery="false" name="computeCrcError" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="NqckMYF8cQU3" type="NBTpmTxZCmcb" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="BZMFHFq6ELmf" value="" type="mXu6MdkX4QlH" name="fer" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class comment="class IChannel" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="MJNkMwYhFv8H" isRoot="false" isAbstract="false" name="IChannel" >
- <UML:Classifier.feature>
- <UML:Operation stereotype="constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="11oV4ziv3AYN" isRoot="false" isAbstract="false" isQuery="false" name="IChannel" />
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="YYbhCSZWluH5" isRoot="false" isAbstract="false" isQuery="false" name="~ IChannel" />
- <UML:Operation comment="// public methods// /**
-Compute PB measurement and NOISE.
-@param pb_measurement_array the PB measurement to fill in
-@param noise the PHY SCI message NOISE to fill in
-@param pb_header_array the PB header of each PB composing the MPDU
-@param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload
-@param tx_station_id the ID of the transmitting station
-@param rx_station_id the ID of the destination station
-@param current_tick the current Network Clock tick
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="qnn4itLhu9Bz" isRoot="false" isAbstract="true" isQuery="false" name="addPerturbation" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="R2Toy4bAcinn" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="1t1u1Cr63jC2" value="" type="WndGhsLWd8YJ" name="pb_measurement_array" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="bojFxHYw8Xo7" value="" type="8gZ2im9FZlVF" name="noise" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="2dxZMQmxFVCA" value="" type="hfBiNMiT2GVk" name="pb_header_array" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="SNKUdoCdP8Cl" value="" type="kj4rGrwwW6er" name="mpdu" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="nwmJ2RBUmTwN" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="F70eDCPj96Tc" value="" type="WzilSttBcw0q" name="rx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="zMlZIlP3fCNi" value="" type="oL4FZe2AHfNk" name="current_tick" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Add Channel Settings to the list.
-Called when a station is created => create its associated Channel Settings.
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="bWALx5iDCipN" isRoot="false" isAbstract="true" isQuery="false" name="addChannelSettings" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="wu3SgaK4Oumi" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="uF62LZeIuPrA" value="" type="WzilSttBcw0q" name="created_station_id" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Called when the PHY processor receives a preamble.
-@param tx_station_id the ID of the transmitting station
-@param current_tick the current Network Clock tick
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="AGEpQZVz3eK0" isRoot="false" isAbstract="true" isQuery="false" name="receivePre" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="R0q1QK4pLXdJ" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="j0Bti1GbEMdX" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="uFpmceuks6XJ" value="" type="oL4FZe2AHfNk" name="current_tick" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Called when the PHY processor receives a frame control.
-@param tx_station_id the ID of the transmitting station
-@param current_tick the current Network Clock tick
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="d3GgfZfOZoHG" isRoot="false" isAbstract="true" isQuery="false" name="receiveFc" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="ZCTAuFxo9yFo" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="pVp1pSYhfLTH" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="zM1sQY94ZPiE" value="" type="oL4FZe2AHfNk" name="current_tick" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// public methods// /**
-Duplicate the MPDU payload.
-@param mpdu a PHY SCI message MPDU that contains the complete received MPDU payload
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="PujNU9MyUc3R" isRoot="false" isAbstract="true" isQuery="false" name="duplicateMpduPayload" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="WXquRccqaRs0" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="xX2WY1uSiHwr" value="" type="b4ob1ibWBqLq" name="mpdu" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Find Channel Settings.
-@param tx_station_id the ID of the transmitting station
-@param rx_station_id the ID of the destination station
-@return a list of Channel Settings" isSpecification="false" isLeaf="false" visibility="public" xmi.id="hYiS0RDqSc09" isRoot="false" isAbstract="true" isQuery="false" name="findChannelSettings" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="jwn4SQO1apBT" type="LlOVV04Zpapx" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="nlp4OJFwDJNs" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="0gvOr8GYew0f" value="" type="WzilSttBcw0q" name="rx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="3rVG8q99X2VO" value="" type="NBTpmTxZCmcb" name="both_directions" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the tonemask.
-@param p_tonemask the new value of mpTonemask
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="qCYOB46xZJIN" isRoot="false" isAbstract="true" isQuery="false" name="setTonemask" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="26HA5Uyb1mUR" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="ThYihpYABMxg" value="" type="HSbuMHwp53nG" name="p_tonemask" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the tonemap of the current transmission.
-@return bool
-@param tx_station_id the ID of the transmitting station
-@param length the tonemap length in octets
-@param p_tonemap the tonemap" isSpecification="false" isLeaf="false" visibility="public" xmi.id="34qsc33QFZoO" isRoot="false" isAbstract="true" isQuery="false" name="setTonemap" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="M4HxV9vF4jHW" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="evLBEcYfH4Oz" value="" type="WzilSttBcw0q" name="tx_station_id" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="bA9ohvCLoWU0" value="" type="su73E4iG7Y8j" name="length" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="83gP52MxwT18" value="" type="fLpWgryb0030" name="p_tonemap" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the beacon period in ticks 25 MHz.
-@return bool
-@param frequency the power-line frequency" isSpecification="false" isLeaf="false" visibility="public" xmi.id="WhMdFTMpdTdI" isRoot="false" isAbstract="true" isQuery="false" name="setBeaconPeriod" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="7dXiTh9TnQdq" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="MoeBK8BS9rpF" value="" type="mXu6MdkX4QlH" name="frequency" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the beacon period in ticks 25 MHz.
-@return mBeaconPeriod" isSpecification="false" isLeaf="false" visibility="public" xmi.id="tCCndBu9sGk6" isRoot="false" isAbstract="true" isQuery="false" name="getBeaconPeriod" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="tZQuLuLiybdS" type="1XretJvqfug3" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Generalization isSpecification="false" child="FA5tCgQO5jOX" visibility="public" namespace="Logical View" xmi.id="KY1cn4F7HHaL" parent="MJNkMwYhFv8H" discriminator="" name="" />
- <UML:Package isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="uPECzXJFnTOn" isRoot="false" isAbstract="false" name="boost" >
- <UML:Namespace.ownedElement>
- <UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="uPECzXJFnTOn" xmi.id="IWPuXt3VypIz" isRoot="false" isAbstract="false" name="mt19937" />
- </UML:Namespace.ownedElement>
- </UML:Package>
- <UML:Class comment="ChannelPoint.h - Copyright buret
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the &quot;headings&quot; directory in uml to point to a directory
-where you have your heading files.
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-/usr/share/apps/umbrello/headings/heading.h
--->Code Generators searches for heading files based on the file extension
-i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header
-files, and for a file name ending in &quot;.java&quot; to include in all generated
-java code.
-If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always
-choose this file even if there are other files with the same extension in the
-directory. If you name the file something else, it must be the only one with that
-extension in the directory to guarantee that Code Generator will choose it.
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelPoint.h
-//**
-class ChannelPoint" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="VsbjUz1jzxim" isRoot="false" isAbstract="false" name="ChannelPoint" >
- <UML:Classifier.feature>
- <UML:Attribute comment="// public attributes// // abscissa" isSpecification="false" visibility="public" xmi.id="hRU6f1aVcHyc" type="ZJ5BrRm819Tz" name="I" />
- <UML:Attribute comment="// ordinate" isSpecification="false" visibility="public" xmi.id="IhZENLi13oFI" type="ZJ5BrRm819Tz" name="Q" />
- <UML:Operation stereotype="constructor" comment="// Constructors/Destructors// /**
-Empty Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="0zDce8bMX5QB" isRoot="false" isAbstract="false" isQuery="false" name="ChannelPoint" />
- <UML:Operation comment="Empty Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="kVbwfpKRKEVh" isRoot="false" isAbstract="false" isQuery="false" name="~ ChannelPoint" />
- <UML:Operation comment="// public methods// /**
-Operator =
-@param channel_point
-@return ChannelPoint &amp;" isSpecification="false" isLeaf="false" visibility="public" xmi.id="rGEtgzA0EaD8" isRoot="false" isAbstract="false" isQuery="false" name="operator =" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="kYfoHwINao51" type="5ToJ3zPrsGFF" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="tNQDbtuR98Ko" value="" type="psrQPqT9L430" name="channel_point" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Operator ==
-@param channel_point
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="5iOQmRPfmnrL" isRoot="false" isAbstract="false" isQuery="false" name="operator ==" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VCUGc67TdVOx" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="glmqs7cxaQFb" value="" type="psrQPqT9L430" name="channel_point" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Checks Channel Point values ranges,
-i.e. checks I and Q coordinates validity.
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="OeSEtgTyOpM9" isRoot="false" isAbstract="false" isQuery="false" name="checkValidity" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="PhdLIGl1oQp4" type="txbVRO36HpfQ" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" comment="Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="Vo4VsHm3o6I5" isRoot="false" isAbstract="false" isQuery="false" name="ChannelPoint" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="L6BXRyDTALMi" value="" type="ZJ5BrRm819Tz" name="i" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="pqBVtugPikua" value="" type="mXu6MdkX4QlH" name="q" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class comment="ChannelMapping.h - Copyright buret
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the &quot;headings&quot; directory in uml to point to a directory
-where you have your heading files.
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-/usr/share/apps/umbrello/headings/heading.h
--->Code Generators searches for heading files based on the file extension
-i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header
-files, and for a file name ending in &quot;.java&quot; to include in all generated
-java code.
-If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always
-choose this file even if there are other files with the same extension in the
-directory. If you name the file something else, it must be the only one with that
-extension in the directory to guarantee that Code Generator will choose it.
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelMapping.h
-//**
-class ChannelMapping" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="HjupUSYowhI4" isRoot="false" isAbstract="false" name="ChannelMapping" >
- <UML:Classifier.feature>
- <UML:Attribute comment="// private attributes//" isSpecification="false" visibility="private" xmi.id="ZSwkq19bojv2" type="VsbjUz1jzxim" name="mPoint" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="Ge7RT8Ckq5ZI" type="SRA7JvZo6AuO" name="mCode" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="V57RkPTHrQ2f" type="SRA7JvZo6AuO" name="mNbOfBitsArray" ownerScope="classifier" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="P9GDsAF7oLYH" type="ek5GEEjxefv1" name="mMappingArray" ownerScope="classifier" />
- <UML:Operation stereotype="constructor" comment="// Constructors/Destructors// /**
-Empty Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="4DctbcZ0lnEe" isRoot="false" isAbstract="false" isQuery="false" name="ChannelMapping" />
- <UML:Operation stereotype="constructor" comment="Constructors" isSpecification="false" isLeaf="false" visibility="public" xmi.id="xRjlmH0Ez1Tl" isRoot="false" isAbstract="false" isQuery="false" name="ChannelMapping" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="e9XQwl2sCldx" value="" type="X118ilRkx2cY" name="code" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="0eBxdci9ekFK" isRoot="false" isAbstract="false" isQuery="false" name="ChannelMapping" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="Th3OhfxLoUji" value="" type="psrQPqT9L430" name="point" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Empty Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="DjaPUCMSoVQR" isRoot="false" isAbstract="false" isQuery="false" name="~ ChannelMapping" />
- <UML:Operation comment="// public methods// /**
-Computes the code from the already set I and Q coordinates.
-@param modulation the used modulation
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="66Ykoo2IT5gA" isRoot="false" isAbstract="false" isQuery="false" name="computeCode" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="L6RvuUwPgOdG" type="X118ilRkx2cY" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="XIQ0O586ecbi" value="" type="zypnSFDYKlG8" name="modulation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Computes the I and Q coordinates from an already set code.
-@param modulation the used modulation
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="nowhba6bZwOz" isRoot="false" isAbstract="false" isQuery="false" name="computePoint" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Sik6D63angu6" type="psrQPqT9L430" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="9ZXTLlcs30rP" value="" type="zypnSFDYKlG8" name="modulation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the code.
-@param code the new value of mCode
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="jtReTM98izcO" isRoot="false" isAbstract="false" isQuery="false" name="setCode" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uf7g4ukP09Ks" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="qbzoZ0nxSxIq" value="" type="X118ilRkx2cY" name="code" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the code.
-@return mCode" isSpecification="false" isLeaf="false" visibility="public" xmi.id="huvhfiqMaF13" isRoot="false" isAbstract="false" isQuery="false" name="getCode" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="bEHHatW3bG9p" type="SRA7JvZo6AuO" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the coordinates.
-@param point the new value of mPoint
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="c8CI5oguNdiw" isRoot="false" isAbstract="false" isQuery="false" name="setPoint" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KAP7qHBixGOz" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="dTt5RCv64oni" value="" type="psrQPqT9L430" name="point" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the Channel Point.
-@return mPoint" isSpecification="false" isLeaf="false" visibility="public" xmi.id="Uc44r38RCKjF" isRoot="false" isAbstract="false" isQuery="false" name="getPoint" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="B7O9Gg2suH7S" type="5ToJ3zPrsGFF" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the I coordinate.
-@return mPoint.I" isSpecification="false" isLeaf="false" visibility="public" xmi.id="I0RSI9iPWrpV" isRoot="false" isAbstract="false" isQuery="false" name="getI" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="AbVmpcZ9mwHa" type="mXu6MdkX4QlH" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the Q coordinate.
-@param q mPoint.Q
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="fD4zThhtEUMY" isRoot="false" isAbstract="false" isQuery="false" name="setQ" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="EQI9hh8soWz2" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="5YMFnEF4FhWX" value="" type="mXu6MdkX4QlH" name="q" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the Q coordinate.
-@return mPoint.Q" isSpecification="false" isLeaf="false" visibility="public" xmi.id="qEuK4jnjvsgO" isRoot="false" isAbstract="false" isQuery="false" name="getQ" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="Azs2F0UPZ09P" type="mXu6MdkX4QlH" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Retrieve the integer (except for QAM8) I and Q coordinates from the already set I and Q coordinates.
-@param modulation the used modulation
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="o3dYjumm81LP" isRoot="false" isAbstract="false" isQuery="false" name="retrievePoint" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="cgYNdnxrEGyv" type="448sjDF59poj" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="8HAG5wPTP3yk" value="" type="zypnSFDYKlG8" name="modulation" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// public attribute accessor methods// // private attribute accessor methods// /**
-Sets the code.
-@param modulation the used modulation
-@param mpdu_payload_length the length of the MPDU payload
-@param p_mpdu_payload pointer to the MPDU payload
-@param mpdu_index indicates the current index of the MPDU payload (in bits)
-@return bool (and update mpdu_index)" isSpecification="false" isLeaf="false" visibility="public" xmi.id="rCiZ34ts7WOo" isRoot="false" isAbstract="false" isQuery="false" name="setCode" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="v6ljakjkicmx" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="Q9aXAtuGA3WD" value="" type="zypnSFDYKlG8" name="modulation" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="zwhMxd6npmKq" value="" type="su73E4iG7Y8j" name="mpdu_payload_length" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="qDgvh5j5EHcM" value="" type="fLpWgryb0030" name="p_mpdu_payload" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="pvkef4STH9Ow" value="" type="BVdJY7XV1Crz" name="mpdu_index" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the I coordinate.
-@param i the new value of mPoint.I
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="no29iM1Z9CGC" isRoot="false" isAbstract="false" isQuery="false" name="setI" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="aEK9EUYpA5Al" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="KSVqaKu0ZipJ" value="" type="mXu6MdkX4QlH" name="i" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- <UML:Class comment="ChannelSettings.h - Copyright buret
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the &quot;headings&quot; directory in uml to point to a directory
-where you have your heading files.
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-/usr/share/apps/umbrello/headings/heading.h
--->Code Generators searches for heading files based on the file extension
-i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header
-files, and for a file name ending in &quot;.java&quot; to include in all generated
-java code.
-If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always
-choose this file even if there are other files with the same extension in the
-directory. If you name the file something else, it must be the only one with that
-extension in the directory to guarantee that Code Generator will choose it.
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/channel/inc/ChannelSettings.h
-//**
-class ChannelSettings" isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="PGF0sP6Kgb0l" isRoot="false" isAbstract="false" name="ChannelSettings" >
- <UML:Classifier.feature>
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="YzQ8Jmmx2Rx1" initialValue="0" type="OMC8n0NgoyNC" name="mPreDetectionDate" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="C8LZTmT1jr71" initialValue="0" type="OMC8n0NgoyNC" name="mFcReceptionDate" />
- <UML:Attribute comment="// private attributes//" isSpecification="false" visibility="private" xmi.id="ECT43sTE9tu7" type="txbVRO36HpfQ" name="mIsConfigured" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="8uij0qPBhzDF" type="ZJ5BrRm819Tz" name="mSnrArray" />
- <UML:Attribute isSpecification="false" visibility="private" xmi.id="dsqJeeDqqfut" type="kbTW3DFGwneP" name="mTonemapArray" />
- <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="N1iX9W91mjbs" isRoot="false" isAbstract="false" isQuery="false" name="setSnr" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="eTOzncRBd8im" value="" type="QCc0kys9xMnl" name="snr" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation stereotype="constructor" comment="// Constructors/Destructors// /**
-Empty Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="cnVd2iEDTGap" isRoot="false" isAbstract="false" isQuery="false" name="ChannelSettings" />
- <UML:Operation comment="Empty Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="dccFV5HKv9Wt" isRoot="false" isAbstract="false" isQuery="false" name="~ ChannelSettings" />
- <UML:Operation comment="// public methods// // public attribute accessor methods// // private attribute accessor methods// /**
-Sets the PRE detection date.
-@param date tick at which the preamble has been received
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="CRgGs5fVq86t" isRoot="false" isAbstract="false" isQuery="false" name="setPreDetectionDate" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="s7c6LY1GemxC" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="d5bmZVy09CqC" value="" type="oL4FZe2AHfNk" name="date" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the FC reception date.
-@param date tick at which the frame control has been received
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="rJ3xOwjhyyGc" isRoot="false" isAbstract="false" isQuery="false" name="setFcReceptionDate" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="VhwBJg8tvS27" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="1OremcKPfw9E" value="" type="oL4FZe2AHfNk" name="date" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// private methods// /**
-Initializes the Channel Settings class attributes." isSpecification="false" isLeaf="false" visibility="private" xmi.id="P5CYI2l7Km5i" isRoot="false" isAbstract="false" isQuery="false" name="initAttributes" />
- <UML:Operation comment="Gets the PRE detection date.
-@return mPreDetectionDate tick at which the preamble has been received" isSpecification="false" isLeaf="false" visibility="private" xmi.id="goPeldGm16Ol" isRoot="false" isAbstract="false" isQuery="false" name="getPreDetectionDate" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="uZu5e4qWCRdV" type="oL4FZe2AHfNk" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the FC reception date.
-@return mFcReceptionDate tick at which the frame control has been received" isSpecification="false" isLeaf="false" visibility="private" xmi.id="iiALeHZ1Njaf" isRoot="false" isAbstract="false" isQuery="false" name="getFcReceptionDate" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="zcmcNjoqQj1h" type="oL4FZe2AHfNk" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// public methods// /**
-Gets the first symbol start date (in ticks).
-@return tick at which the first symbol has started" isSpecification="false" isLeaf="false" visibility="public" xmi.id="dWaTBSKgoPJ3" isRoot="false" isAbstract="false" isQuery="false" name="getFirstSymbolStartDate" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="N9aGZbOUAGXm" type="oL4FZe2AHfNk" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the tonemap modulation.
-@param carrier the current carrier number
-@return the tonemap modulation" isSpecification="false" isLeaf="false" visibility="public" xmi.id="M3QGTU7iw8dM" isRoot="false" isAbstract="false" isQuery="false" name="getModulation" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="LLIVmt0kUkKp" type="zypnSFDYKlG8" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="MmOSniAOCkrL" value="" type="1XretJvqfug3" name="carrier" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the SNR in dB.
-@param interval the current interval number
-@param carrier the current carrier number
-@return the SNR in dB" isSpecification="false" isLeaf="false" visibility="public" xmi.id="AB0zYJ2vLR9m" isRoot="false" isAbstract="false" isQuery="false" name="getSnr" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="U6fsnga9n8PM" type="mXu6MdkX4QlH" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="tEUpM8CisaAg" value="" type="oL4FZe2AHfNk" name="beacon_period" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="GI4R2umB3mAc" value="" type="oL4FZe2AHfNk" name="symbol_start_date" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="4AXPZg9TueIH" value="" type="1XretJvqfug3" name="carrier" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="// public attribute accessor methods// // private attribute accessor methods// /**
-Gets if the channel has been configured.
-@return mIsConfigured" isSpecification="false" isLeaf="false" visibility="public" xmi.id="kSxc26GHOJiP" isRoot="false" isAbstract="false" isQuery="false" name="isConfigured" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="hlqp2LbLhsoR" type="NBTpmTxZCmcb" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the SNR.
-@param snr_value SNR value in dB
-@return bool" isSpecification="false" isLeaf="false" visibility="public" xmi.id="BSaEFiqHsNgS" isRoot="false" isAbstract="false" isQuery="false" name="setSnr" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="joBDZT01YfrL" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="3pvwRBD9e8ke" value="" type="mXu6MdkX4QlH" name="snr_value" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets the tonemap of the current transmission.
-@return bool
-@param tonemap_array the new value of mTonemapArray" isSpecification="false" isLeaf="false" visibility="public" xmi.id="dzYH8IvKHpvW" isRoot="false" isAbstract="false" isQuery="false" name="setTonemap" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="JPU6YuRFdF5f" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="OvxQVcfl5Duw" value="" type="zypnSFDYKlG8" name="tonemap_array[]" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Sets if the channel is configured.
-@param is_configured the new value of mIsConfigured
-@return bool" isSpecification="false" isLeaf="false" visibility="private" xmi.id="w6NMjCexlRoY" isRoot="false" isAbstract="false" isQuery="false" name="setIsConfigured" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="beyIWmjGbtR8" type="txbVRO36HpfQ" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="0MvEx1tWQRx1" value="" type="NBTpmTxZCmcb" name="is_configured" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- <UML:Operation comment="Gets the time interval.
-@param symbol_start_date the current symbol start date in ticks
-@return the interval number" isSpecification="false" isLeaf="false" visibility="private" xmi.id="Z1yyRvzefObL" isRoot="false" isAbstract="false" isQuery="false" name="getInterval" >
- <UML:BehavioralFeature.parameter>
- <UML:Parameter kind="return" xmi.id="KS7s5wEPMgTu" type="1XretJvqfug3" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="4QwoboIxLg3I" value="" type="oL4FZe2AHfNk" name="beacon_period" />
- <UML:Parameter isSpecification="false" visibility="private" xmi.id="rgELEMnmNlko" value="" type="oL4FZe2AHfNk" name="symbol_start_date" />
- </UML:BehavioralFeature.parameter>
- </UML:Operation>
- </UML:Classifier.feature>
- </UML:Class>
- </UML:Namespace.ownedElement>
- <XMI.extension xmi.extender="umbrello" >
- <diagrams>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="894" snapy="10" showatts="1" xmi.id="gixkluDaZdUp" documentation="" type="1" showops="1" showpackage="1" name="class diagram channel computer" localid="" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="912" >
- <widgets>
- <classwidget usesdiagramfillcolor="0" width="314" showattsigs="601" x="125" fillcolor="#ffffc0" y="350" showopsigs="600" linewidth="none" height="558" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="FA5tCgQO5jOX" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
- <classwidget usesdiagramfillcolor="0" width="182" showattsigs="601" x="184" fillcolor="#ffffc0" y="27" showopsigs="600" linewidth="none" height="261" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="MJNkMwYhFv8H" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,50,1,0,0,0,0" linecolor="#ff0000" />
- </widgets>
- <messages/>
- <associations>
- <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" linewidth="none" widgetbid="MJNkMwYhFv8H" widgetaid="FA5tCgQO5jOX" xmi.id="guI259xtgWxy" linecolor="none" >
- <linepath>
- <startpoint startx="218" starty="350" />
- <endpoint endx="218" endy="288" />
- </linepath>
- </assocwidget>
- </associations>
- </diagram>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="910" snapy="10" showatts="1" xmi.id="qdI3cPCM6cK0" documentation="" type="3" showops="1" showpackage="1" name="sequence diagram global" localid="7JggHOMZzMnz" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="824" >
- <widgets>
- <objectwidget usesdiagramfillcolor="0" width="143" x="337" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ka695HsLyRqa" decon="0" localid="apCSEDC2oS6O" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="111" x="73" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="rGkvr2wbb0ig" decon="0" localid="Ia2G2qocfz2t" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="103" x="696" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ACuye0MTG4P7" decon="0" localid="7JggHOMZzMnz" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <notewidget usesdiagramfillcolor="1" width="188" x="209" fillcolor="none" y="575" linewidth="none" height="50" usefillcolor="1" isinstance="0" xmi.id="IStaETkdi0j5" showstereotype="1" text="pb_measurement is empty" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="188" x="530" fillcolor="none" y="576" linewidth="none" height="50" usefillcolor="1" isinstance="0" xmi.id="srWZhXyIrLIM" showstereotype="1" text="pb_measurement is filled in" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="233" x="425" fillcolor="none" y="146" linewidth="none" height="71" usefillcolor="1" isinstance="0" xmi.id="tM9tcbkDpExS" showstereotype="1" text="Tonemask is described on 1155 carriers. It is sent once at program start." usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="300" x="425" fillcolor="none" y="430" linewidth="none" height="97" usefillcolor="1" isinstance="0" xmi.id="NCpDY8ZPSiH5" showstereotype="1" text="Tonemap is described on 1155 carriers. It is sent before each TX using the TM.
-For TX in ROBO mode, Maximus should know which modulation to applied." usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="191" x="532" fillcolor="none" y="671" linewidth="none" height="50" usefillcolor="1" isinstance="0" xmi.id="vgNaXDp4Y1sl" showstereotype="1" text="with time noise and frequency noise" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </widgets>
- <messages>
- <messagewidget usesdiagramfillcolor="1" width="278" x="129" fillcolor="none" y="173" operation="phy msg (TONEMASK)" linewidth="none" widgetbid="apCSEDC2oS6O" height="8" usefillcolor="1" seqnum="1" textid="Z3so7HtCYasq" widgetaid="Ia2G2qocfz2t" isinstance="0" xmi.id="AcZqbchlobhR" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="165" x="147" fillcolor="none" y="151" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Z3so7HtCYasq" text="1: phy msg (TONEMASK)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="278" x="129" fillcolor="none" y="274" operation="phy msg (PREAMBLE)" linewidth="none" widgetbid="apCSEDC2oS6O" height="8" usefillcolor="1" seqnum="2" textid="D5opmFOp8CuN" widgetaid="Ia2G2qocfz2t" isinstance="0" xmi.id="DPvXBuinSYM2" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="161" x="186" fillcolor="none" y="252" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="D5opmFOp8CuN" showstereotype="1" text="2: phy msg (PREAMBLE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="337" x="409" fillcolor="none" y="307" operation="phy msg (PREAMBLE)" linewidth="none" widgetbid="7JggHOMZzMnz" height="8" usefillcolor="1" seqnum="2.1" textid="QS5qyPsBUhyG" widgetaid="apCSEDC2oS6O" isinstance="0" xmi.id="67uezkcC7YkI" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="173" x="414" fillcolor="none" y="285" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="QS5qyPsBUhyG" showstereotype="1" text="2.1: phy msg (PREAMBLE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="278" x="129" fillcolor="none" y="355" operation="phy msg (FC_AV_ONLY_MODE)" linewidth="none" widgetbid="apCSEDC2oS6O" height="8" usefillcolor="1" seqnum="3" textid="Oj3B4SmNHDpb" widgetaid="Ia2G2qocfz2t" isinstance="0" xmi.id="JXLvabAdZ2of" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="221" x="147" fillcolor="none" y="333" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Oj3B4SmNHDpb" showstereotype="1" text="3: phy msg (FC_AV_ONLY_MODE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="337" x="409" fillcolor="none" y="396" operation="phy msg (FC_AV_ONLY_MODE)" linewidth="none" widgetbid="7JggHOMZzMnz" height="8" usefillcolor="1" seqnum="3.1" textid="JPNrQBWmuXvy" widgetaid="apCSEDC2oS6O" isinstance="0" xmi.id="ME7N0gMKEiFm" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="233" x="414" fillcolor="none" y="374" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="JPNrQBWmuXvy" showstereotype="1" text="3.1: phy msg (FC_AV_ONLY_MODE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="278" x="129" fillcolor="none" y="563" operation="phy msg (MPDU_PAYLOAD)" linewidth="none" widgetbid="apCSEDC2oS6O" height="8" usefillcolor="1" seqnum="5" textid="e9HR1oM0j2Jy" widgetaid="Ia2G2qocfz2t" isinstance="0" xmi.id="MdygpgtayGxn" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="199" x="147" fillcolor="none" y="541" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="e9HR1oM0j2Jy" text="5: phy msg (MPDU_PAYLOAD)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="337" x="409" fillcolor="none" y="563" operation="phy msg (MPDU_PAYLOAD)" linewidth="none" widgetbid="7JggHOMZzMnz" height="8" usefillcolor="1" seqnum="5.1" textid="LbiJre4UlLvm" widgetaid="apCSEDC2oS6O" isinstance="0" xmi.id="vOm8kjk4Lgi8" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="211" x="414" fillcolor="none" y="541" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="LbiJre4UlLvm" text="5.1: phy msg (MPDU_PAYLOAD)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="337" x="409" fillcolor="none" y="657" operation="phy msg (NOISE)" linewidth="none" widgetbid="7JggHOMZzMnz" height="8" usefillcolor="1" seqnum="5.2" textid="JyEcfwiyVPFL" widgetaid="apCSEDC2oS6O" isinstance="0" xmi.id="7FkqF2p8QbGA" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="145" x="461" fillcolor="none" y="635" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="JyEcfwiyVPFL" text="5.2: phy msg (NOISE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="278" x="129" fillcolor="none" y="475" operation="phy msg (TONEMAP)" linewidth="none" widgetbid="apCSEDC2oS6O" height="8" usefillcolor="1" seqnum="4" textid="LOJl0YuHU6t9" widgetaid="Ia2G2qocfz2t" isinstance="0" xmi.id="3JpoeiYlxJbB" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="156" x="134" fillcolor="none" y="453" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="LOJl0YuHU6t9" text="4: phy msg (TONEMAP)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- </messages>
- <associations/>
- </diagram>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1458" snapy="10" showatts="1" xmi.id="X42GTN9PoAyH" documentation="" type="3" showops="1" showpackage="1" name="sequence diagram maximus" localid="iG3Nps5Lu2Mn" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1641" >
- <widgets>
- <objectwidget usesdiagramfillcolor="0" width="111" x="19" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="rGkvr2wbb0ig" decon="0" localid="3DAVyBoln7OB" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="87" x="213" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="t1tc2bTZdTo7" decon="0" localid="pvUd5Su7d2cZ" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="114" x="554" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="EPI1UgANf3xg" decon="0" localid="dODGr1LexpH0" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="142" x="699" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="FA5tCgQO5jOX" decon="0" localid="NYu3arhDDuR4" multipleinstance="0" drawasactor="0" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="103" x="1139" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ACuye0MTG4P7" decon="0" localid="unhpayno6tfH" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="104" x="387" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="y0Zndhh8NjGq" decon="0" localid="niFReFLgyuZm" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="57" x="1271" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ouQgLFbCZBH6" decon="0" localid="asRxXJUOaOs0" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <notewidget usesdiagramfillcolor="1" width="234" x="582" fillcolor="none" y="344" linewidth="none" height="71" usefillcolor="1" isinstance="0" xmi.id="h94z0oip6zcC" showstereotype="1" text="if already set by another station, return an error if a different tonemask is received" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <objectwidget usesdiagramfillcolor="0" width="127" x="916" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="PGF0sP6Kgb0l" decon="0" localid="iG3Nps5Lu2Mn" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <notewidget usesdiagramfillcolor="1" width="233" x="45" fillcolor="none" y="138" linewidth="none" height="71" usefillcolor="1" isinstance="0" xmi.id="XNhoyoP1qY7e" showstereotype="1" text="Tonemask is described on 1155 carriers. It is sent once at program start." usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="300" x="20" fillcolor="none" y="939" linewidth="none" height="97" usefillcolor="1" isinstance="0" xmi.id="hqoOxdLglCpc" showstereotype="1" text="Tonemap is described on 1155 carriers. It is sent before each TX using the TM.
-For TX in ROBO mode, Maximus should know which modulation to applied." usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </widgets>
- <messages>
- <messagewidget usesdiagramfillcolor="1" width="180" x="75" fillcolor="none" y="238" operation="PHY msg (TONEMASK)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="1" textid="qsL3mm5gXkV8" widgetaid="3DAVyBoln7OB" isinstance="0" xmi.id="X5fao37AazDA" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="167" x="84" fillcolor="none" y="216" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="qsL3mm5gXkV8" text="1: PHY msg (TONEMASK)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="180" x="75" fillcolor="none" y="399" operation="PHY msg (PREAMBLE)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="2" textid="V0qCm3Vi3FWN" widgetaid="3DAVyBoln7OB" isinstance="0" xmi.id="rrJ9iTwEnK49" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="163" x="80" fillcolor="none" y="377" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="V0qCm3Vi3FWN" text="2: PHY msg (PREAMBLE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="180" x="75" fillcolor="none" y="1066" operation="PHY msg (TONEMAP)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="4" textid="ftRXfy3geebu" widgetaid="3DAVyBoln7OB" isinstance="0" xmi.id="L3omNKIOraEr" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="163" x="88" fillcolor="none" y="1044" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="ftRXfy3geebu" text="4: PHY msg (TONEMAP)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="181" x="257" fillcolor="none" y="265" operation="dispatch msg ()" linewidth="none" widgetbid="niFReFLgyuZm" height="8" usefillcolor="1" seqnum="1.1" textid="vCCIjlQ6bD0S" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="b208fWbLMhyw" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="136" x="298" fillcolor="none" y="243" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="vCCIjlQ6bD0S" text="1.1: dispatch msg ()" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="181" x="257" fillcolor="none" y="440" operation="dispatch msg ()" linewidth="none" widgetbid="niFReFLgyuZm" height="8" usefillcolor="1" seqnum="2.1" textid="XFjtxfoqsy9Z" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="aTS6yi3Xk1eQ" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="136" x="294" fillcolor="none" y="418" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="XFjtxfoqsy9Z" showstereotype="1" text="2.1: dispatch msg ()" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="181" x="257" fillcolor="none" y="678" operation="dispatch msg()" linewidth="none" widgetbid="niFReFLgyuZm" height="8" usefillcolor="1" seqnum="3.1" textid="qUaZVCx0SgsN" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="jZfIndiL78R3" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="132" x="262" fillcolor="none" y="656" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="qUaZVCx0SgsN" text="3.1: dispatch msg()" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="170" x="440" fillcolor="none" y="302" operation="receive tonemask (PHY SCI msg)" linewidth="none" widgetbid="dODGr1LexpH0" height="8" usefillcolor="1" seqnum="1.2" textid="2Iy7RQAFsjoO" widgetaid="niFReFLgyuZm" isinstance="0" xmi.id="MgDCcKlJsPcd" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="250" x="445" fillcolor="none" y="280" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="2Iy7RQAFsjoO" text="1.2: receive tonemask (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="170" x="440" fillcolor="none" y="464" operation="receive preamble (PHY SCI msg)" linewidth="none" widgetbid="dODGr1LexpH0" height="8" usefillcolor="1" seqnum="2.2" textid="Cho46Of7eeE3" widgetaid="niFReFLgyuZm" isinstance="0" xmi.id="vjMLQEgkuswU" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="244" x="445" fillcolor="none" y="442" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Cho46Of7eeE3" text="2.2: receive preamble (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="170" x="440" fillcolor="none" y="1140" operation="receive tonemap (PHY SCI msg)" linewidth="none" widgetbid="dODGr1LexpH0" height="8" usefillcolor="1" seqnum="4.2" textid="bMkg1Os4QFLK" widgetaid="niFReFLgyuZm" isinstance="0" xmi.id="DtzvmrpE2W04" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="243" x="445" fillcolor="none" y="1118" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="bMkg1Os4QFLK" text="4.2: receive tonemap (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="353" x="257" fillcolor="none" y="534" operation="send msg (PHY SCI msg)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="2.5" textid="5zkAU00p74Ai" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="VhUvuoGCBrRN" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="195" x="281" fillcolor="none" y="512" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="5zkAU00p74Ai" text="2.5: send msg (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="932" x="257" fillcolor="none" y="579" operation="PHY msg (PREAMBLE)" linewidth="none" widgetbid="unhpayno6tfH" height="8" usefillcolor="1" seqnum="2.6" textid="JSR9XTHDZt45" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="HCOTNDukIrSR" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="175" x="267" fillcolor="none" y="557" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="JSR9XTHDZt45" showstereotype="1" text="2.6: PHY msg (PREAMBLE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="180" x="75" fillcolor="none" y="646" operation="PHY msg (FC_AV_ONLY_MODE)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="3" textid="Zhw6ADKj5Mog" widgetaid="3DAVyBoln7OB" isinstance="0" xmi.id="cNozaghrV7Ip" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="223" x="80" fillcolor="none" y="624" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Zhw6ADKj5Mog" showstereotype="1" text="3: PHY msg (FC_AV_ONLY_MODE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="181" x="257" fillcolor="none" y="1106" operation="dispatch msg ()" linewidth="none" widgetbid="niFReFLgyuZm" height="8" usefillcolor="1" seqnum="4.1" textid="w2PIwyZ3QrjY" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="wVhd8YYauIE1" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="136" x="262" fillcolor="none" y="1084" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="w2PIwyZ3QrjY" text="4.1: dispatch msg ()" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="170" x="440" fillcolor="none" y="708" operation="receive FC (PHY SCI msg)" linewidth="none" widgetbid="dODGr1LexpH0" height="8" usefillcolor="1" seqnum="3.2" textid="t41nKGpFICXC" widgetaid="niFReFLgyuZm" isinstance="0" xmi.id="t8guysgvLNWT" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="198" x="445" fillcolor="none" y="686" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="t41nKGpFICXC" showstereotype="1" text="3.2: receive FC (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="353" x="257" fillcolor="none" y="807" operation="send msg (PHY SCI msg)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="3.5" textid="H8EMrtQSCMPt" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="gA4wMZ8UbL3U" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="195" x="281" fillcolor="none" y="785" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="H8EMrtQSCMPt" text="3.5: send msg (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="932" x="257" fillcolor="none" y="854" operation="PHY msg (FC_AV_ONLY_MODE)" linewidth="none" widgetbid="unhpayno6tfH" height="8" usefillcolor="1" seqnum="3.6" textid="dwoCHpgWvvtm" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="noTHEo4uz6oJ" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="235" x="268" fillcolor="none" y="832" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="dwoCHpgWvvtm" showstereotype="1" text="3.6: PHY msg (FC_AV_ONLY_MODE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="180" x="75" fillcolor="none" y="1254" operation="PHY msg (MPDU_PAYLOAD)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="5" textid="8ZTvFzq8qat5" widgetaid="3DAVyBoln7OB" isinstance="0" xmi.id="Jcc5gU2lIMMC" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="201" x="80" fillcolor="none" y="1232" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="8ZTvFzq8qat5" showstereotype="1" text="5: PHY msg (MPDU_PAYLOAD)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="181" x="257" fillcolor="none" y="1288" operation="dispatch msg ()" linewidth="none" widgetbid="niFReFLgyuZm" height="8" usefillcolor="1" seqnum="5.1" textid="m532RPEXyfSC" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="mshMg3kzdK2I" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="136" x="262" fillcolor="none" y="1266" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="m532RPEXyfSC" text="5.1: dispatch msg ()" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="170" x="440" fillcolor="none" y="1322" operation="receive MPDU (PHY SCI msg)" linewidth="none" widgetbid="dODGr1LexpH0" height="8" usefillcolor="1" seqnum="5.2" textid="Fhet2hBmkEp9" widgetaid="niFReFLgyuZm" isinstance="0" xmi.id="fIITsBZc1Ezh" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="221" x="445" fillcolor="none" y="1300" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Fhet2hBmkEp9" text="5.2: receive MPDU (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="353" x="257" fillcolor="none" y="1453" operation="send msg (PHY SCI msg)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="5.4" textid="o7lnxzqaHK2w" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="c6xYdiuSYlEe" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="195" x="262" fillcolor="none" y="1431" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="o7lnxzqaHK2w" text="5.4: send msg (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="932" x="257" fillcolor="none" y="1511" operation="PHY msg (MPDU_PAYLOAD)" linewidth="none" widgetbid="unhpayno6tfH" height="8" usefillcolor="1" seqnum="5.5" textid="hjoGU2uH7d22" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="LOpngd6Ij1oM" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="213" x="262" fillcolor="none" y="1489" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="hjoGU2uH7d22" text="5.5: PHY msg (MPDU_PAYLOAD)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="353" x="257" fillcolor="none" y="1566" operation="send msg (PHY SCI msg)" linewidth="none" widgetbid="pvUd5Su7d2cZ" height="8" usefillcolor="1" seqnum="5.6" textid="QWcGEsXpz2YD" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="Pf6r4QIR7pB6" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="203" x="262" fillcolor="none" y="1544" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="QWcGEsXpz2YD" text="5.6: send msg (PHY SCI msg)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="932" x="257" fillcolor="none" y="1609" operation="PHY msg (NOISE)" linewidth="none" widgetbid="unhpayno6tfH" height="8" usefillcolor="1" seqnum="5.7" textid="mdfrSqxrKZ5Y" widgetaid="pvUd5Su7d2cZ" isinstance="0" xmi.id="GRMb9VGWBMND" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="155" x="262" fillcolor="none" y="1587" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="mdfrSqxrKZ5Y" text="5.7: PHY msg (NOISE)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="157" x="612" fillcolor="none" y="1171" operation="BALxxO2awYCA" linewidth="none" widgetbid="NYu3arhDDuR4" height="8" usefillcolor="1" seqnum="4.3" textid="FsdpD1lAYuX2" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="6tGl6PP1piEa" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="837" x="617" fillcolor="none" y="1149" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="FsdpD1lAYuX2" text="4.3: setTonemap(tx_station_id : const Sci_Msg_Station_Id, length : const unsigned long, p_tonemap : const unsigned char*) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="157" x="612" fillcolor="none" y="332" operation="fYXdFW0u7v45" linewidth="none" widgetbid="NYu3arhDDuR4" height="8" usefillcolor="1" seqnum="1.3" textid="oyH4FIsmjMnd" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="0ea9mnvPOz8D" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="352" x="617" fillcolor="none" y="310" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="oyH4FIsmjMnd" text="1.3: setTonemask(p_tonemask : const uint8_t*) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="157" x="612" fillcolor="none" y="494" operation="qrweJyXfPgQH" linewidth="none" widgetbid="NYu3arhDDuR4" height="8" usefillcolor="1" seqnum="2.3" textid="FmRal8d0mKsL" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="q7x8JGpaGYcr" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="665" x="617" fillcolor="none" y="472" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="FmRal8d0mKsL" showstereotype="1" text="2.3: receivePre(tx_station_id : const Sci_Msg_Station_Id, current_tick : const Network_Clock_Tick) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="157" x="612" fillcolor="none" y="745" operation="OS6l8U35hW6C" linewidth="none" widgetbid="NYu3arhDDuR4" height="8" usefillcolor="1" seqnum="3.3" textid="9WbSBVHWt1w6" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="VgNj3rHVA6es" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="658" x="617" fillcolor="none" y="723" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="9WbSBVHWt1w6" showstereotype="1" text="3.3: receiveFc(tx_station_id : const Sci_Msg_Station_Id, current_tick : const Network_Clock_Tick) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="207" x="771" fillcolor="none" y="785" operation="rJ3xOwjhyyGc" linewidth="none" widgetbid="iG3Nps5Lu2Mn" height="8" usefillcolor="1" seqnum="3.4" textid="fEktuJp4hoN5" widgetaid="NYu3arhDDuR4" isinstance="0" xmi.id="C9q4zpJcLPes" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="417" x="776" fillcolor="none" y="763" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="fEktuJp4hoN5" showstereotype="1" text="3.4: setFcReceptionDate(date : const Network_Clock_Tick) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="207" x="771" fillcolor="none" y="515" operation="CRgGs5fVq86t" linewidth="none" widgetbid="iG3Nps5Lu2Mn" height="8" usefillcolor="1" seqnum="2.4" textid="hzPrvJoRRWSV" widgetaid="NYu3arhDDuR4" isinstance="0" xmi.id="m59xDlN772zf" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="423" x="776" fillcolor="none" y="493" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="hzPrvJoRRWSV" showstereotype="1" text="2.4: setPreDetectionDate(date : const Network_Clock_Tick) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="318" x="980" fillcolor="none" y="162" operation="N1iX9W91mjbs" linewidth="none" widgetbid="iG3Nps5Lu2Mn" height="8" usefillcolor="1" seqnum="0" textid="69FbMxXh4qus" widgetaid="asRxXJUOaOs0" isinstance="0" xmi.id="o91EgffKrvqF" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="423" x="985" fillcolor="none" y="140" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="69FbMxXh4qus" text="0: setSnr(snr : const float[interval_nb][PHY_CARRIER_MAX_NB])" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="157" x="612" fillcolor="none" y="1362" operation="addPerturbation()" linewidth="none" widgetbid="NYu3arhDDuR4" height="8" usefillcolor="1" seqnum="5.3" textid="ZwsIbgkqlGwo" widgetaid="dODGr1LexpH0" isinstance="0" xmi.id="mkSrDPCjpToZ" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="149" x="617" fillcolor="none" y="1340" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="ZwsIbgkqlGwo" showstereotype="1" text="5.3: addPerturbation()" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="207" x="771" fillcolor="none" y="1209" operation="dzYH8IvKHpvW" linewidth="none" widgetbid="iG3Nps5Lu2Mn" height="8" usefillcolor="1" seqnum="" textid="brWHhG3EgPgP" widgetaid="NYu3arhDDuR4" isinstance="0" xmi.id="VBUTLWqLNO3T" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="390" x="776" fillcolor="none" y="1187" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="brWHhG3EgPgP" showstereotype="1" text=": setTonemap(tonemap_array[] : const Channel_Mod) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- </messages>
- <associations/>
- </diagram>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1882" snapy="10" showatts="1" xmi.id="wHQW0owEmBOE" documentation="" type="3" showops="1" showpackage="1" name="sequence diagram channel" localid="g4uHNUZyzX5B" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1271" >
- <widgets>
- <objectwidget usesdiagramfillcolor="0" width="114" x="25" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="EPI1UgANf3xg" decon="0" localid="JSGw5HTuusup" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="138" x="251" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="FA5tCgQO5jOX" decon="0" localid="u4Vw6zChn0FB" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="127" x="544" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="PGF0sP6Kgb0l" decon="0" localid="VcHEp6yBGZmE" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <notewidget usesdiagramfillcolor="1" width="167" x="1063" fillcolor="none" y="847" linewidth="none" height="50" usefillcolor="1" isinstance="0" xmi.id="HOSEWhecreBb" showstereotype="1" text="for P2 coordinates" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="151" x="961" fillcolor="none" y="763" linewidth="none" height="76" usefillcolor="1" isinstance="0" xmi.id="fokHPWTHSe6Q" showstereotype="1" text="get the P0 coordinates from the code C0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="165" x="1386" fillcolor="none" y="871" linewidth="none" height="77" usefillcolor="1" isinstance="0" xmi.id="4xzip5SwM7Ck" showstereotype="1" text="get the code C2 from the P2 coordinates" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="275" x="28" fillcolor="none" y="308" linewidth="none" height="60" usefillcolor="1" isinstance="0" xmi.id="r571dUJXBSUA" showstereotype="1" text="Do actions 1 to 13 for each carrier of each symbol" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="135" x="172" fillcolor="none" y="1153" linewidth="none" height="81" usefillcolor="1" isinstance="0" xmi.id="L6D0iIcPJ49O" showstereotype="1" text="Do actions 14 and 15 at the end of each PB" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <objectwidget usesdiagramfillcolor="0" width="192" x="855" fillcolor="#ffffc0" y="48" instancename="mapping0" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="HjupUSYowhI4" decon="0" localid="a8y22aDmxi4S" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="192" x="1139" fillcolor="#ffffc0" y="48" instancename="mapping1" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="HjupUSYowhI4" decon="0" localid="PNVizgbJacYd" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="192" x="1467" fillcolor="#ffffc0" y="48" instancename="mapping2" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="HjupUSYowhI4" decon="0" localid="ui3PEJBmn8rj" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- </widgets>
- <messages>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="687" operation="z7iRgeJqCCrj" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="6" textid="uYaEkn1fsPxQ" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="9QRr8oHrIyOQ" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="547" x="326" fillcolor="none" y="665" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="uYaEkn1fsPxQ" showstereotype="1" text="6: getSigma(modulation : const Channel_Mod, snr_in_db : const float) : const double" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="285" x="321" fillcolor="none" y="578" operation="M3QGTU7iw8dM" linewidth="none" widgetbid="VcHEp6yBGZmE" height="8" usefillcolor="1" seqnum="4" textid="fJs8zIVwsUpx" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="jRTpUCUaTrp5" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="518" x="326" fillcolor="none" y="556" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="fJs8zIVwsUpx" text="4: getModulation(carrier : const unsigned int) : const Channel_Mod" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="506" operation="P3rRYhqHMh6s" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="3" textid="4S9x0L8wK3Te" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="muSfiL1vGzl3" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="350" x="326" fillcolor="none" y="484" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="4S9x0L8wK3Te" showstereotype="1" text="3: getLinearSnr(snr_in_db : const float) : const double" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="627" operation="jfqqWYV4W41s" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="5" textid="WtHx3BbQh5q4" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="IrO6a4kn04VS" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="416" x="326" fillcolor="none" y="605" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="WtHx3BbQh5q4" showstereotype="1" text="5: getPowerScale(modulation : const Channel_Mod) : const float" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="182" operation="09RFjqmd0dax" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="0.1" textid="jq17ZjwGkSkg" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="HOn0jC4IxHwb" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="1113" x="326" fillcolor="none" y="160" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="jq17ZjwGkSkg" text="0.1: findChannelSettings(tx_station_id : const Sci_Msg_Station_Id, rx_station_id : const Sci_Msg_Station_Id, both_directions : const bool) : std::vector&lt; ChannelSettings * >&amp;" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="236" x="83" fillcolor="none" y="130" operation="LRN0s3UGfAwm" linewidth="none" widgetbid="u4Vw6zChn0FB" height="8" usefillcolor="1" seqnum="0" textid="yJ8aftxYwuoW" widgetaid="JSGw5HTuusup" isinstance="0" xmi.id="vYaZ8E857Uzs" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="1790" x="88" fillcolor="none" y="108" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="yJ8aftxYwuoW" text="0: addPerturbation(pb_measurement_array : uint32_t*, noise : PhySciMsgNoise&amp;, pb_header_array : const uint32_t*, mpdu : const PhySciMsgMpdu&amp;, tx_station_id : const Sci_Msg_Station_Id, rx_station_id : const Sci_Msg_Station_Id, current_tick : const Network_Clock_Tick) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="285" x="321" fillcolor="none" y="247" operation="dWaTBSKgoPJ3" linewidth="none" widgetbid="VcHEp6yBGZmE" height="8" usefillcolor="1" seqnum="0.2" textid="GZIM315LGZEW" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="7Gbh73pmyjD4" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="380" x="326" fillcolor="none" y="225" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="GZIM315LGZEW" showstereotype="1" text="0.2: getFirstSymbolStartDate() : const Network_Clock_Tick" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="629" x="321" fillcolor="none" y="758" operation="rCiZ34ts7WOo" linewidth="none" widgetbid="a8y22aDmxi4S" height="8" usefillcolor="1" seqnum="7" textid="mpdOyViWiQTz" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="NPrLTDPM1My6" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="1076" x="326" fillcolor="none" y="736" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="mpdOyViWiQTz" showstereotype="1" text="7: setCode(modulation : const Channel_Mod, mpdu_payload_length : const unsigned long, p_mpdu_payload : const unsigned char*, mpdu_index : unsigned int&amp;) : bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="629" x="321" fillcolor="none" y="802" operation="nowhba6bZwOz" linewidth="none" widgetbid="a8y22aDmxi4S" height="8" usefillcolor="1" seqnum="8" textid="NZDmZTbnQy08" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="9YVTK9l70IqV" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="478" x="326" fillcolor="none" y="780" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="NZDmZTbnQy08" text="8: computePoint(modulation : const Channel_Mod) : const ChannelPoint&amp;" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="844" operation="jyRgGnpfqf5M" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="9" textid="X8sw5uavM44a" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="u7dxbPK1G8Yu" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="548" x="326" fillcolor="none" y="822" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="X8sw5uavM44a" text="9: addNoise(point : const ChannelPoint&amp;, sigma : const double) : const ChannelPoint" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="913" x="321" fillcolor="none" y="899" operation="o3dYjumm81LP" linewidth="none" widgetbid="PNVizgbJacYd" height="8" usefillcolor="1" seqnum="10" textid="TviPGPMNGWmm" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="AboEaCBFVTRe" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="467" x="326" fillcolor="none" y="877" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="TviPGPMNGWmm" text="10: retrievePoint(modulation : const Channel_Mod) : const ChannelPoint" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="1241" x="321" fillcolor="none" y="952" operation="66Ykoo2IT5gA" linewidth="none" widgetbid="ui3PEJBmn8rj" height="8" usefillcolor="1" seqnum="11" textid="nuZRxZVATbii" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="BEczhLNQKErc" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="507" x="326" fillcolor="none" y="930" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="nuZRxZVATbii" showstereotype="1" text="11: computeCode(modulation : const Channel_Mod) : const unsigned short int" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="999" operation="XOXms3hJA084" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="12" textid="g4GGNIBXMiNb" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="ltqm7OE0pjjp" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="707" x="326" fillcolor="none" y="977" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="g4GGNIBXMiNb" showstereotype="1" text="12: computeBer(codeA : const unsigned short int, codeB : const unsigned short int) : const unsigned short int" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="1155" operation="o0LrX74wtWDl" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="14" textid="NQHoDpzJblzE" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="p9IvJtNiyBIa" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="747" x="326" fillcolor="none" y="1133" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="NQHoDpzJblzE" text="14: computeFer(ber : const unsigned short int, n : const unsigned int, modulation : const Channel_Mod) : const float" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="1215" operation="wAYHYS5t16DH" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="15" textid="5fcFCtaBtUj2" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="QtHPrgMs3A6u" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="325" x="326" fillcolor="none" y="1193" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="5fcFCtaBtUj2" showstereotype="1" text="15: computeCrcError(fer : const float) : const bool" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="321" fillcolor="none" y="1070" operation="k41t27vK3XoF" linewidth="none" widgetbid="u4Vw6zChn0FB" height="32" usefillcolor="1" seqnum="13" textid="RzzRQLxjTpPs" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="pe8kGhrJKg63" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="646" x="326" fillcolor="none" y="1048" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="RzzRQLxjTpPs" text="13: computeNoise(pointA : const ChannelPoint&amp;, pointB : const ChannelPoint&amp;) : const unsigned int" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="285" x="321" fillcolor="none" y="393" operation="AB0zYJ2vLR9m" linewidth="none" widgetbid="VcHEp6yBGZmE" height="8" usefillcolor="1" seqnum="1" textid="tYOTbc6noQuY" widgetaid="u4Vw6zChn0FB" isinstance="0" xmi.id="ncXBJkvSItqN" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="905" x="326" fillcolor="none" y="371" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="tYOTbc6noQuY" text="1: getSnr(beacon_period : const Network_Clock_Tick, symbol_start_date : const Network_Clock_Tick, carrier : const unsigned int) : const float" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="608" fillcolor="none" y="437" operation="Z1yyRvzefObL" linewidth="none" widgetbid="VcHEp6yBGZmE" height="32" usefillcolor="1" seqnum="2" textid="KgciLhLFiQt2" widgetaid="VcHEp6yBGZmE" isinstance="0" xmi.id="kPRSVvRUyNkh" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="802" x="613" fillcolor="none" y="415" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="KgciLhLFiQt2" showstereotype="1" text="2: getInterval(beacon_period : const Network_Clock_Tick, symbol_start_date : const Network_Clock_Tick) : const unsigned int" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- </messages>
- <associations/>
- </diagram>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1340" snapy="10" showatts="1" xmi.id="NdBn9ALHuRov" documentation="" type="3" showops="1" showpackage="1" name="sequence diagram phy" localid="vTN4WfHZyzzP" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="808" >
- <widgets>
- <objectwidget usesdiagramfillcolor="0" width="145" x="742" fillcolor="#ffffc0" y="48" instancename="sta_Rx" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ACuye0MTG4P7" decon="0" localid="TEq0CDwjmGJP" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="152" x="73" fillcolor="#ffffc0" y="48" instancename="sta_Tx" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="rGkvr2wbb0ig" decon="0" localid="wsGISdwu93Fw" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="143" x="422" fillcolor="#ffffc0" y="48" instancename="" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="ka695HsLyRqa" decon="0" localid="UzpajIea0XQC" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <objectwidget usesdiagramfillcolor="0" width="123" x="999" fillcolor="#ffffc0" y="48" instancename="sta" linewidth="none" height="28" usefillcolor="1" isinstance="0" xmi.id="CvLZ2CQ63P41" decon="0" localid="vTN4WfHZyzzP" multipleinstance="0" drawasactor="0" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,0,50,0,1,0,0,0" linecolor="#ff0000" />
- <notewidget usesdiagramfillcolor="1" width="288" x="725" fillcolor="none" y="375" linewidth="none" height="77" usefillcolor="1" isinstance="0" xmi.id="vaLJXLQEXaTQ" showstereotype="1" text="sta_Rx informs Maximus that it is waiting for a phy msg MPDU PAYLOAD with station_id=1 and tx_id=n." usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- <notewidget usesdiagramfillcolor="1" width="254" x="945" fillcolor="none" y="596" linewidth="none" height="76" usefillcolor="1" isinstance="0" xmi.id="xI2mvXuq5XQ1" showstereotype="1" text="Maximus does not forward the message to this station because the station did not request it." usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </widgets>
- <messages>
- <messagewidget usesdiagramfillcolor="1" width="342" x="150" fillcolor="none" y="157" operation="phy msg PREAMBLE (station_id=1, tx_id=n)" linewidth="none" widgetbid="UzpajIea0XQC" height="8" usefillcolor="1" seqnum="1" textid="bOloW713jQsW" widgetaid="wsGISdwu93Fw" isinstance="0" xmi.id="Mv0zqKRZhUnv" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="308" x="155" fillcolor="none" y="135" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="bOloW713jQsW" showstereotype="1" text="1: phy msg PREAMBLE (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="342" x="150" fillcolor="none" y="272" operation="phy msg FC (station_id=1, tx_id=n)" linewidth="none" widgetbid="UzpajIea0XQC" height="8" usefillcolor="1" seqnum="2" textid="9Lu6jLuuqk9N" widgetaid="wsGISdwu93Fw" isinstance="0" xmi.id="fQ14khLUfnNq" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="251" x="155" fillcolor="none" y="250" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="9Lu6jLuuqk9N" text="2: phy msg FC (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="342" x="150" fillcolor="none" y="620" operation="phy msg MPDU PAYLOAD (station_id=1, tx_id=n)" linewidth="none" widgetbid="UzpajIea0XQC" height="8" usefillcolor="1" seqnum="3" textid="knYyVvmnygjd" widgetaid="wsGISdwu93Fw" isinstance="0" xmi.id="2ezxScrI455n" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="338" x="155" fillcolor="none" y="598" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="knYyVvmnygjd" showstereotype="1" text="3: phy msg MPDU PAYLOAD (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="319" x="494" fillcolor="none" y="158" operation="phy msg PREAMBLE (station_id=1, tx_id=n)" linewidth="none" widgetbid="TEq0CDwjmGJP" height="8" usefillcolor="1" seqnum="1.1" textid="Vp1SBTakUluB" widgetaid="UzpajIea0XQC" isinstance="0" xmi.id="jNrUtdvesECz" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="315" x="499" fillcolor="none" y="136" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Vp1SBTakUluB" showstereotype="1" text="1.1: phy msg PREAMBLE (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="565" x="494" fillcolor="none" y="206" operation="phy msg PREAMBLE (station_id=1, tx_id=n)" linewidth="none" widgetbid="vTN4WfHZyzzP" height="8" usefillcolor="1" seqnum="1.2" textid="RXJBTM0Jf1co" widgetaid="UzpajIea0XQC" isinstance="0" xmi.id="WJhwQHceMTqC" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="315" x="499" fillcolor="none" y="184" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="RXJBTM0Jf1co" showstereotype="1" text="1.2: phy msg PREAMBLE (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="319" x="494" fillcolor="none" y="269" operation="phy msg FC (station_id=1, tx_id=n)" linewidth="none" widgetbid="TEq0CDwjmGJP" height="8" usefillcolor="1" seqnum="2.1" textid="OLVTLWolFCsg" widgetaid="UzpajIea0XQC" isinstance="0" xmi.id="Q6PapcRWPuEz" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="263" x="499" fillcolor="none" y="247" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="OLVTLWolFCsg" showstereotype="1" text="2.1: phy msg FC (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="565" x="494" fillcolor="none" y="507" operation="phy msg FC (station_id=1, tx_id=n)" linewidth="none" widgetbid="vTN4WfHZyzzP" height="8" usefillcolor="1" seqnum="2.2" textid="EBWXiv4NpPQR" widgetaid="UzpajIea0XQC" isinstance="0" xmi.id="OBh7pccOhqSd" sequencemessagetype="1001" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="263" x="499" fillcolor="none" y="485" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="EBWXiv4NpPQR" showstereotype="1" text="2.2: phy msg FC (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="815" fillcolor="none" y="298" operation="phy_rx_prepare (short_ppdu=false)" linewidth="none" widgetbid="TEq0CDwjmGJP" height="32" usefillcolor="1" seqnum="2.1.1" textid="w3lqVE3FVdpA" widgetaid="TEq0CDwjmGJP" isinstance="0" xmi.id="YGIWHyaOQQR1" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="274" x="820" fillcolor="none" y="276" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="w3lqVE3FVdpA" showstereotype="1" text="2.1.1: phy_rx_prepare (short_ppdu=false)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="1061" fillcolor="none" y="537" operation="phy_rx_prepare (short_ppdu=true)" linewidth="none" widgetbid="vTN4WfHZyzzP" height="32" usefillcolor="1" seqnum="2.2.1" textid="37M4PIbBIbTx" widgetaid="vTN4WfHZyzzP" isinstance="0" xmi.id="YWBfB4JOZN86" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="270" x="1066" fillcolor="none" y="515" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="37M4PIbBIbTx" showstereotype="1" text="2.2.1: phy_rx_prepare (short_ppdu=true)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="319" x="494" fillcolor="none" y="354" operation="phy msg RX (station_id=2, tx_id=n, src_station_id=1)" linewidth="none" widgetbid="UzpajIea0XQC" height="8" usefillcolor="1" seqnum="2.1.2" textid="Q9fmWfwVXIRK" widgetaid="TEq0CDwjmGJP" isinstance="0" xmi.id="6pUz2zEfdQkC" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="390" x="499" fillcolor="none" y="332" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="Q9fmWfwVXIRK" text="2.1.2: phy msg RX (station_id=2, tx_id=n, src_station_id=1)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="319" x="494" fillcolor="none" y="630" operation="phy msg MPDU PAYLOAD (station_id=1, tx_id=n)" linewidth="none" widgetbid="TEq0CDwjmGJP" height="8" usefillcolor="1" seqnum="3.1" textid="BygjONyynXM1" widgetaid="UzpajIea0XQC" isinstance="0" xmi.id="uRpeGm54E613" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="350" x="499" fillcolor="none" y="608" linewidth="none" posttext="" role="704" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="BygjONyynXM1" showstereotype="1" text="3.1: phy msg MPDU PAYLOAD (station_id=1, tx_id=n)" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- <messagewidget usesdiagramfillcolor="1" width="48" x="150" fillcolor="none" y="664" operation="tx_id++" linewidth="none" widgetbid="wsGISdwu93Fw" height="32" usefillcolor="1" seqnum="4" textid="dA4iPXnEjCVb" widgetaid="wsGISdwu93Fw" isinstance="0" xmi.id="3DGqw8zT8FYD" sequencemessagetype="1001" showstereotype="1" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" >
- <floatingtext usesdiagramfillcolor="1" width="76" x="155" fillcolor="none" y="642" linewidth="none" posttext="" role="705" height="22" usefillcolor="1" pretext="" isinstance="0" xmi.id="dA4iPXnEjCVb" showstereotype="1" text="4: tx_id++" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </messagewidget>
- </messages>
- <associations/>
- </diagram>
- <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1100" snapy="10" showatts="1" xmi.id="ZpAs8xwGrNaW" documentation="" type="1" showops="1" showpackage="1" name="class diagram channel settings" localid="" showstereotype="1" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1107" >
- <widgets>
- <classwidget usesdiagramfillcolor="0" width="908" showattsigs="601" x="72" fillcolor="#ffffc0" y="42" showopsigs="601" linewidth="none" height="396" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="PGF0sP6Kgb0l" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
- <classwidget usesdiagramfillcolor="0" width="449" showattsigs="601" x="199" fillcolor="#ffffc0" y="941" showopsigs="601" linewidth="none" height="162" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="VsbjUz1jzxim" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
- <classwidget usesdiagramfillcolor="0" width="1079" showattsigs="601" x="17" fillcolor="#ffffc0" y="486" showopsigs="601" linewidth="none" height="378" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="HjupUSYowhI4" showoperations="1" showpackage="1" showscope="1" showstereotype="1" usesdiagramusefillcolor="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" linecolor="#ff0000" />
- </widgets>
- <messages/>
- <associations>
- <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" linewidth="none" widgetbid="VsbjUz1jzxim" widgetaid="HjupUSYowhI4" xmi.id="ZSwkq19bojv2" type="510" changeabilityA="900" changeabilityB="900" linecolor="none" visibilityA="200" >
- <linepath>
- <startpoint startx="221" starty="864" />
- <endpoint endx="221" endy="941" />
- </linepath>
- <floatingtext usesdiagramfillcolor="1" width="64" x="161" fillcolor="none" y="917" linewidth="none" posttext="" role="710" height="22" usefillcolor="1" pretext="+" isinstance="0" xmi.id="RACYAu1DgR4Z" showstereotype="1" text="mPoint" usesdiagramusefillcolor="1" font="Sans Serif,10,-1,0,50,0,0,0,0,0" linecolor="none" />
- </assocwidget>
- </associations>
- </diagram>
- </diagrams>
- </XMI.extension>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Use Case View" isRoot="false" isAbstract="false" name="Use Case View" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Component View" isRoot="false" isAbstract="false" name="Component View" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Deployment View" isRoot="false" isAbstract="false" name="Deployment View" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- <UML:Model stereotype="folder" isSpecification="false" isLeaf="false" visibility="public" namespace="m1" xmi.id="Entity Relationship Model" isRoot="false" isAbstract="false" name="Entity Relationship Model" >
- <UML:Namespace.ownedElement/>
- </UML:Model>
- </UML:Namespace.ownedElement>
- </UML:Model>
- </XMI.content>
- <XMI.extensions xmi.extender="umbrello" >
- <docsettings viewid="NdBn9ALHuRov" documentation="" uniqueid="KS7s5wEPMgTu" />
- <listview>
- <listitem open="1" type="800" label="Views" >
- <listitem open="1" type="801" id="Logical View" >
- <listitem open="0" type="813" id="FA5tCgQO5jOX" >
- <listitem open="0" type="814" id="vLNKsMwHnQ5O" />
- <listitem open="0" type="814" id="uHZmB3x8YrWn" />
- <listitem open="0" type="814" id="EPgLV4JWKVtq" />
- <listitem open="0" type="814" id="iNWc4oZxCl7B" />
- <listitem open="0" type="814" id="GQR4rnp7JCzr" />
- <listitem open="0" type="814" id="GewSP3dgS2iJ" />
- <listitem open="0" type="814" id="pXR9jOynPIoD" />
- <listitem open="0" type="815" id="PNXlmw9fnFuL" />
- <listitem open="0" type="815" id="y8L4KAg9702o" />
- <listitem open="0" type="815" id="LRN0s3UGfAwm" />
- <listitem open="0" type="815" id="MTBnuIpE5I5h" />
- <listitem open="0" type="815" id="qrweJyXfPgQH" />
- <listitem open="0" type="815" id="OS6l8U35hW6C" />
- <listitem open="0" type="815" id="jRbAQQ47XE3x" />
- <listitem open="0" type="815" id="qQZrSJeClEK9" />
- <listitem open="0" type="815" id="OZe7W5VrVgaA" />
- <listitem open="0" type="815" id="09RFjqmd0dax" />
- <listitem open="0" type="815" id="fYXdFW0u7v45" />
- <listitem open="0" type="815" id="BALxxO2awYCA" />
- <listitem open="0" type="815" id="dGNRBZuSsh40" />
- <listitem open="0" type="815" id="XLTP0YPPGkf1" />
- <listitem open="0" type="815" id="2s4IahHvPPAX" />
- <listitem open="0" type="815" id="z7iRgeJqCCrj" />
- <listitem open="0" type="815" id="jfqqWYV4W41s" />
- <listitem open="0" type="815" id="P3rRYhqHMh6s" />
- <listitem open="0" type="815" id="jyRgGnpfqf5M" />
- <listitem open="0" type="815" id="XOXms3hJA084" />
- <listitem open="0" type="815" id="k41t27vK3XoF" />
- <listitem open="0" type="815" id="o0LrX74wtWDl" />
- <listitem open="0" type="815" id="wAYHYS5t16DH" />
- </listitem>
- <listitem open="0" type="813" id="HjupUSYowhI4" >
- <listitem open="0" type="814" id="ZSwkq19bojv2" />
- <listitem open="0" type="814" id="Ge7RT8Ckq5ZI" />
- <listitem open="0" type="814" id="V57RkPTHrQ2f" />
- <listitem open="0" type="814" id="P9GDsAF7oLYH" />
- <listitem open="0" type="815" id="4DctbcZ0lnEe" />
- <listitem open="0" type="815" id="xRjlmH0Ez1Tl" />
- <listitem open="0" type="815" id="0eBxdci9ekFK" />
- <listitem open="0" type="815" id="DjaPUCMSoVQR" />
- <listitem open="0" type="815" id="66Ykoo2IT5gA" />
- <listitem open="0" type="815" id="nowhba6bZwOz" />
- <listitem open="0" type="815" id="jtReTM98izcO" />
- <listitem open="0" type="815" id="huvhfiqMaF13" />
- <listitem open="0" type="815" id="c8CI5oguNdiw" />
- <listitem open="0" type="815" id="Uc44r38RCKjF" />
- <listitem open="0" type="815" id="I0RSI9iPWrpV" />
- <listitem open="0" type="815" id="fD4zThhtEUMY" />
- <listitem open="0" type="815" id="qEuK4jnjvsgO" />
- <listitem open="0" type="815" id="o3dYjumm81LP" />
- <listitem open="0" type="815" id="rCiZ34ts7WOo" />
- <listitem open="0" type="815" id="no29iM1Z9CGC" />
- </listitem>
- <listitem open="0" type="813" id="VsbjUz1jzxim" >
- <listitem open="0" type="814" id="hRU6f1aVcHyc" />
- <listitem open="0" type="814" id="IhZENLi13oFI" />
- <listitem open="0" type="815" id="0zDce8bMX5QB" />
- <listitem open="0" type="815" id="kVbwfpKRKEVh" />
- <listitem open="0" type="815" id="rGEtgzA0EaD8" />
- <listitem open="0" type="815" id="5iOQmRPfmnrL" />
- <listitem open="0" type="815" id="OeSEtgTyOpM9" />
- <listitem open="0" type="815" id="Vo4VsHm3o6I5" />
- </listitem>
- <listitem open="0" type="813" id="PGF0sP6Kgb0l" >
- <listitem open="0" type="814" id="YzQ8Jmmx2Rx1" />
- <listitem open="0" type="814" id="C8LZTmT1jr71" />
- <listitem open="0" type="814" id="ECT43sTE9tu7" />
- <listitem open="0" type="814" id="8uij0qPBhzDF" />
- <listitem open="0" type="814" id="dsqJeeDqqfut" />
- <listitem open="0" type="815" id="N1iX9W91mjbs" />
- <listitem open="0" type="815" id="cnVd2iEDTGap" />
- <listitem open="0" type="815" id="dccFV5HKv9Wt" />
- <listitem open="0" type="815" id="CRgGs5fVq86t" />
- <listitem open="0" type="815" id="rJ3xOwjhyyGc" />
- <listitem open="0" type="815" id="P5CYI2l7Km5i" />
- <listitem open="0" type="815" id="goPeldGm16Ol" />
- <listitem open="0" type="815" id="iiALeHZ1Njaf" />
- <listitem open="0" type="815" id="dWaTBSKgoPJ3" />
- <listitem open="0" type="815" id="M3QGTU7iw8dM" />
- <listitem open="0" type="815" id="AB0zYJ2vLR9m" />
- <listitem open="0" type="815" id="kSxc26GHOJiP" />
- <listitem open="0" type="815" id="BSaEFiqHsNgS" />
- <listitem open="0" type="815" id="dzYH8IvKHpvW" />
- <listitem open="0" type="815" id="w6NMjCexlRoY" />
- <listitem open="0" type="815" id="Z1yyRvzefObL" />
- </listitem>
- <listitem open="1" type="813" id="zSo720DHUtK4" />
- <listitem open="0" type="813" id="kbTW3DFGwneP" />
- <listitem open="0" type="813" id="aXMfZ9tQ8GTx" >
- <listitem open="0" type="814" id="FsOabmphHzei" />
- <listitem open="0" type="814" id="jNPug1TGWnt5" />
- </listitem>
- <listitem open="0" type="813" id="MJNkMwYhFv8H" >
- <listitem open="0" type="815" id="11oV4ziv3AYN" />
- <listitem open="0" type="815" id="YYbhCSZWluH5" />
- <listitem open="0" type="815" id="qnn4itLhu9Bz" />
- <listitem open="0" type="815" id="bWALx5iDCipN" />
- <listitem open="0" type="815" id="AGEpQZVz3eK0" />
- <listitem open="0" type="815" id="d3GgfZfOZoHG" />
- <listitem open="0" type="815" id="PujNU9MyUc3R" />
- <listitem open="0" type="815" id="hYiS0RDqSc09" />
- <listitem open="0" type="815" id="qCYOB46xZJIN" />
- <listitem open="0" type="815" id="34qsc33QFZoO" />
- <listitem open="0" type="815" id="WhMdFTMpdTdI" />
- <listitem open="0" type="815" id="tCCndBu9sGk6" />
- </listitem>
- <listitem open="0" type="813" id="5VCzTkjjCKbZ" />
- <listitem open="0" type="813" id="P5iAKaTM6Drb" />
- <listitem open="1" type="813" id="ka695HsLyRqa" />
- <listitem open="1" type="813" id="OMC8n0NgoyNC" />
- <listitem open="1" type="813" id="y0Zndhh8NjGq" />
- <listitem open="1" type="813" id="EPI1UgANf3xg" />
- <listitem open="1" type="813" id="zwpATNw5hYwj" />
- <listitem open="1" type="813" id="J5I5GN6BUVNH" />
- <listitem open="0" type="813" id="r6SeLQ0E8ets" />
- <listitem open="0" type="813" id="nNLPS46tYU5B" />
- <listitem open="1" type="813" id="5hM3oO8IvMZa" />
- <listitem open="1" type="813" id="71EBB6ZerqDE" />
- <listitem open="0" type="813" id="p0EIenqzKrdV" >
- <listitem open="0" type="814" id="ihYvkGnalcj8" />
- <listitem open="0" type="814" id="DcQ21IYgvf4A" />
- <listitem open="0" type="814" id="0PpuG29IN9r4" />
- <listitem open="0" type="815" id="lRK3GxXGwC31" />
- <listitem open="0" type="815" id="tGjpAvxFMVQv" />
- <listitem open="0" type="815" id="2UAE6pa80TlD" />
- <listitem open="0" type="815" id="iRfrv7uIeAaZ" />
- </listitem>
- <listitem open="1" type="813" id="xbRaG9lhs3GA" />
- <listitem open="1" type="813" id="t1tc2bTZdTo7" />
- <listitem open="1" type="813" id="iF6aeCsJls2b" />
- <listitem open="0" type="813" id="0IENWuVgMRRQ" />
- <listitem open="1" type="813" id="ouQgLFbCZBH6" />
- <listitem open="1" type="813" id="MjbCnbmzupQK" />
- <listitem open="1" type="813" id="R2g1PPyRrFdJ" />
- <listitem open="1" type="813" id="QCc0kys9xMnl" />
- <listitem open="1" type="813" id="0ZbYQWqDJFyR" />
- <listitem open="1" type="813" id="pnRk9DVlgulU" />
- <listitem open="1" type="813" id="OTUqbbMS8cB5" />
- <listitem open="1" type="813" id="NNrPbFIBbTWJ" />
- <listitem open="0" type="813" id="umW20xxGpJoP" >
- <listitem open="0" type="815" id="3d6Ick1K5QEl" />
- </listitem>
- <listitem open="0" type="813" id="ek5GEEjxefv1" />
- <listitem open="1" type="813" id="rGkvr2wbb0ig" />
- <listitem open="1" type="813" id="ACuye0MTG4P7" />
- <listitem open="1" type="813" id="CvLZ2CQ63P41" />
- <listitem open="1" type="813" id="pKHo6OTH6XRU" />
- <listitem open="1" type="813" id="TwO4O4jLDIiP" />
- <listitem open="0" type="813" id="7rs81OTZw4E7" />
- <listitem open="0" type="813" id="eNNzwM7vtyZm" />
- <listitem open="1" type="813" id="MMOOLBCfmrGJ" />
- <listitem open="1" type="813" id="yBbPCZ8HGSK2" />
- <listitem open="1" type="813" id="eniEjhTPROwl" />
- <listitem open="1" type="813" id="ryY5K4jdy734" />
- <listitem open="1" type="813" id="IVIVFrTsSA9W" />
- <listitem open="1" type="813" id="Y2z0vH5PWhVj" />
- <listitem open="1" type="813" id="IW1PTWwAuJXf" />
- <listitem open="1" type="813" id="SRA7JvZo6AuO" />
- <listitem open="0" type="818" id="uPECzXJFnTOn" >
- <listitem open="0" type="813" id="IWPuXt3VypIz" />
- </listitem>
- <listitem open="0" type="818" id="6elj96McODtx" >
- <listitem open="0" type="813" id="qYY4ISujM3Ed" />
- <listitem open="0" type="813" id="AlwnfvQ24tqq" />
- </listitem>
- <listitem open="0" type="830" id="Datatypes" >
- <listitem open="0" type="829" id="5ToJ3zPrsGFF" />
- <listitem open="0" type="829" id="3YkVVg8j3o2Y" />
- <listitem open="0" type="829" id="rxKsjMRYfTiU" />
- <listitem open="0" type="829" id="b4ob1ibWBqLq" />
- <listitem open="0" type="829" id="8gZ2im9FZlVF" />
- <listitem open="0" type="829" id="tq6FaofPTzwd" />
- <listitem open="1" type="829" id="txbVRO36HpfQ" />
- <listitem open="1" type="829" id="JcPKyEye9iP3" />
- <listitem open="0" type="829" id="448sjDF59poj" />
- <listitem open="0" type="829" id="psrQPqT9L430" />
- <listitem open="0" type="829" id="zypnSFDYKlG8" />
- <listitem open="0" type="829" id="PfzwSs1KcVMd" />
- <listitem open="0" type="829" id="oL4FZe2AHfNk" />
- <listitem open="0" type="829" id="kj4rGrwwW6er" />
- <listitem open="0" type="829" id="WzilSttBcw0q" />
- <listitem open="0" type="829" id="NBTpmTxZCmcb" />
- <listitem open="0" type="829" id="m2IzC9ii2UsR" />
- <listitem open="0" type="829" id="mXu6MdkX4QlH" />
- <listitem open="0" type="829" id="ARgEDvWDshpX" />
- <listitem open="0" type="829" id="hfBiNMiT2GVk" />
- <listitem open="0" type="829" id="HSbuMHwp53nG" />
- <listitem open="0" type="829" id="fLpWgryb0030" />
- <listitem open="0" type="829" id="1XretJvqfug3" />
- <listitem open="0" type="829" id="su73E4iG7Y8j" />
- <listitem open="0" type="829" id="X118ilRkx2cY" />
- <listitem open="1" type="829" id="LRcU81Wzx7SM" />
- <listitem open="1" type="829" id="ZJ5BrRm819Tz" />
- <listitem open="1" type="829" id="agtmZAmehdXM" />
- <listitem open="1" type="829" id="dpMdwnaHDClJ" />
- <listitem open="1" type="829" id="VVSkI78sPE3E" />
- <listitem open="0" type="829" id="PVMPlwqpaaYi" />
- <listitem open="0" type="829" id="LlOVV04Zpapx" />
- <listitem open="1" type="829" id="GgbUcB1crO0m" />
- <listitem open="0" type="829" id="WndGhsLWd8YJ" />
- <listitem open="0" type="829" id="41M2qczWxT6z" />
- <listitem open="1" type="829" id="CFI9MjVrEwaX" />
- <listitem open="0" type="829" id="BVdJY7XV1Crz" />
- <listitem open="1" type="829" id="mjQxu9G6PXDl" />
- <listitem open="1" type="829" id="1iPQuScWFz9B" />
- </listitem>
- </listitem>
- <listitem open="1" type="802" id="Use Case View" />
- <listitem open="1" type="821" id="Component View" />
- <listitem open="1" type="827" id="Deployment View" />
- <listitem open="1" type="836" id="Entity Relationship Model" />
- </listitem>
- </listview>
- <codegeneration>
- <codegenerator language="C++" />
- </codegeneration>
- </XMI.extensions>
-</XMI>
diff --git a/cesar/maximus/python/lib/cesar/maximus_dur.py b/cesar/maximus/python/lib/cesar/maximus_dur.py
index 835a564a0c..3ae60ad1fb 100644
--- a/cesar/maximus/python/lib/cesar/maximus_dur.py
+++ b/cesar/maximus/python/lib/cesar/maximus_dur.py
@@ -14,9 +14,9 @@ def maximus_dur_carrier_nb(maximus, station, tonemask):
"""
# Create and send a function call to call the following Maximus duration function:
# "uint maximus_dur_carrier_nb (const u8 *tonemask);"
- rsp = maximus.create_fcall("maximus_dur_carrier_nb")\
- .add_param("tonemask", tonemask)\
- .send(station)
+ rsp = maximus.create_fcall("maximus_dur_carrier_nb")
+ rsp .add_param("tonemask", tonemask)
+ rsp.send(station)
return rsp.bind_param_ulong("carrier_nb")
def maximus_dur_bits_per_symbol(maximus, station, mod, tonemask, tonemap, carrier_nb):
@@ -33,12 +33,12 @@ def maximus_dur_bits_per_symbol(maximus, station, mod, tonemask, tonemap, carrie
# "uint maximus_dur_bits_per_symbol (phy_mod_t mod, const u8 *tonemask, const blk_t *tonemap, uint carrier_nb);"
if tonemap is None:
tonemap = ((PHY_CARRIER_NB + 1) / 2) * '\0'
- rsp = maximus.create_fcall("maximus_dur_bits_per_symbol")\
- .add_param_ulong("mod", mod)\
- .add_param("tonemask", tonemask)\
- .add_param("tonemap", tonemap)\
- .add_param_ulong("carrier_nb", carrier_nb)\
- .send(station)
+ rsp = maximus.create_fcall("maximus_dur_bits_per_symbol")
+ rsp.add_param_ulong("mod", mod)
+ rsp.add_param("tonemask", tonemask)
+ rsp.add_param("tonemap", tonemap)
+ rsp.add_param_ulong("carrier_nb", carrier_nb)
+ rsp.send(station)
return rsp.bind_param_ulong("bits_per_symbol")
def maximus_dur_symbol_nb(maximus, station, mod, fecrate, pb_size, bits_per_symbol, pb_nb):
@@ -54,13 +54,13 @@ def maximus_dur_symbol_nb(maximus, station, mod, fecrate, pb_size, bits_per_symb
"""
# Create and send a function call to call the following Maximus duration function:
# "uint maximus_dur_symbol_nb (phy_mod_t mod, phy_fecrate_t fecrate, phy_pb_size_t pb_size, uint bits_per_symbol, uint pb_nb);"
- rsp = maximus.create_fcall("maximus_dur_symbol_nb")\
- .add_param_ulong("mod", mod)\
- .add_param_ulong("fecrate", fecrate)\
- .add_param_ulong("pb_size", pb_size)\
- .add_param_ulong("bits_per_symbol", bits_per_symbol)\
- .add_param_ulong("pb_nb", pb_nb)\
- .send(station)
+ rsp = maximus.create_fcall("maximus_dur_symbol_nb")
+ rsp.add_param_ulong("mod", mod)
+ rsp.add_param_ulong("fecrate", fecrate)
+ rsp.add_param_ulong("pb_size", pb_size)
+ rsp.add_param_ulong("bits_per_symbol", bits_per_symbol)
+ rsp.add_param_ulong("pb_nb", pb_nb)
+ rsp.send(station)
return rsp.bind_param_ulong("symbol_nb")
def maximus_dur_data_tck(maximus, station, gil, symbol_nb):
@@ -73,10 +73,10 @@ def maximus_dur_data_tck(maximus, station, gil, symbol_nb):
"""
# Create and send a function call to call the following Maximus duration function:
# "uint maximus_dur_data_tck (phy_gil_t gil, uint symbol_nb);"
- rsp = maximus.create_fcall("maximus_dur_data_tck")\
- .add_param_ulong("gil", gil)\
- .add_param_ulong("symbol_nb", symbol_nb)\
- .send(station)
+ rsp = maximus.create_fcall("maximus_dur_data_tck")
+ rsp.add_param_ulong("gil", gil)
+ rsp.add_param_ulong("symbol_nb", symbol_nb)
+ rsp.send(station)
return rsp.bind_param_ulong("data_tck")
def maximus_dur(maximus, station, tonemask, mod, tonemap, fecrate, pb_size, pb_nb, gil):
diff --git a/cesar/maximus/python/maximus/station/sta.py b/cesar/maximus/python/maximus/station/sta.py
index 912d080848..12735970a8 100644
--- a/cesar/maximus/python/maximus/station/sta.py
+++ b/cesar/maximus/python/maximus/station/sta.py
@@ -125,6 +125,9 @@ class STA:
# Start station
self.__start()
+ def __del__(self):
+ del self.__station
+
def __set_maximus(self, maximus):
"""Set Maximus.
Maximus must be a Maximus object (already initialized).
@@ -146,8 +149,7 @@ class STA:
"""Send the MAC_START message to the station.
"""
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_mac_start") \
- .send(self.get())
+ self.__get_maximus().create_fcall("maximus_mac_start").send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -162,9 +164,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=data)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_mac_start") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_mac_start")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -176,8 +178,7 @@ class STA:
"""Send the MAC_STOP message to the station.
"""
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_mac_stop") \
- .send(self.get())
+ self.__get_maximus().create_fcall("maximus_mac_stop").send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -188,9 +189,9 @@ class STA:
mme = MME(MMHeader=mmheader)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_mac_stop") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_mac_stop")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -627,9 +628,9 @@ class STA:
"""
if self.get_mac_address() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_mac_address") \
- .add_param_n_u8("mac_address", self.get_mac_address()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_mac_address")
+ m.add_param_n_u8("mac_address", self.get_mac_address())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -649,9 +650,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=StaMAC)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_mac_address") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_mac_address")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -664,9 +665,9 @@ class STA:
"""
if self.get_cco_preference() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_cco_preference") \
- .add_param_bool("cco_preference", self.get_cco_preference()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_cco_preference")
+ m.add_param_bool("cco_preference", self.get_cco_preference())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -690,10 +691,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=CCoPref)
if self.get_config_mode() is CONFIG_MODES[1]:
- self.__get_maximus()\
- .create_fcall("maximus_set_cco_preference") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_cco_preference")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -706,9 +706,9 @@ class STA:
"""
if self.get_was_cco() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_was_cco") \
- .add_param_bool("was_cco", self.get_was_cco()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_was_cco")
+ m.add_param_bool("was_cco", self.get_was_cco())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -732,9 +732,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=WasCCo)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_was_cco") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_was_cco")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -747,9 +747,9 @@ class STA:
"""
if self.get_npw() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_npw") \
- .add_param("npw", self.get_npw()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_npw")
+ m.add_param("npw", self.get_npw())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -770,9 +770,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=StaNPW)
if self.get_config_mode() is CONFIG_MODES[1]:
- self.__get_maximus().create_fcall("maximus_set_npw") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_npw")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -785,9 +785,9 @@ class STA:
"""
if self.get_dpw() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_dpw") \
- .add_param("dpw", self.get_dpw()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_dpw")
+ m.add_param("dpw", self.get_dpw())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -808,9 +808,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=StaDPW)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_dpw") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_dpw")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -823,9 +823,9 @@ class STA:
"""
if self.get_m_sta_hfid() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_m_sta_hfid") \
- .add_param("m_sta_hfid", self.get_m_sta_hfid()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_m_sta_hfid")
+ m.add_param("m_sta_hfid", self.get_m_sta_hfid())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -845,9 +845,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=Sta_m_HFID)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_m_sta_hfid") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_m_sta_hfid")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -860,9 +860,9 @@ class STA:
"""
if self.get_u_sta_hfid() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_u_sta_hfid") \
- .add_param("u_sta_hfid", self.get_u_sta_hfid()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_u_sta_hfid")
+ m.add_param("u_sta_hfid", self.get_u_sta_hfid())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -882,9 +882,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=Sta_u_HFID)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_u_sta_hfid") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_u_sta_hfid")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -897,9 +897,9 @@ class STA:
"""
if self.get_avln_hfid() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_avln_hfid") \
- .add_param("avln_hfid", self.get_avln_hfid()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_avln_hfid")
+ m.add_param("avln_hfid", self.get_avln_hfid())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -919,9 +919,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=Sta_AVLN_HFID)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_avln_hfid") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_avln_hfid")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -934,9 +934,9 @@ class STA:
"""
if self.get_sl() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_sl") \
- .add_param_uchar("sl", self.get_sl()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_sl")
+ m.add_param_uchar("sl", self.get_sl())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -954,9 +954,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=SL)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_sl") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_sl")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -969,9 +969,9 @@ class STA:
"""
if self.get_tonemask() is not None:
if self.get_config_mode() is CONFIG_MODES[2]: # 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_tonemask") \
- .add_param("tonemask", self.get_tonemask()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_tonemask")
+ m.add_param("tonemask", self.get_tonemask())
+ m.send(self.get())
else: # we need to build an MME
# Computes MM Header
@@ -989,9 +989,9 @@ class STA:
mme = MME(MMHeader=mmheader, MMEntry=data)
if self.get_config_mode() is CONFIG_MODES[1]: # 'fcall_process_drv'
- self.__get_maximus().create_fcall("maximus_set_tonemask") \
- .add_param("mme", mme.get()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_tonemask")
+ m.add_param("mme", mme.get())
+ m.send(self.get())
else: # 'MME'
# Send the MME and wait for the response
rsp = mme.sendnrecv(maximus=self.__get_maximus(),
@@ -1004,9 +1004,9 @@ class STA:
"""
if self.get_snid() is not None:
# allways 'fcall_cp_station'
- self.__get_maximus().create_fcall("maximus_set_snid") \
- .add_param_uchar("snid", self.get_snid()) \
- .send(self.get())
+ m = self.__get_maximus().create_fcall("maximus_set_snid")
+ m.add_param_uchar("snid", self.get_snid())
+ m.send(self.get())
def __send_internal_conf(self):
"""Send a message to the station with contents of internal.conf.
diff --git a/cesar/maximus/python/src/interface_module.cpp b/cesar/maximus/python/src/interface_module.cpp
deleted file mode 100644
index bf5dfa7a33..0000000000
--- a/cesar/maximus/python/src/interface_module.cpp
+++ /dev/null
@@ -1,881 +0,0 @@
-
-#include <boost/python.hpp>
-#include <boost/python/class.hpp>
-#include <boost/python/module.hpp>
-#include <boost/python/call.hpp>
-#include <boost/python/call_method.hpp>
-
-#include <boost/python/return_value_policy.hpp>
-#include <boost/python/copy_non_const_reference.hpp>
-#include <boost/python/return_internal_reference.hpp>
-
-#include <boost/python/detail/api_placeholder.hpp>
-
-#include "maximus/common/interfaces/Maximus.h"
-#include "maximus/common/interfaces/Sta.h"
-#include "maximus/common/interfaces/Msg.h"
-
-#include "ISystem.h"
-#include "IFunctionCall.h"
-#include "PhySciMsgMpdu.h"
-#include "PhySciMsgFc.h"
-#include "EtherSciMsg.h"
-
-#include "Logger.h"
-
-#include "common/defs/ethernet.h"
-
-using namespace std;
-using namespace boost::python;
-
-// For unitary tests
-extern bool UNITTEST;
-extern string stationTest;
-
-#if CONFIG_LOG
-// For Maximus log
-extern Logger logger;
-#endif /* CONFIG_LOG */
-
-// To catch signals
-extern Maximus * pMaximus;
-
-// To log Ether SCI messages
-File_Descriptor etherLogFileDescriptor = -1;
-
-typedef std::multimap<Function_Call_Msg_Id, object, compareMsgId> CbsList;
-CbsList listOfCbs;
-
-typedef struct rx_param_phy
-{
- object create_pb;
- object cb;
- bool activated;
-} rx_param_phy_t;
-rx_param_phy_t phy_rx_param;
-
-typedef struct rx_param_ether
-{
- object create_eth;
- object create_mme;
- object create_buffer;
- object cb;
- object catch_all_cb;
- bool activated;
- bool catch_all_activated;
- bool is_create_set; // same creation callback functions are used in both cases ("catch all" reception or not)
-} rx_param__ether_t;
-rx_param__ether_t ether_rx_param;
-
-
-void log_ether ( EtherSciMsg & ether )
-{
- logFunction();
-
- if (-1 != etherLogFileDescriptor)
- {
- /* Write the Ether SCI message into the Ether log file. */
- int length = 0;
- int totalLength = 0;
- int dataLength = (int)ether.getSpecializedSciMsgDataLength();
- unsigned char * pData = ether.getSpecializedSciMsgData();
- unsigned char data[ETH_PACKET_MIN_SIZE_ALLOWED];
- memset(data, 0x00, ETH_PACKET_MIN_SIZE_ALLOWED); // padding zero
- if (dataLength < ETH_PACKET_MIN_SIZE_ALLOWED)
- {
- memcpy(data, ether.getSpecializedSciMsgData(), ether.getSpecializedSciMsgDataLength());
- dataLength = ETH_PACKET_MIN_SIZE_ALLOWED;
- pData = data;
- }
- while(totalLength < dataLength)
- {
- length = write(etherLogFileDescriptor, pData + totalLength, dataLength - totalLength);
- if(length < 0)
- {
- if (EAGAIN != errno)
- {
- Error e(__PRETTY_FUNCTION__, "write Ether SCI message failed", errno);
- e.display();
- throw e;
- }
- else
- {
- length = 0;
- }
- }
- totalLength += length;
- }
- }
-}
-
-
-void set_fcall_cb ( const Msg & msg, object user_cb )
-{
- listOfCbs.insert(CbsList::value_type(msg.get_tx_msg_id(), user_cb));
-}
-
-
-void remove_fcall_cb ( const Msg & msg )
-{
- for (CbsList::const_iterator it = listOfCbs.begin(); it != listOfCbs.end(); ++it)
- {
- if (msg.get_tx_msg_id() == it->first)
- {
- listOfCbs.erase(it->first);
- break;
- }
- }
-}
-
-
-void recv_fcall_cb ( Msg & msg )
-{
- for (CbsList::const_iterator it = listOfCbs.begin(); it != listOfCbs.end(); ++it)
- {
- if (msg.get_rx_msg_id() == it->first)
- {
- (it->second)(msg);
- listOfCbs.erase(it->first);
- break;
- }
- }
-}
-
-
-void recv_phy_mpdu_cb ( PhySciMsgMpdu & mpdu )
-{
- logFunction();
-
- if (phy_rx_param.activated)
- {
- // Create a new MPDU Python object (PB)
- object rx_mpdu = phy_rx_param.create_pb();
-
- // Get PHY SCI message MPDU attributes
- // and set the MPDU object attributes
- // (FC 1.0, FC AV and MPDU payload)
- string payload((char *)mpdu.getSpecializedSciMsgData(), mpdu.getSpecializedSciMsgDataLength());
- rx_mpdu.attr("set_mpdu_attr")(mpdu.getFc10(),
- make_tuple(mpdu.getFcAv()[0], mpdu.getFcAv()[1], mpdu.getFcAv()[2], mpdu.getFcAv()[3]),
- payload);
-
- // Call the Python reception callback
- phy_rx_param.activated = !phy_rx_param.cb(rx_mpdu);
- }
-}
-
-
-void recv_ether_cb ( EtherSciMsg & ether )
-{
- logFunction();
-
- if ( (ETHERNET_TYPE_DATA == ether.getSpecializedSciMsgType())
- || (ETHERNET_TYPE_MME == ether.getSpecializedSciMsgType ()))
- {
- // Log the received Ether SCI message
- log_ether(ether);
- }
-
- if ( ether_rx_param.activated
- || ether_rx_param.catch_all_activated
- || (ETHERNET_TYPE_BUFFER_RELEASED == ether.getSpecializedSciMsgType()) )
- {
- // Get Ethernet SCI message attributes
- string payload((char *)ether.getSpecializedSciMsgData(), ether.getSpecializedSciMsgDataLength());
-
- /* Create a new MSDU Python object (Eth, MME or Buffer). */
- object rx_msdu;
- if (ETHERNET_TYPE_DATA == ether.getSpecializedSciMsgType())
- {
- rx_msdu = ether_rx_param.create_eth();
- }
- else if (ETHERNET_TYPE_MME == ether.getSpecializedSciMsgType())
- {
- rx_msdu = ether_rx_param.create_mme();
- }
- else if (ETHERNET_TYPE_BUFFER_RELEASED == ether.getSpecializedSciMsgType())
- {
- rx_msdu = ether_rx_param.create_buffer();
- }
- else
- {
- errno = ENOMSG;
- Error e (__PRETTY_FUNCTION__,
- "receive an Ether SCI message with a bad type \
- (should be DATA, MME or BUFFER_RELEASED)", errno);
- e.display();
- throw e;
- }
-
- if (ETHERNET_TYPE_BUFFER_RELEASED == ether.getSpecializedSciMsgType())
- {
- // Reallocate a buffer if requested by user
- rx_msdu.attr("realloc")(ether.getSciMsgStationId(), payload);
- }
-
- // Set the MSDU object attributes (payload)
- rx_msdu.attr("set_msdu_attr")(payload);
-
- if ( (ether_rx_param.catch_all_activated)
- && (ETHERNET_TYPE_BUFFER_RELEASED != ether.getSpecializedSciMsgType()) )
- {
- // Call the "catch all" Python reception callback before the other one,
- // because of the reception counter that should not be decremented before this call
- ether_rx_param.catch_all_cb (rx_msdu);
- }
-
- if (ether_rx_param.activated)
- {
- // Call the Python reception callback
- ether_rx_param.activated = !ether_rx_param.cb(rx_msdu);
- }
- }
-}
-
-/*
-void init_wrap ( Maximus & m, const int argc, const string args )
-{
- size_t previous = 0;
- size_t found = 0;
- char * argv[argc];
- int i = 0;
-
- do
- {
- found = args.find(' ', previous);
- string temp = args.substr(previous, found-previous);
- argv[i] = new char[temp.size()+1];
- strcpy(argv[i], temp.c_str());
- previous = found+1;
- i++;
- }
- while ((found != string::npos) && (i<argc));
-
- m.init(argc,argv);
-
- for (i=0; i<argc; i++)
- {
- delete [] argv[i];
- }
-}
-*/
-
-void init_wrap ( Maximus & m, object args )
-{
- int argc = len (args);
- /* std::string.c_str() returns a const, need a temporary storage because
- * of getopt. */
- std::vector<char> args_copy[argc];
- char *argv[argc];
- /* Make the argv array. */
- for (int i = 0; i < argc; i++)
- {
- const std::string s = extract<std::string> (args[i]);
- args_copy[i].insert (args_copy[i].end (), s.c_str (),
- s.c_str () + s.size () + 1);
- argv[i] = &args_copy[i][0];
- }
- /* Call the real function. */
- m.init (argc, argv);
-
- phy_rx_param.activated = false;
- ether_rx_param.activated = false;
- ether_rx_param.catch_all_activated = false;
- ether_rx_param.is_create_set = false;
- m.init_phy (&recv_phy_mpdu_cb);
- etherLogFileDescriptor = m.init_ether (&recv_ether_cb);
-}
-
-
-void uninit_wrap ( Maximus & m )
-{
- /* Free all resources. */
- m.stop();
-}
-
-
-PyObject * create_sta_wrapx1 ( Maximus & m )
-{
- return_internal_reference<1, Maximus>::result_converter::apply<Sta &>::type converter;
- return converter(m.create_sta());
-}
-
-
-PyObject * create_sta_wrapx2 ( Maximus & m, const string & station_executable )
-{
- return_internal_reference<1, Maximus>::result_converter::apply<Sta &>::type converter;
- return converter(m.create_sta(station_executable));
-}
-
-
-PyObject * create_sta_wrapx3 ( Maximus & m, const string & station_executable, uint32_t seed )
-{
- return_internal_reference<1, Maximus>::result_converter::apply<Sta &>::type converter;
- return converter(m.create_sta(station_executable, seed));
-}
-
-
-PyObject * create_fcall_wrap ( Maximus & m, const string name )
-{
- return_internal_reference<1, Maximus>::result_converter::apply<Msg &>::type converter;
- return converter(m.create_fc(name));
-}
-
-
-PyObject * create_probe_wrap ( Maximus & m )
-{
- return_internal_reference<1, Maximus>::result_converter::apply<Msg &>::type converter;
- return converter(m.create_probe());
-}
-
-
-void send_phy ( Maximus & m, object mpdu )
-{
- /* Create a PHY SCI message MPDU. */
- PhySciMsgMpdu * pMpdu = m.create_mpdu();
-
- /* Extract MPDU object attributes
- * and set the PHY SCI message MPDU attributes. */
-
- // Extract and set FC 1.0
- uint32_t fc_10 = extract<uint32_t>(mpdu.attr("fc_10"));
- if (0 != fc_10)
- {
- pMpdu->setFc10(fc_10);
- }
-
- // Extract and set FC AV
- uint32_t fc_av[4];
- for (int i=0; i<4; i++)
- {
- fc_av[i] = extract<uint32_t>(mpdu.attr("fc_av")[i]);
- }
- pMpdu->setFcAv(fc_av);
-
- // Extract MPDU payload and set MPDU payload length and MPDU payload
- string payload = extract<string>(mpdu.attr("payload"));
- pMpdu->setMpdu((unsigned long)payload.length(), (unsigned char *)payload.c_str());
-
- // Set MPDU format
- // HomePlug AV specs => delimiter type (DT_AV) is described by bits 0-2 of first fc_av octet:
- // 000 Beacon
- // 001 SOF
- // 010 SACK
- // 011 RTS/CTS
- // 100 SOUND
- // 101 RSOF
- pMpdu->setMpduFormat((Phy_Mpdu_Format)((fc_av[0] & 0x07) + 1)); // +1 to have the correspondance with our own MPDU format definition (of 'phy_types.h')
-
- // Extract and set FC mode
- int fc_mode = extract<int>(mpdu.attr("fc_mode"));
- if ( PHY_FC_MODE_NONE == (Phy_Fc_Mode)fc_mode )
- {
- if (0 == fc_10)
- {
- fc_mode = PHY_FC_MODE_AV_1;
- }
- else
- {
- fc_mode = PHY_FC_MODE_HYBRID_1;
- }
- }
- pMpdu->setFcMode((Phy_Fc_Mode)fc_mode);
-
- // Extract and set short PPDU
- pMpdu->setShortPpdu((Phy_Short_Ppdu)extract<int>(mpdu.attr("short_ppdu")));
-
- // Set default flags
- pMpdu->setFlags(PHY_FLAG_CRC_OK);
-
- if (!pMpdu->getShortPpdu())
- {
- // Extract and set modulation
- int mod = extract<int>(mpdu.attr("mod"));
- if (PHY_MOD_TM == (Phy_Mod)mod)
- {
- errno = EINVAL;
- Error e(__PRETTY_FUNCTION__, "modulation cannot be set to PHY_MOD_TM", errno);
- e.display();
- throw e;
- }
- else if ((PHY_MOD_NONE == (Phy_Mod)mod) && (MAC_PB136_BYTES >= payload.length()))
- {
- mod = PHY_MOD_MINI_ROBO;
- }
- else if ((PHY_MOD_NONE == (Phy_Mod)mod) && (MAC_PB136_BYTES < payload.length()))
- {
- mod = PHY_MOD_ROBO;
- }
- pMpdu->setMod((Phy_Mod)mod);
-
- // Set default FEC rate
- pMpdu->setFecrate(PHY_FEC_RATE_1_2);
-
- if (PHY_MOD_MINI_ROBO == pMpdu->getMod())
- {
- // Set default Guard Interval
- pMpdu->setGil(PHY_GIL_567);
- // Set default PB size
- pMpdu->setPbSize(MAC_PB136_BYTES);
- }
- else
- {
- // Set default Guard Interval
- pMpdu->setGil(PHY_GIL_417);
- // Set default PB size
- pMpdu->setPbSize(MAC_PB520_BYTES);
- // Set default flags
- pMpdu->setFlags(PHY_FLAG_CRC_OK+PHY_FLAG_PB512);
- }
- }
-
- // Extract and set PB Header
- uint32_t pbHeader = extract<uint32_t>(mpdu.attr("first_pb_header"));
- if (0 != pbHeader)
- {
- unsigned short int mfboCounter = 1;
- unsigned long mfbo = extract<unsigned long>(mpdu.attr("mfbo")[mfboCounter]);
- for (unsigned short int n=0; n<MAC_MAX_PB_PER_MPDU; n++)
- {
- if (0 != n)
- {
- while ( (0 != mfbo) && (mfbo < (unsigned long)(n * pMpdu->getPbSize())) )
- {
- // increment MFBO counter
- mfboCounter++;
- // extract MFBO
- mfbo = extract<unsigned long>(mpdu.attr("mfbo")[mfboCounter]);
- }
-
- // extract MFBO
- if ( (0 != mfbo) && (mfbo < (unsigned long)((n + 1) * pMpdu->getPbSize())) )
- {
- // set MFBF
- pbHeader |= (1 << 27);
- // set MFB0
- pbHeader += ((mfbo % pMpdu->getPbSize()) << 16);
- }
- }
-
- // set PBs Headers
- pMpdu->setPbsHeaders(n, pbHeader);
-
- // reset MFBF and MFBO, and increment SSN
- if (0xFFFF > (pbHeader & 0xFFFF))
- {
- pbHeader = (pbHeader & 0xF600FFFF) + 1;
- }
- else
- {
- pbHeader &= 0xF6000000;
- }
- }
- }
-
- /* Send the PHY SCI message MPDU. */
- m.send_mpdu(pMpdu);
- while (!pMpdu->isSent())
- {
- m.process();
- }
-
- /* Delete the PHY SCI message MPDU. */
- if (NULL != pMpdu)
- {
- delete (pMpdu);
- pMpdu = NULL;
- }
-}
-
-
-void set_phy_rx ( Maximus & m, object user_cb, object create_pb_function )
-{
- phy_rx_param.cb = user_cb;
- phy_rx_param.create_pb = create_pb_function;
- phy_rx_param.activated = true;
-}
-
-
-void send_ether ( Maximus & m, object msdu, int station_id )
-{
- /* Create an Ether SCI message. */
- EtherSciMsg * pEther = m.create_ether();
-
- /* Set the Ether SCI message attributes. */
-
- // Extract MSDU payload and set Ether SCI message payload length and Ether SCI message payload
- string payload = extract<string>(msdu.attr("get")());
- pEther->setSpecializedSciMsgDataLength((unsigned long)payload.length());
- pEther->setSpecializedSciMsgData((unsigned char *)payload.c_str());
-
- // Set Ether SCI message type
- int type = extract<int>(msdu.attr("get_ether_type")());
- pEther->setSpecializedSciMsgType(static_cast<Ethernet_Type>(type));
-
- // Set station ID
- pEther->setSciMsgStationId(static_cast<Sci_Msg_Station_Id>(station_id));
-
- if ( (ETHERNET_TYPE_DATA == pEther->getSpecializedSciMsgType())
- || (ETHERNET_TYPE_MME == pEther->getSpecializedSciMsgType()) )
- {
- /* Log the Ether SCI message to send. */
- log_ether(*pEther);
- }
-
- /* Send the Ether SCI message. */
- m.send_ether(*pEther);
-
- /* Delete the Ether SCI message. */
- if (NULL != pEther)
- {
- delete (pEther);
- pEther = NULL;
- }
-}
-
-void set_ether_rx_catch_all ( Maximus & m,
- object user_cb,
- object create_eth_function,
- object create_mme_function,
- object create_buffer_function)
-{
- ether_rx_param.catch_all_cb = user_cb;
- ether_rx_param.catch_all_activated = true;
- if (!ether_rx_param.is_create_set)
- {
- ether_rx_param.create_eth = create_eth_function;
- ether_rx_param.create_mme = create_mme_function;
- ether_rx_param.create_buffer = create_buffer_function;
- ether_rx_param.is_create_set = true;
- }
-}
-
-void reset_ether_rx_catch_all ( Maximus & m )
-{
- ether_rx_param.catch_all_activated = false;
-}
-
-void set_ether_rx ( Maximus & m,
- object user_cb,
- object create_eth_function,
- object create_mme_function,
- object create_buffer_function)
-{
- ether_rx_param.cb = user_cb;
- ether_rx_param.activated = true;
- if (!ether_rx_param.is_create_set)
- {
- ether_rx_param.create_eth = create_eth_function;
- ether_rx_param.create_mme = create_mme_function;
- ether_rx_param.create_buffer = create_buffer_function;
- ether_rx_param.is_create_set = true;
- }
-}
-
-
-PyObject * add_param_bool ( Msg & msg, const string name, const bool value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- msg.add_param<bool>(name, value);
- return converter(msg);
-}
-
-
-PyObject * add_param_uchar ( Msg & msg, const string name, const unsigned char value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- msg.add_param(name, sizeof(unsigned char), &value);
- return converter(msg);
-}
-
-
-PyObject * add_param_ushort ( Msg & msg, const string name, const unsigned short int value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- msg.add_param<unsigned short int>(name, value);
- return converter(msg);
-}
-
-
-PyObject * add_param_ulong ( Msg & msg, const string name, const unsigned long int value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- msg.add_param<unsigned long int>(name, value);
- return converter(msg);
-}
-
-
-PyObject * add_param_ull ( Msg & msg, const string name, const unsigned long long value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- msg.add_param<unsigned long long>(name, value);
- return converter(msg);
-}
-
-
-PyObject * add_param_n_u8 ( Msg & msg, const string name, tuple value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- unsigned long length = (unsigned long)len(value);
- unsigned char param[length];
- for (unsigned long i=0; i<length; i++)
- {
- param[i] = extract<unsigned char>(value[i]);
- }
- msg.add_param(name, length*sizeof(unsigned char), param);
- return converter(msg);
-}
-
-
-PyObject * add_param_n_u16 ( Msg & msg, const string name, tuple value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- unsigned long length = (unsigned long)len(value);
- unsigned short int param[length];
- for (unsigned long i=0; i<length; i++)
- {
- param[i] = htons(extract<unsigned short int>(value[i]));
- }
- msg.add_param(name, length*sizeof(unsigned short int), (unsigned char *)&param);
- return converter(msg);
-}
-
-
-PyObject * add_param_n_u32 ( Msg & msg, const string name, tuple value )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- unsigned long length = (unsigned long)len(value);
- unsigned long int param[length];
- for (unsigned long i=0; i<length; i++)
- {
- param[i] = htonl(extract<unsigned long int>(value[i]));
- }
- msg.add_param(name, length*sizeof(unsigned long int), (unsigned char *)&param);
- return converter(msg);
-}
-
-
-PyObject * set_cb_wrap ( Msg & msg, object user_cb )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- remove_fcall_cb(msg);
- set_fcall_cb(msg, user_cb);
- msg.set_cb(&recv_fcall_cb);
- return converter(msg);
-}
-
-
-PyObject * remove_cb_wrap ( Msg & msg )
-{
- copy_non_const_reference::apply<Msg &>::type converter;
- remove_fcall_cb(msg);
- msg.remove_cb();
- return converter(msg);
-}
-
-
-string bind_param ( Msg & msg, const string name )
-{
- string str;
- unsigned long ulLength = FUNCTION_CALL_PARAM_MAX_SIZE;
- unsigned char ucValue[ulLength];
- if (NULL != msg.bind_param(name, ulLength, ucValue))
- {
- str.assign((char *)ucValue, ulLength);
- }
- return str;
-}
-
-
-string bind_param_string ( Msg & msg, const string name )
-{
- string str(bind_param(msg, name));
- if ( (0 < str.length()) && ('\0' == str[str.length()-1]) )
- {
- str.erase(str.length()-1);
- }
- return str;
-}
-
-
-bool bind_param_bool ( Msg & msg, const string name )
-{
- return msg.bind_param<bool>(name);
-}
-
-
-unsigned short int bind_param_ushort ( Msg & msg, const string name )
-{
- return msg.bind_param<unsigned short int>(name);
-}
-
-
-unsigned long int bind_param_ulong ( Msg & msg, const string name )
-{
- return msg.bind_param<unsigned long int>(name);
-}
-
-
-unsigned long long bind_param_ull ( Msg & msg, const string name )
-{
- return msg.bind_param<unsigned long long>(name);
-}
-
-
-tuple bind_param_n_u8 ( Msg & msg, const string name )
-{
- tuple t = make_tuple();
- string str(bind_param(msg, name));
- for (unsigned int n=0; n<str.length(); n+=sizeof(u8))
- {
- t += make_tuple((u8)str[n]);
- }
- return t;
-}
-
-
-tuple bind_param_n_u16 ( Msg & msg, const string name )
-{
- tuple t = make_tuple();
- string str(bind_param(msg, name));
- for (unsigned int n=0; n<str.length(); n+=sizeof(u16))
- {
- if (str.length() <= n+1)
- {
- Error e(__PRETTY_FUNCTION__, "error when binding parameter");
- e.display();
- throw e;
- }
- t += make_tuple((u16)(((u8)str[n] << 8) + (u8)str[n+1]));
- }
- return t;
-}
-
-
-tuple bind_param_n_u32 ( Msg & msg, const string name )
-{
- tuple t = make_tuple();
- string str(bind_param(msg, name));
- for (unsigned int n=0; n<str.length(); n+=sizeof(u32))
- {
- if (str.length() <= n+3)
- {
- Error e(__PRETTY_FUNCTION__, "error when binding parameter");
- e.display();
- throw e;
- }
- t += make_tuple((u32)(((u8)str[n] << 24) + ((u8)str[n+1] << 16) + ((u8)str[n+2] << 8) + (u8)str[n+3]));
- }
- return t;
-}
-
-
-BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(disturb_channel_overloads, Maximus::disturb_channel, 0, 1)
-
-BOOST_PYTHON_MODULE(interface)
-{
- /* class Maximus */
-
- void (Maximus::*waitx1)(const tick_t) = &Maximus::wait;
- void (Maximus::*waitx2)(void) = &Maximus::wait;
-
- void (Maximus::*set_snrx1)(const float) = &Maximus::set_snr;
- void (Maximus::*set_snrx2)(const string &) = &Maximus::set_snr;
- void (Maximus::*set_snr_from_srcx1)(const float, const Sta &, const bool) = &Maximus::set_snr_from_src;
- void (Maximus::*set_snr_from_srcx2)(const string &, const Sta &, const bool) = &Maximus::set_snr_from_src;
- void (Maximus::*set_snr_to_dstx1)(const float, const Sta &, const bool) = &Maximus::set_snr_to_dst;
- void (Maximus::*set_snr_to_dstx2)(const string &, const Sta &, const bool) = &Maximus::set_snr_to_dst;
- void (Maximus::*set_snr_from_src_to_dstx1)(const float, const Sta &, const Sta &, const bool) = &Maximus::set_snr_from_src_to_dst;
- void (Maximus::*set_snr_from_src_to_dstx2)(const string &, const Sta &, const Sta &, const bool) = &Maximus::set_snr_from_src_to_dst;
-
- class_<Maximus, boost::noncopyable>("Maximus")
- .def("init", init_wrap)
- .def("uninit", uninit_wrap)
- .def("process", &Maximus::process)
- .def("create_sta", create_sta_wrapx1) // create a station with the default station executable (from command line arguments)
- .def("create_sta", create_sta_wrapx2) // create a station with an explicit station executable
- .def("create_sta", create_sta_wrapx3) // create a station with an explicit station executable and with a seed
- .def("create_fcall", create_fcall_wrap)
- .def("create_probe", create_probe_wrap)
- .def("send_mpdu", send_phy)
- .def("set_mpdu_rx", set_phy_rx)
- .def("send_msdu", send_ether)
- .def("set_msdu_rx", set_ether_rx)
- .def("set_msdu_rx_catch_all", set_ether_rx_catch_all)
- .def("reset_msdu_rx_catch_all", reset_ether_rx_catch_all)
- .def("wait", waitx1)
- .def("wait", waitx2)
- .def("disturb_channel", &Maximus::disturb_channel, disturb_channel_overloads())
- .def("get_date", &Maximus::get_date)
- .def("set_freq", &Maximus::set_freq)
- .def("get_freq", &Maximus::get_freq)
- .def("set_snr", set_snrx1)
- .def("set_snr", set_snrx2)
- .def("set_snr_from_src", set_snr_from_srcx1)
- .def("set_snr_from_src", set_snr_from_srcx2)
- .def("set_snr_to_dst", set_snr_to_dstx1)
- .def("set_snr_to_dst", set_snr_to_dstx2)
- .def("set_snr_from_src_to_dst", set_snr_from_src_to_dstx1)
- .def("set_snr_from_src_to_dst", set_snr_from_src_to_dstx2)
- .def("activate_false_alarm", &Maximus::activate_false_alarm)
- .def("deactivate_false_alarm", &Maximus::deactivate_false_alarm)
- .def("is_station_idle", &Maximus::is_station_idle)
- .def ("hide_sta", &Maximus::hide_sta)
- ;
-
- /* class Sta */
-
- class_<Sta>("Sta", init< Maximus *, ISystem *, const string &, optional<uint32_t> >())
- .def("remove", &Sta::remove)
- .def("deactivate", &Sta::deactivate)
- .def("activate", &Sta::activate)
- .def("debug", &Sta::debug)
- .def("is_idle", &Sta::is_idle)
- .def("get_station_id", &Sta::getStationId)
- .def("set_name", &Sta::set_name)
- ;
-
- /* class Msg */
-
- Msg & (Msg::*add_paramx1)(const string &) = &Msg::add_param;
- Msg & (Msg::*add_paramx2)(const string &, const string &) = &Msg::add_param;
-
- void (Msg::*send_asyncx1)(void) = &Msg::send_async;
- void (Msg::*send_asyncx2)(Sta &) = &Msg::send_async;
-
- Msg & (Msg::*sendx1)(void) = &Msg::send;
- Msg & (Msg::*sendx2)(Sta &) = &Msg::send;
-
- class_<Msg>("Msg", init< Maximus *, IFunctionCall *, ISystem *, optional<const string &> >())
- .def("add_param", add_paramx1, return_value_policy<copy_non_const_reference>())
- .def("add_param", add_paramx2, return_value_policy<copy_non_const_reference>())
- .def("add_param_bool", add_param_bool)
- .def("add_param_uchar", add_param_uchar)
- .def("add_param_ushort", add_param_ushort)
- .def("add_param_ulong", add_param_ulong)
- .def("add_param_ull", add_param_ull)
- .def("add_param_n_u8", add_param_n_u8)
- .def("add_param_n_u16", add_param_n_u16)
- .def("add_param_n_u32", add_param_n_u32)
- .def("remove_param", &Msg::remove_param, return_value_policy<copy_non_const_reference>())
- .def("set_cb", set_cb_wrap)
- .def("remove_cb", remove_cb_wrap)
- .def("set_sta", &Msg::set_sta, return_value_policy<copy_non_const_reference>())
- .def("send_async", send_asyncx1)
- .def("send_async", send_asyncx2)
- .def("send", sendx1, return_value_policy<copy_non_const_reference>())
- .def("send", sendx2, return_value_policy<copy_non_const_reference>())
- .def("is_param", &Msg::is_param)
- .def("bind_param", bind_param)
- .def("bind_param_string", bind_param_string)
- .def("bind_param_bool", bind_param_bool)
- .def("bind_param_ushort", bind_param_ushort)
- .def("bind_param_ulong", bind_param_ulong)
- .def("bind_param_ull", bind_param_ull)
- .def("bind_param_n_u8", bind_param_n_u8)
- .def("bind_param_n_u16", bind_param_n_u16)
- .def("bind_param_n_u32", bind_param_n_u32)
- ;
-
-}
-
diff --git a/cesar/maximus/python/utest/Makefile b/cesar/maximus/python/utest/Makefile
new file mode 100644
index 0000000000..bccd23c498
--- /dev/null
+++ b/cesar/maximus/python/utest/Makefile
@@ -0,0 +1,9 @@
+all:
+ make -C ..
+ make -C stationtest
+ make -C prototest/fcall
+
+clean:
+ make -C .. clean
+ make -C stationtest clean
+ make -C prototest/fcall clean
diff --git a/cesar/maximus/prototest/fcall/Config b/cesar/maximus/python/utest/prototest/fcall/Config
index 774a09dced..774a09dced 100644
--- a/cesar/maximus/prototest/fcall/Config
+++ b/cesar/maximus/python/utest/prototest/fcall/Config
diff --git a/cesar/maximus/prototest/fcall/Makefile b/cesar/maximus/python/utest/prototest/fcall/Makefile
index aa345c6eef..37edfb22bf 100644
--- a/cesar/maximus/prototest/fcall/Makefile
+++ b/cesar/maximus/python/utest/prototest/fcall/Makefile
@@ -1,4 +1,4 @@
-BASE = ../../..
+BASE = ../../../../..
ECOS = y
diff --git a/cesar/maximus/prototest/fcall/ecos.ecc.sh b/cesar/maximus/python/utest/prototest/fcall/ecos.ecc.sh
index 2443d0e40f..2443d0e40f 100644
--- a/cesar/maximus/prototest/fcall/ecos.ecc.sh
+++ b/cesar/maximus/python/utest/prototest/fcall/ecos.ecc.sh
diff --git a/cesar/maximus/prototest/fcall/inc/syscall.h b/cesar/maximus/python/utest/prototest/fcall/inc/syscall.h
index 0e4d28d233..b62e687a2d 100644
--- a/cesar/maximus/prototest/fcall/inc/syscall.h
+++ b/cesar/maximus/python/utest/prototest/fcall/inc/syscall.h
@@ -119,7 +119,7 @@ static inline int mknod(const char *pathname, mode_t mode, dev_t dev)
result = -1;
}
return result;
-}
+}
static inline int unlink(const char *pathname)
{
diff --git a/cesar/maximus/prototest/fcall/src/test_fcall.c b/cesar/maximus/python/utest/prototest/fcall/src/test_fcall.c
index 2c2e800398..8e3e5d7b8c 100644
--- a/cesar/maximus/prototest/fcall/src/test_fcall.c
+++ b/cesar/maximus/python/utest/prototest/fcall/src/test_fcall.c
@@ -22,7 +22,7 @@
#include "interface/fcall/inc/interface_fcall.h"
#include "lib/swap.h" // for 'swap16()' and 'swap32()'
#include "lib/read_word.h" // for 'read_u16_from_word()'
-#include "maximus/prototest/fcall/inc/syscall.h"
+#include "inc/syscall.h"
#define MY_THREAD_STACK_SIZE (8192 / sizeof(int))
@@ -109,7 +109,7 @@ my_return_function (void *data)
fcall_param_add(&return_param, &return_msg, "result_2", sizeof(my_type_t), &my_param4);
fcall_return(ctx->fcall_ctx, &return_param, &return_msg);
- return;
+ return;
}
int
@@ -148,8 +148,8 @@ my_function1 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *
/* my_return_function() call */
my_return_function(&asynchronous_msg_id);
- /* now return */
- return 0;
+ /* now return */
+ return 0;
}
int
@@ -157,7 +157,7 @@ my_function2 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *
{
bool my_param5;
char my_result1[] = "this is result 1\0";
-
+
/* get parameters content */
if (-1 == fcall_param_bind(*param, *msg, "param_5", sizeof(bool), &my_param5))
{
@@ -171,8 +171,8 @@ my_function2 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *
/* now make the return parameter list */
fcall_param_reset(*param);
fcall_param_add(*param, *msg, "result_1", strlen(my_result1)+1, &my_result1);
-
- return 0;
+
+ return 0;
}
void
@@ -197,61 +197,61 @@ my_function_rsp (void *data)
fcall_param_reset(&return_param);
fcall_return(ctx->fcall_ctx, &return_param, &return_msg);
- return;
+ return;
}
int
my_function3 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
{
unsigned short asynchronous_msg_id = 0;
-
+
/* do other tasks ... */
diag_write_string("=> my_function3\n");
-
+
/* prepare the future asynchronous return */
fcall_param_set_async(*param, 1);
asynchronous_msg_id = (*param)->msg_id;
-
+
/* call my_function_rsp() */
my_function_rsp((void*)&asynchronous_msg_id);
-
- return 0;
+
+ return 0;
}
int
my_function4 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
{
unsigned short asynchronous_msg_id = 0;
-
+
/* do other tasks ... */
diag_write_string("=> my_function4\n");
/* prepare the future asynchronous return */
fcall_param_set_async(*param, 1);
asynchronous_msg_id = (*param)->msg_id;
-
+
/* call my_function_rsp() */
my_function_rsp((void*)&asynchronous_msg_id);
-
- return 0;
+
+ return 0;
}
int
my_function5 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
{
unsigned short asynchronous_msg_id = 0;
-
+
/* do other tasks ... */
diag_write_string("=> my_function5\n");
/* prepare the future asynchronous return */
fcall_param_set_async(*param, 1);
asynchronous_msg_id = (*param)->msg_id;
-
+
/* call my_function_rsp() */
my_function_rsp((void*)&asynchronous_msg_id);
-
- return 0;
+
+ return 0;
}
void
diff --git a/cesar/maximus/python/utest/py/memory.py b/cesar/maximus/python/utest/py/memory.py
new file mode 100644
index 0000000000..fd632edf5f
--- /dev/null
+++ b/cesar/maximus/python/utest/py/memory.py
@@ -0,0 +1,79 @@
+#! usr/bin/env python
+
+import sys
+sys.path.append ('../obj')
+
+from interface import *
+import unittest
+
+sta_bin = "stationtest/obj/stationtest.elf"
+args = sys.argv
+
+class ObjectMemoryTest (unittest.TestCase):
+
+ def test_01_max_alone (self):
+ maximus = Maximus ()
+ maximus.init (args)
+ maximus.uninit ()
+ del maximus
+
+ def test_02_sta_max (self):
+ maximus = Maximus ()
+ maximus.init (args)
+ stationB = maximus.create_sta (sta_bin)
+ del stationB
+ self.assertEqual (0, maximus.get_nb_sta ())
+ maximus.uninit ()
+ del maximus
+
+ def test_03_max_sta (self):
+ maximus = Maximus ()
+ maximus.init (args)
+ stationA = maximus.create_sta (sta_bin)
+ maximus.uninit ()
+ del maximus
+ del stationA
+
+ def test_04_sta_max_sta (self):
+ maximus = Maximus ()
+ maximus.init (args)
+ stationB = maximus.create_sta (sta_bin)
+ stationA = stationB
+ self.assertEqual (1, maximus.get_nb_sta ())
+ del stationB
+ self.assertEqual (1, maximus.get_nb_sta ())
+ maximus.uninit ()
+ del maximus
+ del stationA
+
+ def test_05_many_sta (self):
+ maximus = Maximus ()
+ maximus.init (args)
+ for i in range (3):
+ sta = maximus.create_sta (sta_bin)
+ self.assertEqual (1, maximus.get_nb_sta ())
+ maximus.uninit ()
+ del maximus
+
+ def test_06_classic (self):
+ maximus = Maximus ()
+ maximus.init (args)
+ sta = list ()
+ for i in range (3):
+ sta.append (maximus.create_sta (sta_bin))
+ self.assertEqual (3, maximus.get_nb_sta ())
+
+ def test_07_all (self):
+ maximus = Maximus ()
+ maximus.init (args)
+ a = maximus.create_sta (sta_bin)
+ b = maximus.create_fcall ("I want to eat croissants")
+ c = maximus.create_probe ()
+ maximus.uninit ()
+ del maximus
+ del a, b, c
+
+if __name__ == '__main__':
+ suite = unittest.TestLoader().loadTestsFromTestCase(ObjectMemoryTest)
+ testResult = unittest.TextTestRunner(verbosity=2).run(suite)
+ sys.exit ((1, 0)[testResult.wasSuccessful ()])
diff --git a/cesar/maximus/python/py/script_example.py b/cesar/maximus/python/utest/script_1/script_example.py
index 39d7e38f53..71da6258d4 100644
--- a/cesar/maximus/python/py/script_example.py
+++ b/cesar/maximus/python/utest/script_1/script_example.py
@@ -1,8 +1,7 @@
#! usr/bin/env python
import sys
-sys.path.append('./test')
-sys.path.append('../test')
+sys.path.append('script_2')
import startup
@@ -32,9 +31,6 @@ stationC = maximus.create_sta()
# Launch a debugger attached to station B.
stationB.debug()
-# Send an asynchronous function message to station A.
-#
-
# Create a function message and set the name of the function to call of station A.
fc1 = maximus.create_fcall("function_1")
@@ -66,7 +62,7 @@ fc1.send_async()
# Send a synchronous function message to station B.
-# Create a function message and set the name of the function to call into station B.
+# Create a et the name of the function to call into station B.
fc2 = maximus.create_fcall("function_2")
# Add a first parameter to the created message.
@@ -86,7 +82,8 @@ probe1.add_param_ulong("param_6", param6)
probe1.send(stationB)
# Get a parameter value from station B.
-probe2 = maximus.create_probe().add_param("param_7")
+probe2 = maximus.create_probe()
+probe2.add_param("param_7")
probe2.send(stationB)
param7 = probe2.bind_param_ulong("param_7")
print "param 7 =",param7
@@ -94,6 +91,7 @@ print "param 7 =",param7
# Get the same parameter value from station C, re-using existing message.
probe2.send(stationC)
+
# Send asynchronous function message(s) to station B.
if 456 == param7:
fc3 = maximus.create_fcall("function_3")
@@ -110,7 +108,7 @@ maximus.wait()
# Get list of all registered parameters of stations C.
probe3 = maximus.create_probe()
-probe3.send(stationC)
+probe3.send (stationC)
if probe3.is_param("param_8"):
# Get parameter 8 value and set parameter 9 value of station C.
probe4 = maximus.create_probe()
@@ -130,9 +128,9 @@ stationD = maximus.create_sta()
maximus.wait(1000000)
# Remove stations.
-stationA.remove()
-stationB.remove()
-stationC.remove()
-stationD.remove()
+del stationA
+del stationB
+del stationC
+del stationD
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/py/test_cb.py b/cesar/maximus/python/utest/script_1/test_cb.py
index 2754f33e9a..99f39daf30 100644
--- a/cesar/maximus/python/py/test_cb.py
+++ b/cesar/maximus/python/utest/script_1/test_cb.py
@@ -1,8 +1,7 @@
#! usr/bin/env python
import sys
-sys.path.append('./test')
-sys.path.append('../test')
+sys.path.append('script_2')
import startup
@@ -77,6 +76,6 @@ msg.send (sta)
c (m, msg)
msg.send (sta)
-sta.remove()
+del sta
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/py/test_ether.py b/cesar/maximus/python/utest/script_1/test_ether.py
index 7168bd642a..306f94e65e 100644
--- a/cesar/maximus/python/py/test_ether.py
+++ b/cesar/maximus/python/utest/script_1/test_ether.py
@@ -1,8 +1,7 @@
#!/usr/bin/python
import sys
-sys.path.append('./test')
-sys.path.append('../test')
+sys.path.append('script_2')
import startup
from interface import *
@@ -156,6 +155,6 @@ fcall2 = m.create_fcall('uninit_ether')
fcall2.send(sta1)
# Remove station(s)
-sta1.remove()
+del sta1
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/py/test_false_alarm.py b/cesar/maximus/python/utest/script_1/test_false_alarm.py
index 692bc25300..c450aab7ee 100644
--- a/cesar/maximus/python/py/test_false_alarm.py
+++ b/cesar/maximus/python/utest/script_1/test_false_alarm.py
@@ -1,8 +1,7 @@
#!/usr/bin/python
import sys
-sys.path.append('./test')
-sys.path.append('../test')
+sys.path.append('script_2')
import startup
from interface import *
@@ -35,18 +34,30 @@ m.activate_false_alarm(duration, deviation)
# Activate RX in Hybrid Mode for sta1
fc_mode_10 = 0 # PHY_FC_MODE_HYBRID_1
-m.create_fcall('activate_rx').add_param_ushort("fc_mode", fc_mode_10).add_param_bool("pre_detection", True).send(sta1)
+fcall = m.create_fcall('activate_rx')
+fcall.add_param_ushort("fc_mode", fc_mode_10)
+fcall.add_param_bool("pre_detection", True)
+fcall.send(sta1)
# Activate RX in AV Only Mode for sta2
fc_mode_av = 2 # PHY_FC_MODE_AV_1
-m.create_fcall('activate_rx').add_param_ushort("fc_mode", fc_mode_av).add_param_bool("pre_detection", True).send(sta2)
+fcall = m.create_fcall('activate_rx')
+fcall.add_param_ushort("fc_mode", fc_mode_av)
+fcall.add_param_bool("pre_detection", True)
+fcall.send(sta2)
# Wait 1200 ticks for preamble detection => first wrong preamble
m.wait(1200)
# Activate RX for both stations
-m.create_fcall('activate_rx').add_param_ushort("fc_mode", fc_mode_10).add_param_bool("pre_detection", True).send(sta1)
-m.create_fcall('activate_rx').add_param_ushort("fc_mode", fc_mode_av).add_param_bool("pre_detection", True).send(sta2)
+fcall = m.create_fcall('activate_rx')
+fcall.add_param_ushort("fc_mode", fc_mode_10)
+fcall.add_param_bool ("pre_detection", True)
+fcall.send(sta1)
+fcall = m.create_fcall('activate_rx')
+fcall.add_param_ushort("fc_mode", fc_mode_av)
+fcall.add_param_bool("pre_detection", True)
+fcall.send(sta2)
# Wait 1200 ticks for preamble detection => second wrong preamble
m.wait(1200)
@@ -55,18 +66,26 @@ m.wait(1200)
m.deactivate_false_alarm()
# Deactivate preamble detection for both stations
-m.create_fcall('activate_rx').add_param_ushort("fc_mode", fc_mode_10).add_param_bool("pre_detection", False).send(sta1)
-m.create_fcall('activate_rx').add_param_ushort("fc_mode", fc_mode_av).add_param_bool("pre_detection", False).send(sta2)
+fcall = m.create_fcall('activate_rx')
+fcall.add_param_ushort("fc_mode", fc_mode_10)
+fcall.add_param_bool("pre_detection", False)
+fcall.send(sta1)
+fcall = m.create_fcall('activate_rx')
+fcall.add_param_ushort("fc_mode", fc_mode_av)
+fcall.add_param_bool("pre_detection", False)
+fcall.send(sta2)
# Wait to check that there are no more wrong preambles sent
m.wait(150)
# Uninit HAL PHY
-m.create_fcall('uninit_phy').send(sta1)
-m.create_fcall('uninit_phy').send(sta2)
+fcall = m.create_fcall('uninit_phy')
+fcall.send(sta1)
+fcall = m.create_fcall('uninit_phy')
+fcall.send(sta2)
# Remove station(s)
-sta1.remove()
-sta2.remove()
+del sta1
+del sta2
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/py/test_log.py b/cesar/maximus/python/utest/script_1/test_log.py
index 4848256600..be8eedeafd 100644
--- a/cesar/maximus/python/py/test_log.py
+++ b/cesar/maximus/python/utest/script_1/test_log.py
@@ -3,8 +3,7 @@
import sys, unittest
# for maximus package
-sys.path.append('../python')
-sys.path.append('../../python')
+sys.path.append('../')
# for interface module
sys.path.append('./obj')
@@ -29,7 +28,7 @@ class TestSTAFunctions (unittest.TestCase):
def tearDown (self):
# Remove station
m.create_fcall ("uninit_ether").send (self.station.get ())
- self.station.remove ()
+ del self.station
def testLog (self):
m.wait (1000000)
diff --git a/cesar/maximus/python/py/test_proto.py b/cesar/maximus/python/utest/script_1/test_proto.py
index 72839007c5..07a09b521e 100644
--- a/cesar/maximus/python/py/test_proto.py
+++ b/cesar/maximus/python/utest/script_1/test_proto.py
@@ -132,10 +132,10 @@ stationD = maximus.create_sta("dd:dd:dd:dd:dd:dd")
maximus.wait(1000000)
# Remove stations.
-stationA.remove()
-stationB.remove()
-stationC.remove()
-stationD.remove()
+del stationA
+del stationB
+del stationC
+del stationD
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/py/test_proto_register.py b/cesar/maximus/python/utest/script_1/test_proto_register.py
index 2855d7f17a..c9e7f45c3f 100644
--- a/cesar/maximus/python/py/test_proto_register.py
+++ b/cesar/maximus/python/utest/script_1/test_proto_register.py
@@ -1,8 +1,7 @@
#! usr/bin/env python
import sys
-sys.path.append('../../hal/phy/test/phy/py')
-sys.path.append('lib/proto')
+sys.path.append('../../../../hal/phy/test/phy/py')
# REGISTER TEST
diff --git a/cesar/maximus/python/py/test_send_mpdu.py b/cesar/maximus/python/utest/script_1/test_send_mpdu.py
index 59136bd892..fac8692b39 100644
--- a/cesar/maximus/python/py/test_send_mpdu.py
+++ b/cesar/maximus/python/utest/script_1/test_send_mpdu.py
@@ -1,8 +1,7 @@
#!/usr/bin/python
import sys
-sys.path.append('./test')
-sys.path.append('../test')
+sys.path.append('script_2')
import startup
from interface import *
@@ -151,6 +150,6 @@ maximus.wait(10000)
fcall6 = maximus.create_fcall('uninit_phy')
fcall6.send(sta)
-sta.remove()
+del sta
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/py/test_send_noise.py b/cesar/maximus/python/utest/script_1/test_send_noise.py
index e5f4ff3948..7601ffcb3f 100644
--- a/cesar/maximus/python/py/test_send_noise.py
+++ b/cesar/maximus/python/utest/script_1/test_send_noise.py
@@ -1,8 +1,7 @@
#!/usr/bin/python
import sys
-sys.path.append('./test')
-sys.path.append('../test')
+sys.path.append('script_2')
import startup
from interface import *
@@ -15,6 +14,7 @@ from struct import pack
# Create and initializes Maximus
maximus = Maximus()
maximus.init(sys.argv)
+maximus.set_freq (50.0)
# Create stations
sta1 = maximus.create_sta ()
@@ -78,7 +78,7 @@ fcall4 = maximus.create_fcall('uninit_phy')
fcall4.send(sta2)
# Remove stations
-sta1.remove()
-sta2.remove()
+del sta1
+del sta2
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/py/test_tx_rx.py b/cesar/maximus/python/utest/script_1/test_tx_rx.py
index 5ee3fc00b4..42bba37255 100644
--- a/cesar/maximus/python/py/test_tx_rx.py
+++ b/cesar/maximus/python/utest/script_1/test_tx_rx.py
@@ -1,8 +1,7 @@
#!/usr/bin/python
import sys
-sys.path.append('./test')
-sys.path.append('../test')
+sys.path.append('script_2')
import startup
from interface import *
@@ -11,6 +10,7 @@ from struct import pack
m = Maximus()
m.init(sys.argv)
+m.set_freq (50.0)
# TEST TX AND RX
@@ -210,6 +210,6 @@ fcall2 = m.create_fcall('uninit_phy')
fcall2.send(sta1)
# Remove station(s)
-sta1.remove()
+del sta1
print "\n*** END ***\n"
diff --git a/cesar/maximus/python/test/internal.conf b/cesar/maximus/python/utest/script_2/internal.conf
index 2e0dcdeb37..2e0dcdeb37 100644
--- a/cesar/maximus/python/test/internal.conf
+++ b/cesar/maximus/python/utest/script_2/internal.conf
diff --git a/cesar/maximus/python/test/internal_1.conf b/cesar/maximus/python/utest/script_2/internal_1.conf
index c5091e0919..c5091e0919 100644
--- a/cesar/maximus/python/test/internal_1.conf
+++ b/cesar/maximus/python/utest/script_2/internal_1.conf
diff --git a/cesar/maximus/python/test/internal_2.conf b/cesar/maximus/python/utest/script_2/internal_2.conf
index 31dacad04e..31dacad04e 100644
--- a/cesar/maximus/python/test/internal_2.conf
+++ b/cesar/maximus/python/utest/script_2/internal_2.conf
diff --git a/cesar/maximus/python/test/internal_3.conf b/cesar/maximus/python/utest/script_2/internal_3.conf
index 2613254fd1..2613254fd1 100644
--- a/cesar/maximus/python/test/internal_3.conf
+++ b/cesar/maximus/python/utest/script_2/internal_3.conf
diff --git a/cesar/maximus/python/test/startup.py b/cesar/maximus/python/utest/script_2/startup.py
index 93b61de5cd..f13895e5f0 100755
--- a/cesar/maximus/python/test/startup.py
+++ b/cesar/maximus/python/utest/script_2/startup.py
@@ -3,8 +3,8 @@
import sys
# for maximus package
-sys.path.append('../python')
-sys.path.append('../../python')
+sys.path.append('..')
+sys.path.append('../..')
# for interface module
sys.path.append('./obj')
diff --git a/cesar/maximus/python/test/test.txt b/cesar/maximus/python/utest/script_2/test.txt
index fdf4907302..fdf4907302 100644
--- a/cesar/maximus/python/test/test.txt
+++ b/cesar/maximus/python/utest/script_2/test.txt
diff --git a/cesar/maximus/python/test/test_channel.py b/cesar/maximus/python/utest/script_2/test_channel.py
index c00ab8fe2d..efbb7294b5 100644
--- a/cesar/maximus/python/test/test_channel.py
+++ b/cesar/maximus/python/utest/script_2/test_channel.py
@@ -14,12 +14,13 @@ m = Maximus()
# Initialize Maximus with command line arguments
m.init(sys.argv)
+m.set_freq (50.0)
# Enable channel perturbation
m.disturb_channel()
# Create an SNR description file
-f = open('test/channel_settings.txt', 'w+')
+f = open('channel_settings.txt', 'w+')
for i in range(0, 7):
f.write(str((i+1)*5000) + "\t")
f.write("# End times (in ticks) of each interval of the beacon period\n")
@@ -31,32 +32,32 @@ f.close()
staA = STA(m, config=Config(default_config=False))
staB = STA(m, config=Config(default_config=False))
set_snr(m, value=15)
-set_snr(m, file='test/channel_settings.txt')
+set_snr(m, file='channel_settings.txt')
set_snr(m, value=10, src=staA)
-set_snr(m, file='test/channel_settings.txt', src=staA)
+set_snr(m, file='channel_settings.txt', src=staA)
set_snr(m, value=12, dst=staB)
-set_snr(m, file='test/channel_settings.txt', dst=staB)
+set_snr(m, file='channel_settings.txt', dst=staB)
set_snr(m, value=12, src=staA, dst=staB)
-set_snr(m, file='test/channel_settings.txt', src=staA, dst=staB)
+set_snr(m, file='channel_settings.txt', src=staA, dst=staB)
staC = STA(m, config=Config(default_config=False))
set_snr(m, value=10, src=staA)
-set_snr(m, file='test/channel_settings.txt', src=staC, both_directions=True)
+set_snr(m, file='channel_settings.txt', src=staC, both_directions=True)
set_snr(m, value=12, dst=staC)
-set_snr(m, file='test/channel_settings.txt', dst=staC, both_directions=True)
+set_snr(m, file='channel_settings.txt', dst=staC, both_directions=True)
set_snr(m, value=12, src=staA, dst=staC, both_directions=True)
-set_snr(m, file='test/channel_settings.txt', src=staA, dst=staC, both_directions=True)
+set_snr(m, file='channel_settings.txt', src=staA, dst=staC, both_directions=True)
staD = m.create_sta()
set_snr(m, value=12, src=staD)
# Remove stations
m.create_fcall("uninit_ether").send(staA.get())
-staA.remove()
+del staA
m.create_fcall("uninit_ether").send(staB.get())
-staB.remove()
+del staB
m.create_fcall("uninit_ether").send(staC.get())
-staC.remove()
+del staC
m.create_fcall("uninit_ether").send(staD)
-staD.remove()
+del staD
# DOC TEST
diff --git a/cesar/maximus/python/test/test_cli.py b/cesar/maximus/python/utest/script_2/test_cli.py
index ad0daef199..ad0daef199 100644
--- a/cesar/maximus/python/test/test_cli.py
+++ b/cesar/maximus/python/utest/script_2/test_cli.py
diff --git a/cesar/maximus/python/test/test_ethernet.py b/cesar/maximus/python/utest/script_2/test_ethernet.py
index ca1db20640..ff4e208169 100644
--- a/cesar/maximus/python/test/test_ethernet.py
+++ b/cesar/maximus/python/utest/script_2/test_ethernet.py
@@ -70,7 +70,7 @@ fcall2 = m.create_fcall('uninit_ether')
fcall2.send(staRx)
# Remove the destination station
-staRx.remove()
+del staRx
# SCAPY TEST
@@ -96,7 +96,7 @@ del(a.ttl)
t=TCP()
t.flags="SA"
-#print t.flags
+#print t.flags
#print [p for p in t]
t.flags=23
#print [p for p in t]
@@ -128,7 +128,7 @@ a.src="1.2.3.4"
#print str(IP())
#print [p for p in IP(str(IP()))]
a=Ether()/IP()/TCP()/"GET /index.html HTTP/1.0 \n\n"
-#hexdump(a)
+#hexdump(a)
b=str(a)
#print b
c=Ether(b)
@@ -181,7 +181,7 @@ class TestEthFunctions(unittest.TestCase):
self.assertEqual(self.eth.src, '47:48:49:4a:4b:4c')
self.assertEqual(self.eth.type, 0x4D4E)
self.assertEqual(str(self.eth.payload), 'This is the Ethernet Payload')
-
+
# Test with vlantag
p = 'ABCDEFGHIJKL' + pack('!I', 0x81004D4E) + 'OPThis is the Ethernet Payload'
self.eth.set_msdu_attr(p)
@@ -196,20 +196,20 @@ class TestEthFunctions(unittest.TestCase):
self.m.create_fcall('init_ether').send(sta)
none_buffer = Buffer('ETHERNET_TYPE_NONE')
length = len(none_buffer.get_buffer_dict())
-
+
# Disable the automatic buffer allocation
realloc_buffer(False)
-
+
alloc_buffer (self.m, sta, buffer_nb = 2)
-
+
# Enable the automatic buffer allocation
realloc_buffer(True)
-
+
alloc_buffer (self.m, sta, buffer_nb = 2)
length = len(none_buffer.get_buffer_dict())
-
+
self.m.create_fcall('uninit_ether').send(sta)
- sta.remove()
+ del sta
def test_send(self):
sta = self.m.create_sta()
@@ -217,7 +217,7 @@ class TestEthFunctions(unittest.TestCase):
alloc_buffer (self.m, sta, buffer_nb = 2)
self.eth.send(self.m, sta)
self.m.create_fcall('uninit_ether').send(sta)
- sta.remove()
+ del sta
def test_get(self):
# Test without vlantag
@@ -227,7 +227,7 @@ class TestEthFunctions(unittest.TestCase):
s = 'This is the Ethernet Payload'
self.eth.payload = s
self.assertEqual(self.eth.get(), 'ABCDEFGHIJKLMNThis is the Ethernet Payload')
-
+
# Test with vlantag
self.eth.dst = '41:42:43:44:45:46'
self.eth.src = '47:48:49:4a:4b:4c'
@@ -236,7 +236,7 @@ class TestEthFunctions(unittest.TestCase):
s = 'This is the Ethernet Payload'
self.eth.payload = s
self.assertEqual(self.eth.get(), 'ABCDEFGHIJKL' + pack('!I', 0x81004D4E) + 'OPThis is the Ethernet Payload')
-
+
# Test with a bad vlantag
test = False
self.eth.vlantag = 0x4D4E4D4E
@@ -303,7 +303,7 @@ class TestBufferFunctions(unittest.TestCase):
payload = pack ('I', buffer_id))
realloc_buffer(False)
self.m.create_fcall('uninit_ether').send(sta)
- sta.remove()
+ del sta
def test_set_msdu_attr(self):
id = 123
@@ -316,7 +316,7 @@ class TestBufferFunctions(unittest.TestCase):
self.m.create_fcall('init_ether').send(sta)
buffers = Buffer ('ETHERNET_TYPE_BUFFER_ADD', buffer_nb = 2)
self.m.create_fcall('uninit_ether').send(sta)
- sta.remove()
+ del sta
def test_send(self):
sta = self.m.create_sta()
@@ -324,7 +324,7 @@ class TestBufferFunctions(unittest.TestCase):
buffers = Buffer ('ETHERNET_TYPE_BUFFER_ADD', buffer_nb = 10)
buffers.send (self.m, sta)
self.m.create_fcall('uninit_ether').send(sta)
- sta.remove()
+ del sta
def test_get(self):
buffers = Buffer ('ETHERNET_TYPE_BUFFER_ADD', buffer_nb = 3)
@@ -342,7 +342,7 @@ class TestBufferFunctions(unittest.TestCase):
self.m.create_fcall('init_ether').send(sta)
alloc_buffer (self.m, sta)
self.m.create_fcall('uninit_ether').send(sta)
- sta.remove()
+ del sta
def test_realloc_buffer(self):
self.assertEqual (self.buffers.get_buffer_realloc (), False)
diff --git a/cesar/maximus/python/test/test_fsm.py b/cesar/maximus/python/utest/script_2/test_fsm.py
index 303c9b3b63..303c9b3b63 100644
--- a/cesar/maximus/python/test/test_fsm.py
+++ b/cesar/maximus/python/utest/script_2/test_fsm.py
diff --git a/cesar/maximus/python/test/test_interface.py b/cesar/maximus/python/utest/script_2/test_interface.py
index 2a492c7f70..ef3f57f061 100644..100755
--- a/cesar/maximus/python/test/test_interface.py
+++ b/cesar/maximus/python/utest/script_2/test_interface.py
@@ -43,57 +43,57 @@ def cb2(msg):
raise Exception(cb2.func_name)
class TestInterfaceFunctions(unittest.TestCase):
-
+
def setUp(self):
-
+
# Set the Maximus instance
self.m = m
-
+
# Create a station
self.station = self.m.create_sta()
-
+
def tearDown(self):
-
+
# Remove station
- self.station.remove()
-
+ del self.station
+
def test_process(self):
self.m.process()
-
+
def test_create_sta(self):
-
+
# Create station 1
station1 = self.m.create_sta()
-
+
# Copy to station 2
station2 = station1
-
+
# Remove station 1
- station1.remove()
-
+ del station1
+
# Remove station 2
- station2.remove()
-
+ del station2
+
def test_create_fcall(self):
-
+
# Create a fcall message
fcall1 = self.m.create_fcall("function_1")
-
+
# Copy the message
fcall2 = fcall1
-
+
def test_create_probe(self):
-
+
# Create a probe message
probe = self.m.create_probe()
-
+
def test_send_mpdu(self):
-
+
fcall1 = self.m.create_fcall('set_tonemask')
fcall1.send(self.station)
fcall2 = self.m.create_fcall('prepare_rx')
fcall2.send(self.station)
-
+
# Create a MAC Frame, configure it and send it asynchronously
frame = MACFrame()
frame.fc_10 = 123
@@ -103,22 +103,22 @@ class TestInterfaceFunctions(unittest.TestCase):
frame.short_ppdu = 0
frame.mod = 4
self.m.send_mpdu(frame)
-
+
fcall3 = self.m.create_fcall('uninit_phy')
fcall3.send(self.station)
-
+
def test_set_mpdu_rx(self):
def cb(mpdu):
pass
def create_fc():
pass
self.m.set_mpdu_rx(cb, create_fc)
-
+
def test_send_msdu(self):
while not self.station.is_idle():
self.m.process()
self.m.send_msdu(MME(MMHeader=23*'H', MMEntry=37*'E'), self.station.get_station_id())
-
+
def test_set_msdu_rx(self):
def cb(msdu):
pass
@@ -135,6 +135,7 @@ class TestInterfaceFunctions(unittest.TestCase):
self.m.wait(500000)
def test_disturb_channel(self):
+ self.m.set_freq (50.0)
self.m.disturb_channel()
self.m.disturb_channel(False)
@@ -186,24 +187,19 @@ class TestInterfaceFunctions(unittest.TestCase):
sta2 = self.m.create_sta ()
self.m.hide_sta (sta1, sta2, True)
self.m.hide_sta (sta1, sta2, False)
- sta1.remove ()
- sta2.remove ()
+ del sta1
+ del sta2
- def test_remove(self):
-
- # Remove station
- self.station.remove()
-
def test_deactivate(self):
-
+
# Deactivate station
self.station.deactivate()
-
+
def test_activate(self):
-
+
# Re-activate station
self.station.activate()
-
+
def test_debug(self):
self.station.debug()
@@ -214,40 +210,41 @@ class TestInterfaceFunctions(unittest.TestCase):
self.assert_(not self.station.is_idle())
def test_add_param(self):
-
+
# Add an empty parameter to the probe message,
# and retrieve the added parameter
#
probe = self.m.create_probe()
probe.add_param("empty_param")
self.assert_(probe.is_param("empty_param"))
-
+
# Add a string parameter to the fcall message,
# and retrieve the added parameter
#
- fcall = self.m.create_fcall("fcall").add_param("string_param", 'ABCD')
+ fcall = self.m.create_fcall("fcall")
+ fcall.add_param("string_param", 'ABCD')
self.assertEqual(fcall.bind_param_string("string_param"),'ABCD')
-
+
def test_add_param_bool(self):
-
+
# Add a boolean parameter to the probe message,
# and retrieve the added parameter
#
probe = self.m.create_probe()
probe.add_param_bool("boolean_param", True)
self.assertEqual(probe.bind_param_bool("boolean_param"),True)
-
+
def test_add_param_ushort(self):
-
+
# Add an unsigned short parameter to the fcall message,
# and retrieve the added parameter
#
fcall = self.m.create_fcall("fcall")
fcall.add_param_ushort("ushort_param", 0xFEDC)
self.assertEqual(fcall.bind_param_ushort("ushort_param"),0xFEDC)
-
+
def test_add_param_ulong(self):
-
+
# Add an unsigned long parameter to the fcall message,
# and retrieve the added parameter
#
@@ -256,52 +253,54 @@ class TestInterfaceFunctions(unittest.TestCase):
self.assertEqual(fcall.bind_param_ulong("ulong_param"),0xFEDCBA98)
def test_add_param_ull(self):
-
+
# Add an unsigned long long parameter to the fcall message,
# and retrieve the added parameter
#
fcall = self.m.create_fcall("fcall")
fcall.add_param_ull("ull_param", 0xFEDCBA9876543210)
- print hex(fcall.bind_param_ull("ull_param"))
self.assertEqual(fcall.bind_param_ull("ull_param"),0xFEDCBA9876543210)
def test_add_param_n_u8(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u8 = (0x12, 0x34, 0x56)
- fcall = self.m.create_fcall("test_u8").add_param_n_u8("tuple_u8", tuple_u8)
+ fcall = self.m.create_fcall("test_u8")
+ fcall.add_param_n_u8("tuple_u8", tuple_u8)
param = fcall.bind_param("tuple_u8")
param = unpack('!BBB', param)
self.assertEqual(param, tuple_u8)
-
+
def test_add_param_n_u16(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
-
+
tuple_u16 = (0x12AB, 0x34AB, 0x56AB, 0x78AB)
- fcall = self.m.create_fcall("test_u16").add_param_n_u16("tuple_u16", tuple_u16)
+ fcall = self.m.create_fcall("test_u16")
+ fcall.add_param_n_u16("tuple_u16", tuple_u16)
param = fcall.bind_param("tuple_u16")
param = unpack('!HHHH', param)
self.assertEqual(param, tuple_u16)
-
+
def test_add_param_n_u32(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
-
+
tuple_u32 = (0x1234ABCD, 0x3456ABCD, 0x5678ABCD, 0x9ABCABCD, 0xEF01ABCD)
- fcall = self.m.create_fcall("test_u32").add_param_n_u32("tuple_u32", tuple_u32)
+ fcall = self.m.create_fcall("test_u32")
+ fcall.add_param_n_u32("tuple_u32", tuple_u32)
param = fcall.bind_param("tuple_u32")
param = unpack('!IIIII', param)
self.assertEqual(param, tuple_u32)
-
+
def test_remove_param(self):
-
+
# Add a parameter to the probe message,
# remove the added parameter,
# and try to retrieve the removed parameter
@@ -310,18 +309,18 @@ class TestInterfaceFunctions(unittest.TestCase):
probe.add_param("param")
probe.remove_param("param")
self.failIf(probe.is_param("param"))
-
+
def test_set_cb(self):
-
+
# Set a callback to the fcall message,
# and set another callback
#
fcall = self.m.create_fcall("fcall")
fcall.set_cb(cb1)
fcall.set_cb(cb2)
-
+
def test_remove_cb(self):
-
+
# Set a callback to the fcall message,
# remove the set callback,
# and set another callback
@@ -330,9 +329,9 @@ class TestInterfaceFunctions(unittest.TestCase):
fcall.set_cb(cb1)
fcall.remove_cb()
fcall.set_cb(cb2)
-
+
def test_set_sta(self):
-
+
# Set the destination station to the probe message,
# create station 3,
# and set the destination station 3 to the probe message
@@ -341,38 +340,38 @@ class TestInterfaceFunctions(unittest.TestCase):
probe.set_sta(self.station)
station3 = self.m.create_sta()
probe.set_sta(station3)
- station3.remove()
-
+ del station3
+
def test_send_async(self):
-
+
# Create a fcall message
fcall1 = self.m.create_fcall("function_1")
-
- # Add a first parameter to the created message
+
+ # Add a first parameter to the created message
param1 = pack('iiB',1,2,True)
fcall1.add_param("param_1", param1)
-
+
# Add a second parameter to the created message
param2 = pack('iiiiiiiiii',0,1,2,3,4,5,6,7,8,9)
fcall1.add_param("param_2", param2)
-
+
# Add a third parameter to the created message
param3 = "hello"
fcall1.add_param("param_3", param3)
-
+
# Add a fourth parameter to the created message
param4 = pack('q',123)
fcall1.add_param("param_4", param4)
-
+
# Register a callback function which will be called at message response reception
fcall1.set_cb(cb1)
-
+
# Set destination station of message
fcall1.set_sta(self.station)
-
+
# Send the configured message in an asynchronous mode
fcall1.send_async()
-
+
# Send another message in an asynchronous mode
station4 = self.m.create_sta()
fcall2 = self.m.create_fcall("function_1")
@@ -383,14 +382,14 @@ class TestInterfaceFunctions(unittest.TestCase):
fcall2.set_cb(cb2)
fcall2.set_sta(station4)
fcall2.send_async()
-
+
# Wait for responses
self.m.wait()
-
- station4.remove()
-
+
+ del station4
+
def test_send(self):
-
+
# Create a fcall message,
# add a boolean parameter,
# send the message to station,
@@ -398,32 +397,36 @@ class TestInterfaceFunctions(unittest.TestCase):
#
fcall2 = self.m.create_fcall("function_2")
fcall2.add_param_bool("param_5", True)
- fcall2 = fcall2.send(self.station)
+ fcall2.send(self.station)
result1 = fcall2.bind_param_string("result_1")
self.assertEqual(result1,"this is result 1")
self.assertEqual(len(result1),16)
-
+
# Create a probe message,
# set the destination station,
# add a parameter,
# send the message,
# and get the result
#
- probe = self.m.create_probe().set_sta(self.station).add_param("param_6").send()
+ probe = self.m.create_probe()
+ probe.set_sta(self.station)
+ probe.add_param("param_6")
+ probe.send()
self.assertEqual(probe.bind_param_ulong("param_6"),0x7B000000)
-
+
def test_is_param(self):
-
+
# Add a parameter to the probe message,
# send the message to the destination station,
# and get the result
#
probe = self.m.create_probe()
- probe.add_param("param_6").send(self.station)
+ probe.add_param("param_6")
+ probe.send(self.station)
self.assert_(probe.is_param("param_6"))
-
+
def test_bind_param_string(self):
-
+
# Add string parameters to the fcall message,
# and retrieve added parameters
#
@@ -434,73 +437,78 @@ class TestInterfaceFunctions(unittest.TestCase):
self.assertEqual(fcall.bind_param_string("string_param_1"),"string param 1")
self.assertEqual(fcall.bind_param_string("string_param_2"),"string param 2")
self.assertEqual(fcall.bind_param_string("string_param_3"),"string param 3")
-
+
def test_bind_param_bool(self):
-
+
# Add a boolean parameter to the fcall message,
# and retrieve the added parameter
#
fcall = self.m.create_fcall("fcall")
fcall.add_param_bool("boolean_param", False)
self.assertEqual(fcall.bind_param_bool("boolean_param"),False)
-
+
def test_bind_param_ushort(self):
-
+
# Add a parameter to the probe message,
# send the message to the destination station,
# and get the result
#
probe = self.m.create_probe()
- probe = probe.add_param("param_10").send(self.station)
+ probe.add_param("param_10")
+ probe.send(self.station)
self.assertEqual(probe.bind_param_ushort("param_10"),0xEEFF)
-
+
def test_bind_param_ulong(self):
-
+
# Add a parameter to the probe message,
# send the message to the destination station,
# and get the result
#
probe = self.m.create_probe()
- probe = probe.add_param("param_11").send(self.station)
+ probe.add_param("param_11")
+ probe.send(self.station)
self.assertEqual(probe.bind_param_ulong("param_11"),0xCCDDEEFF)
def test_bind_param_ull(self):
-
+
# Add a parameter to the probe message,
# send the message to the destination station,
# and get the result
#
probe = self.m.create_probe()
- probe = probe.add_param("param_12").send(self.station)
- print hex(probe.bind_param_ull("param_12"))
+ probe.add_param("param_12")
+ probe.send(self.station)
self.assertEqual(probe.bind_param_ull("param_12"),0x8899AABBCCDDEEFF)
def test_bind_param_n_u8(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u8 = (0x12, 0x34, 0x56)
- fcall = self.m.create_fcall("test_u8").add_param_n_u8("tuple_u8", tuple_u8)
+ fcall = self.m.create_fcall("test_u8")
+ fcall.add_param_n_u8("tuple_u8", tuple_u8)
self.assertEqual(fcall.bind_param_n_u8("tuple_u8"), tuple_u8)
def test_bind_param_n_16(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u16 = (0x12AB, 0x34AB, 0x56AB, 0x78AB)
- fcall = self.m.create_fcall("test_u16").add_param_n_u16("tuple_u16", tuple_u16)
+ fcall = self.m.create_fcall("test_u16")
+ fcall.add_param_n_u16("tuple_u16", tuple_u16)
self.assertEqual(fcall.bind_param_n_u16("tuple_u16"), tuple_u16)
-
+
def test_bind_param_n_u32(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u32 = (0x1234ABCD, 0x3456ABCD, 0x5678ABCD, 0x9ABCABCD, 0xEF01ABCD)
- fcall = self.m.create_fcall("test_u32").add_param_n_u32("tuple_u32", tuple_u32)
+ fcall = self.m.create_fcall("test_u32")
+ fcall.add_param_n_u32("tuple_u32", tuple_u32)
self.assertEqual(fcall.bind_param_n_u32("tuple_u32"), tuple_u32)
suite = unittest.TestLoader().loadTestsFromTestCase(TestInterfaceFunctions)
diff --git a/cesar/maximus/python/test/test_lib_cesar.py b/cesar/maximus/python/utest/script_2/test_lib_cesar.py
index 208d7be754..d3512872ac 100644
--- a/cesar/maximus/python/test/test_lib_cesar.py
+++ b/cesar/maximus/python/utest/script_2/test_lib_cesar.py
@@ -44,7 +44,7 @@ if data_tck != maximus_dur(m, sta.get(), sta.get_tonemask(), mod, tonemap, fecra
raise Error("maximus_dur")
m.create_fcall("uninit_ether").send(sta.get())
-sta.remove()
+del sta
# DOC TEST
@@ -66,7 +66,7 @@ class TestSTACesarFunctions(unittest.TestCase):
def tearDown(self):
# Remove station
m.create_fcall("uninit_ether").send(self.station.get())
- self.station.remove()
+ del self.station
def test_stop(self):
self.station.stop()
@@ -180,7 +180,6 @@ class TestSTACesarFunctions(unittest.TestCase):
def test_remove(self):
m.create_fcall("uninit_ether").send(self.station.get())
- self.station.remove()
self.station = STACesar(m, config=sta_config)
def test_deactivate(self):
diff --git a/cesar/maximus/python/test/test_lib_proto.py b/cesar/maximus/python/utest/script_2/test_lib_proto.py
index e0d41f40d7..9b649adcb4 100644
--- a/cesar/maximus/python/test/test_lib_proto.py
+++ b/cesar/maximus/python/utest/script_2/test_lib_proto.py
@@ -90,10 +90,10 @@ stationD = maximus.create_sta("dd:dd:dd:dd:dd:dd")
maximus.wait(1000000)
-stationA.remove()
-stationB.remove()
-stationC.remove()
-stationD.remove()
+del stationA
+del stationB
+del stationC
+del stationD
print "\n*** END ***\n"
@@ -119,35 +119,36 @@ def cb2(msg):
class TestFcallFunctions(unittest.TestCase):
def setUp(self):
-
+
# Create Maximus
self.maximus = maximus
-
+
# Create a station
self.station = StaProto("11:22:33:44:55:66")
def tearDown(self):
-
+
# Remove station
pass
def test_add_param(self):
-
+
# Add an empty parameter to the probe message,
# and retrieve the added parameter
#
probe = self.maximus.create_probe()
probe.add_param("empty_param")
self.assert_(probe.is_param("empty_param"))
-
+
# Add a string parameter to the fcall message,
# and retrieve the added parameter
#
- fcall = self.maximus.create_fcall("fcall").add_param("string_param", 'ABCD')
+ fcall = self.maximus.create_fcall("fcall")
+ fcall.add_param("string_param", 'ABCD')
self.assertEqual(fcall.bind_param_string("string_param"),'ABCD')
def test_add_param_bool(self):
-
+
# Add a boolean parameter to the probe message,
# and retrieve the added parameter
#
@@ -156,7 +157,7 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(probe.bind_param_bool("boolean_param"),True)
def test_add_param_ushort(self):
-
+
# Add an unsigned short parameter to the fcall message,
# and retrieve the added parameter
#
@@ -165,7 +166,7 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(fcall.bind_param_ushort("ushort_param"),0xFEDC)
def test_add_param_ulong(self):
-
+
# Add an unsigned long parameter to the fcall message,
# and retrieve the added parameter
#
@@ -174,42 +175,45 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(fcall.bind_param_ulong("ulong_param"),0xFEDCBA98)
def test_add_param_n_u8(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u8 = (0x12, 0x34, 0x56)
- fcall = self.maximus.create_fcall("test_u8").add_param_n_u8("tuple_u8", tuple_u8)
+ fcall = self.maximus.create_fcall("test_u8")
+ fcall.add_param_n_u8("tuple_u8", tuple_u8)
param = fcall.bind_param("tuple_u8")
param = unpack('BBB', param)
self.assertEqual(param, tuple_u8)
def test_add_param_n_u16(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
-
+
tuple_u16 = (0x12AB, 0x34AB, 0x56AB, 0x78AB)
- fcall = self.maximus.create_fcall("test_u16").add_param_n_u16("tuple_u16", tuple_u16)
+ fcall = self.maximus.create_fcall("test_u16")
+ fcall.add_param_n_u16("tuple_u16", tuple_u16)
param = fcall.bind_param("tuple_u16")
param = unpack('!HHHH', param)
self.assertEqual(param, tuple_u16)
def test_add_param_n_u32(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
-
+
tuple_u32 = (0x1234ABCD, 0x3456ABCD, 0x5678ABCD, 0x9ABCABCD, 0xEF01ABCD)
- fcall = self.maximus.create_fcall("test_u32").add_param_n_u32("tuple_u32", tuple_u32)
+ fcall = self.maximus.create_fcall("test_u32")
+ fcall.add_param_n_u32("tuple_u32", tuple_u32)
param = fcall.bind_param("tuple_u32")
param = unpack('!IIIII', param)
self.assertEqual(param, tuple_u32)
def test_remove_param(self):
-
+
# Add a parameter to the probe message,
# remove the added parameter,
# and try to retrieve the removed parameter
@@ -220,7 +224,7 @@ class TestFcallFunctions(unittest.TestCase):
self.failIf(probe.is_param("param"))
def test_set_cb(self):
-
+
# Set a callback to the fcall message,
# and set another callback
#
@@ -229,7 +233,7 @@ class TestFcallFunctions(unittest.TestCase):
fcall.set_cb(cb2)
def test_remove_cb(self):
-
+
# Set a callback to the fcall message,
# remove the set callback,
# and set another callback
@@ -240,7 +244,7 @@ class TestFcallFunctions(unittest.TestCase):
fcall.set_cb(cb2)
def test_set_sta(self):
-
+
# Set the destination station to the probe message,
# create station 3,
# and set the destination station 3 to the probe message
@@ -251,35 +255,35 @@ class TestFcallFunctions(unittest.TestCase):
probe.set_sta(station1)
def test_send_async(self):
-
+
# Create a fcall message
fcall1 = self.maximus.create_fcall("function_1")
-
+
# Add a first parameter to the created message
param1 = pack('iiB',1,2,True)
fcall1.add_param("param_1", param1)
-
+
# Add a second parameter to the created message
param2 = pack('iiiiiiiiii',0,1,2,3,4,5,6,7,8,9)
fcall1.add_param("param_2", param2)
-
+
# Add a third parameter to the created message
param3 = "hello\0"
fcall1.add_param("param_3", param3)
-
+
# Add a fourth parameter to the created message
param4 = pack('q',123)
fcall1.add_param("param_4", param4)
-
+
# Register a callback function which will be called at message response reception
fcall1.set_cb(cb1)
-
+
# Set destination station of message
fcall1.set_sta(self.station)
-
+
# Send the configured message in an asynchronous mode
fcall1.send_async()
-
+
# Send another message in an asynchronous mode
station2 = StaProto("22:22:22:22:22:22")
fcall2 = self.maximus.create_fcall("function_1")
@@ -292,7 +296,7 @@ class TestFcallFunctions(unittest.TestCase):
fcall2.send_async()
def test_send(self):
-
+
# Create a fcall message,
# add a boolean parameter,
# send the message to station,
@@ -304,7 +308,7 @@ class TestFcallFunctions(unittest.TestCase):
result1 = fcall2.bind_param_string("result_1")
self.assertEqual(result1,"this is result 1")
self.assertEqual(len(result1),16)
-
+
# Create a probe message,
# set the destination station,
# add a parameter,
@@ -315,7 +319,7 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(probe.bind_param_ulong("param_6"),789)
def test_is_param(self):
-
+
# Add a parameter to the probe message,
# send the message to the destination station,
# and get the result
@@ -325,7 +329,7 @@ class TestFcallFunctions(unittest.TestCase):
self.assert_(probe.is_param("param_6"))
def test_bind_param_string(self):
-
+
# Add string parameters to the fcall message,
# and retrieve added parameters
#
@@ -338,7 +342,7 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(fcall.bind_param_string("string_param_3"),"string param 3")
def test_bind_param_bool(self):
-
+
# Add a boolean parameter to the fcall message,
# and retrieve the added parameter
#
@@ -347,7 +351,7 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(fcall.bind_param_bool("boolean_param"),False)
def test_bind_param_ushort(self):
-
+
# Add a parameter to the probe message,
# send the message to the destination station,
# and get the result
@@ -357,7 +361,7 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(probe.bind_param_ushort("param_10"),0xFFEE)
def test_bind_param_ulong(self):
-
+
# Add a parameter to the probe message,
# send the message to the destination station,
# and get the result
@@ -367,30 +371,33 @@ class TestFcallFunctions(unittest.TestCase):
self.assertEqual(probe.bind_param_ulong("param_11"),0xFFEEDDCC)
def test_bind_param_n_u8(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u8 = (0x12, 0x34, 0x56)
- fcall = self.maximus.create_fcall("test_u8").add_param_n_u8("tuple_u8", tuple_u8)
+ fcall = self.maximus.create_fcall("test_u8")
+ fcall.add_param_n_u8("tuple_u8", tuple_u8)
self.assertEqual(fcall.bind_param_n_u8("tuple_u8"), tuple_u8)
def test_bind_param_n_16(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u16 = (0x12AB, 0x34AB, 0x56AB, 0x78AB)
- fcall = self.maximus.create_fcall("test_u16").add_param_n_u16("tuple_u16", tuple_u16)
+ fcall = self.maximus.create_fcall("test_u16")
+ fcall.add_param_n_u16("tuple_u16", tuple_u16)
self.assertEqual(fcall.bind_param_n_u16("tuple_u16"), tuple_u16)
def test_bind_param_n_u32(self):
-
+
# Add a Python tuple parameter to the fcall message,
# and retrieve the added parameter
#
tuple_u32 = (0x1234ABCD, 0x3456ABCD, 0x5678ABCD, 0x9ABCABCD, 0xEF01ABCD)
- fcall = self.maximus.create_fcall("test_u32").add_param_n_u32("tuple_u32", tuple_u32)
+ fcall = self.maximus.create_fcall("test_u32")
+ fcall.add_param_n_u32("tuple_u32", tuple_u32)
self.assertEqual(fcall.bind_param_n_u32("tuple_u32"), tuple_u32)
suite = unittest.TestLoader().loadTestsFromTestCase(TestFcallFunctions)
@@ -404,15 +411,15 @@ class TestMaximusProtoFunctions(unittest.TestCase):
pass
def test_create_fcall(self):
-
+
# Create a fcall message
fcall1 = self.m.create_fcall("function_1")
-
+
# Copy the message
fcall2 = fcall1
def test_create_probe(self):
-
+
# Create a probe message
probe = self.m.create_probe()
diff --git a/cesar/maximus/python/test/test_macframe.py b/cesar/maximus/python/utest/script_2/test_macframe.py
index 2886ea0b79..fef34096aa 100644
--- a/cesar/maximus/python/test/test_macframe.py
+++ b/cesar/maximus/python/utest/script_2/test_macframe.py
@@ -21,6 +21,7 @@ m = Maximus()
# Initialize Maximus with command line arguments
m.init(sys.argv)
+m.set_freq (50.0)
def prepare_rx(s, pb_nb=1):
fcall = m.create_fcall('prepare_rx')
@@ -95,7 +96,7 @@ queue.set_macframelist(list2)
prepare_rx(station, pb_nb=3)
queue.send(m)
-station.remove()
+del station
# DOC TEST
@@ -217,7 +218,7 @@ class TestFC_AVFunctions(unittest.TestCase):
def test_get(self):
fcav = FC_AV(DT_AV=7, ACCESS=0, SNID=4, VF_AV=0xFFFF)
self.assertEqual(fcav.get(),(0x47000000, 0, 0x000000FF,\
- 0xFF000000 + crc24(htohp32(0x47000000) + htohp32(0) + htohp32(0x000000FF) + htohp8(0xFF))))
+ 0xFF000000 + crc24(htohp32(0x47000000) + htohp32(0) + htohp32(0x000000FF) + htohp8(0xFF))))
fcav.set_fccs_av(15)
self.assertEqual(fcav.get(),(0x47000000, 0, 0x000000FF, 0xFF00000F))
@@ -226,7 +227,7 @@ suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestFC_AVFunctions))
class TestMACFrameFunctions(unittest.TestCase):
def setUp(self):
-
+
self.macframe = MACFrame()
self.assertEqual(self.macframe.get_fc_10(), 0)
self.assertNotEqual(self.macframe.get_fc_av(), None)
@@ -237,14 +238,14 @@ class TestMACFrameFunctions(unittest.TestCase):
self.assertEqual(self.macframe.get_msdu(), '')
self.assertEqual(self.macframe.get_iv(), 3*4*'0')
self.assertEqual(self.macframe.get_nek(), 4*4*'0')
-
+
self.m = m
self.sta = self.m.create_sta()
fcall = self.m.create_fcall('set_tonemask')
fcall.send(self.sta)
def tearDown(self):
- self.sta.remove()
+ del self.sta
def test_set_macframeheader(self):
# Test with a MAC Frame Header object
@@ -340,10 +341,10 @@ class TestMACFrameHeaderFunctions(unittest.TestCase):
def setUp(self):
self.header = MACFrameHeader()
-
+
def tearDown(self):
pass
-
+
def test_set_mft(self):
# Test with a Python integer
mft = 0x01
@@ -376,21 +377,21 @@ suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestMACFrameHeaderFun
class TestMACFrameQueueFunctions(unittest.TestCase):
def setUp(self):
-
+
self.macframequeue = MACFrameQueue()
self.assertEqual(self.macframequeue.get_fc_10(), 0)
self.assertNotEqual(self.macframequeue.get_fc_av(), None)
self.assertEqual(self.macframequeue.get_iv(), 3*4*'0')
self.assertEqual(self.macframequeue.get_nek(), 4*4*'0')
self.assertEqual(self.macframequeue.get_macframelist(), [])
-
+
self.m = m
self.sta = self.m.create_sta()
fcall = self.m.create_fcall('set_tonemask')
fcall.send(self.sta)
def tearDown(self):
- self.sta.remove()
+ del self.sta
def test_set_macframelist(self):
# Test with an Python list
@@ -496,7 +497,7 @@ class TestPBFunctions(unittest.TestCase):
def setUp(self):
self.pb = PB()
-
+
def tearDown(self):
pass
diff --git a/cesar/maximus/python/test/test_maximus.py b/cesar/maximus/python/utest/script_2/test_maximus.py
index 9fff653f19..9fff653f19 100644
--- a/cesar/maximus/python/test/test_maximus.py
+++ b/cesar/maximus/python/utest/script_2/test_maximus.py
diff --git a/cesar/maximus/python/test/test_mme.py b/cesar/maximus/python/utest/script_2/test_mme.py
index 131e73a464..b8eb4058cf 100644
--- a/cesar/maximus/python/test/test_mme.py
+++ b/cesar/maximus/python/utest/script_2/test_mme.py
@@ -34,7 +34,7 @@ mme2 = MME()
rsp = mme2.sendnrecv(m, staRx, timeout=250000)
# Remove the destination station
-staRx.remove()
+del staRx
# DOC TEST
@@ -251,12 +251,12 @@ class TestMMEFunctions(unittest.TestCase):
rsp = self.mme.sendnrecv(self.m, sta, timeout=d)
self.assertEqual(rsp, None)
self.assertEqual(self.m.get_date(), t + d)
- sta.remove()
+ del sta
def test_send(self):
sta = self.m.create_sta()
self.mme.send(self.m, sta)
- sta.remove()
+ del sta
def test_get(self):
# Test with VLAN Tag
diff --git a/cesar/maximus/python/test/test_result.py b/cesar/maximus/python/utest/script_2/test_result.py
index 5dce9ec2b8..5dce9ec2b8 100644
--- a/cesar/maximus/python/test/test_result.py
+++ b/cesar/maximus/python/utest/script_2/test_result.py
diff --git a/cesar/maximus/python/test/test_simu.py b/cesar/maximus/python/utest/script_2/test_simu.py
index a7e9958be4..00f88943c8 100644
--- a/cesar/maximus/python/test/test_simu.py
+++ b/cesar/maximus/python/utest/script_2/test_simu.py
@@ -14,6 +14,7 @@ m = Maximus()
# Initialize Maximus with command line arguments
m.init(sys.argv)
+m.set_freq (50.0)
# Transmission
rsp = sendnrecv(file='data', timeout=5000)
diff --git a/cesar/maximus/python/test/test_station.py b/cesar/maximus/python/utest/script_2/test_station.py
index 33013dc0ab..8542c044eb 100644
--- a/cesar/maximus/python/test/test_station.py
+++ b/cesar/maximus/python/utest/script_2/test_station.py
@@ -36,7 +36,7 @@ sta2.debug()
sta2.set_cco_preference(False)
m.create_fcall("uninit_ether").send(sta2.get())
-sta3 = STA(m, name="sta3", executable='../stationtest/obj/test_station.elf', config=Config(default_config=False))
+sta3 = STA(m, name="sta3", executable='stationtest/obj/test_station.elf', config=Config(default_config=False))
station_nb += 1
sta3.debug()
m.create_fcall("uninit_ether").send(sta3.get())
@@ -46,17 +46,17 @@ sta4 = STA(m, name="sta4", config=conf4)
station_nb += 1
sta4.debug()
m.create_fcall("uninit_ether").send(sta4.get())
-sta1.remove()
-sta2.remove()
-sta4.remove()
+del sta1
+del sta2
+del sta4
conf5 = Config(default_config=False, was_cco=True, npw="network_password", sl=1, mac_address=0x555555555555)
sta5 = STA(m, name="This is the name of station 5", config=conf5)
station_nb += 1
sta5.debug()
m.create_fcall("uninit_ether").send(sta5.get())
-sta3.remove()
-sta5.remove()
+del sta3
+del sta5
conf = Config()
conf.mac_address = '12:34:56:78:9A:BC'
@@ -74,7 +74,7 @@ conf.snid = None
sta6 = STA(m, debug=True, name="sta6", config=conf)
station_nb += 1
m.create_fcall("uninit_ether").send(sta6.get())
-sta6.remove()
+del sta6
sta7 = STA(m, name="sta7", config=Config(default_config=False))
station_nb += 1
@@ -83,31 +83,27 @@ try:
sta7.set_config(bad_conf)
except TypeError:
m.create_fcall("uninit_ether").send(sta7.get())
- sta7.remove()
+ del sta7
sta8 = STA(m, name="sta8", config=conf)
station_nb += 1
m.create_fcall("uninit_ether").send(sta8.get())
-sta8.remove()
+del sta8
sta9 = STA(m, name="sta9", config_mode='MME', config=conf)
station_nb += 1
m.create_fcall("uninit_ether").send(sta9.get())
-sta9.remove()
+del sta9
# Test with the maximum number of stations,
# which is limited by the maximum number of open file descriptors (1024)
station_max_nb = (1024 + (file_desc_nb - 1)) / file_desc_nb - station_nb * file_desc_nb
station_list = []
for i in range (0, station_max_nb):
- station_list.append(STA(m, config=Config(default_config=False)))
+ station_list.append (STA(m, config=Config(default_config=False)))
for i in range (0, len(station_list)):
- m.create_fcall("uninit_ether").send(station_list[i].get())
- station_list[i].remove()
-if len(station_list) != station_max_nb:
- print "length of list of stations =", len(station_list)
- print "number of created stations =", station_max_nb
- raise Error("incorrect length of list of stations")
+ m.create_fcall("uninit_ether").send(station_list[0].get())
+ del station_list[0]
# DOC TEST
@@ -130,7 +126,7 @@ class TestSTAFunctions(unittest.TestCase):
def tearDown(self):
# Remove station
m.create_fcall("uninit_ether").send(self.station.get())
- self.station.remove()
+ del self.station
def test_stop(self):
self.station.stop()
@@ -138,7 +134,7 @@ class TestSTAFunctions(unittest.TestCase):
def test_set_name(self):
name = "Name of my station"
self.station.set_name(name)
- self.assertEqual(self.station.get_name(), name)
+ self.assertEqual (self.station.get_name(), name)
def test_set_buffer_nb (self):
buffer_nb = 4
@@ -253,23 +249,23 @@ class TestSTAFunctions(unittest.TestCase):
self.assertEqual(catch, True)
# Test with cesar/maximus/python/test/internal_1.conf:
# line 57 must be logged as error and no DRV MME should be sent
- internal_conf = "test/internal_1.conf"
+ internal_conf = "script_2/internal_1.conf"
self.assertEqual(self.station.set_internal_conf(internal_conf), None)
self.assertEqual(self.station.get_internal_conf(), internal_conf)
# Test with cesar/maximus/python/test/internal_2.conf:
# line 116 must be logged as error and no DRV MME should be sent
- internal_conf = "test/internal_2.conf"
+ internal_conf = "script_2/internal_2.conf"
self.assertEqual(self.station.set_internal_conf(internal_conf), None)
self.assertEqual(self.station.get_internal_conf(), internal_conf)
# Test with cesar/maximus/python/test/internal_3.conf:
# line 119 must be logged as error and no DRV MME should be sent
- internal_conf = "test/internal_3.conf"
+ internal_conf = "script_2/internal_3.conf"
self.assertEqual(self.station.set_internal_conf(internal_conf), None)
self.assertEqual(self.station.get_internal_conf(), internal_conf)
# Test with cesar/maximus/python/test/internal.conf:
# does not contain any error
- internal_conf = "test/internal.conf"
+ internal_conf = "script_2/internal.conf"
expected_mmentries = [
'CE_RX_BL_NSR_MARGIN:64 CE_RX_BL_BER_MARGIN_1_2:0 CE_RX_BL_BER_MARGIN_16_21:0 \
CE_RX_BL_PB_FALSE_FACTOR:1 CE_RX_BL_PB_TOTAL_FACTOR:4 CE_RX_BL_MIN_PB_PER_FRAME:2 \
@@ -305,7 +301,7 @@ CAP_MASK:7\0',
def test_remove(self):
m.create_fcall("uninit_ether").send(self.station.get())
- self.station.remove()
+ del self.station
self.station = STA(m, config=Config(default_config=False))
def test_deactivate(self):
diff --git a/cesar/maximus/python/test/test_utils.py b/cesar/maximus/python/utest/script_2/test_utils.py
index 0ecb55b594..0ecb55b594 100644
--- a/cesar/maximus/python/test/test_utils.py
+++ b/cesar/maximus/python/utest/script_2/test_utils.py
diff --git a/cesar/maximus/python/utest/stationtest/Config b/cesar/maximus/python/utest/stationtest/Config
new file mode 100644
index 0000000000..d9c718492d
--- /dev/null
+++ b/cesar/maximus/python/utest/stationtest/Config
@@ -0,0 +1,6 @@
+CONFIG_DEBUG = n
+CONFIG_DEBUG_FATAL_CATCH = n
+
+CONFIG_TRACE = n
+CONFIG_TRACE_ON_FATAL = n
+CONFIG_TRACE_ALL_FAST = n
diff --git a/cesar/maximus/stationtest/Makefile b/cesar/maximus/python/utest/stationtest/Makefile
index 40f2f39c5f..6cdc2b5bb2 100644
--- a/cesar/maximus/stationtest/Makefile
+++ b/cesar/maximus/python/utest/stationtest/Makefile
@@ -1,4 +1,4 @@
-BASE = ../..
+BASE = ../../../..
ECOS = y
diff --git a/cesar/maximus/stationtest/ecos.ecc.sh b/cesar/maximus/python/utest/stationtest/ecos.ecc.sh
index e0278271fe..e0278271fe 100644
--- a/cesar/maximus/stationtest/ecos.ecc.sh
+++ b/cesar/maximus/python/utest/stationtest/ecos.ecc.sh
diff --git a/cesar/maximus/stationtest/src/exception.c b/cesar/maximus/python/utest/stationtest/src/exception.c
index 8f9b7b12f5..fe761b1a00 100644
--- a/cesar/maximus/stationtest/src/exception.c
+++ b/cesar/maximus/python/utest/stationtest/src/exception.c
@@ -8,7 +8,7 @@
/**
* \file exception.c
* \brief how to catch an exception
- * \ingroup
+ * \ingroup
*
* this is a test program to check eCos well work
*/
@@ -25,11 +25,11 @@ void system_call_exception(cyg_addrword_t data, cyg_code_t number, cyg_addrword_
{
switch(number)
{
- case CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION:
+ case CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION:
diag_printf("eCos: Exception Error (Illegal Instruction)!!!\n");
break;
- case CYGNUM_HAL_EXCEPTION_DATA_ACCESS:
+ case CYGNUM_HAL_EXCEPTION_DATA_ACCESS:
diag_printf("eCos: Exception Error (Data Access)!!!\n");
break;
diff --git a/cesar/maximus/stationtest/src/hello_world.c b/cesar/maximus/python/utest/stationtest/src/hello_world.c
index 09d2a06da7..e393a5ff1f 100644
--- a/cesar/maximus/stationtest/src/hello_world.c
+++ b/cesar/maximus/python/utest/stationtest/src/hello_world.c
@@ -8,7 +8,7 @@
/**
* \file hello_world.c
* \brief hello world program
- * \ingroup
+ * \ingroup
*/
#include <cyg/infra/diag.h>
@@ -19,7 +19,7 @@ extern station_ctx_t my_station;
int main(void)
{
- station_log_set_level(&my_station, STATION_LOG_DEBUG);
+ station_log_set_level(&my_station, STATION_LOG_NONE);
station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diag_write_string("hello by eCos\n");
diff --git a/cesar/maximus/stationtest/src/main_example.c b/cesar/maximus/python/utest/stationtest/src/main_example.c
index 32f048e80c..fb86cfdc63 100644
--- a/cesar/maximus/stationtest/src/main_example.c
+++ b/cesar/maximus/python/utest/stationtest/src/main_example.c
@@ -8,7 +8,7 @@
/**
* \file main_example.c
* \brief example of a main program of a station executable
- * \ingroup
+ * \ingroup
*/
#include <cyg/infra/diag.h>
@@ -41,12 +41,12 @@ bool phy_access_cb (void *user)
bool phy_access_conf_cb (void *user)
{
- return true;
+ return true;
}
bool phy_pbdma_cb (void *user, u32 status_word)
{
- return true;
+ return true;
}
bool phy_tx_false_alarm_cb (void *user)
@@ -112,7 +112,7 @@ void my_return_function (void *data)
fcall_param_add(&return_param, &return_msg, "result_2", sizeof(my_type_t), &my_param4);
fcall_return(my_station.fcall, &return_param, &return_msg);
- return;
+ return;
}
@@ -123,17 +123,17 @@ int my_function1 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
int my_param2[10];
char my_param3[6];
int i;
-
+
// for netclock message
netclock_id_t id;
static netclock_callback_t my_return_function_cb;
-
+
/* get parameters content */
fcall_param_bind(*param, *msg, "param_1", sizeof(my_struct_t), &my_param1);
fcall_param_bind(*param, *msg, "param_2", 10*sizeof(int), my_param2);
fcall_param_bind(*param, *msg, "param_3", 6, (char*)my_param3);
fcall_param_bind(*param, *msg, "param_4", sizeof(my_type_t), &my_param4);
-
+
/* do other tasks ... */
diag_write_string("=> my_function1\n");
diag_printf("param 1 . i1 = %d\n", my_param1.i1);
@@ -147,11 +147,11 @@ int my_function1 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
diag_write_string("\n");
diag_printf("param 3 = %s\n", my_param3);
diag_printf("param 4 = %lld\n", my_param4);
-
+
/* prepare the future asynchronous return */
fcall_param_set_async(*param, 1);
asynchronous_msg_id = (*param)->msg_id;
-
+
/* schedule the future my_return_function() call */
// send netclock message to Maximus to call my_return_function()
if (-1 == netclock_schedule(my_station.netclock,
@@ -161,12 +161,12 @@ int my_function1 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
&my_return_function,
(void*)&asynchronous_msg_id,
&id))
- {
+ {
diag_printf("errno = %d\n", errno);
}
-
- /* now return */
- return 0;
+
+ /* now return */
+ return 0;
}
@@ -174,7 +174,7 @@ int my_function2 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
{
bool my_param5;
char my_result1[] = "this is result 1\0";
-
+
/* get parameters content */
if (-1 == fcall_param_bind(*param, *msg, "param_5", sizeof(bool), &my_param5))
{
@@ -183,13 +183,14 @@ int my_function2 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
}
/* do other tasks ... */
- diag_write_string("=> my_function2\n");
+ /* this line write in the TERMINAL => disable. */
+ // diag_write_string("=> my_function2\n");
/* now make the return parameter list */
fcall_param_reset(*param);
fcall_param_add(*param, *msg, "result_1", strlen(my_result1)+1, &my_result1);
-
- return 0;
+
+ return 0;
}
@@ -215,61 +216,61 @@ void my_function_rsp (void *data)
fcall_param_reset(&return_param);
fcall_return(my_station.fcall, &return_param, &return_msg);
- return;
+ return;
}
int my_function3 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
{
static unsigned short asynchronous_msg_id = 0;
-
+
/* do other tasks ... */
diag_write_string("=> my_function3\n");
-
+
/* prepare the future asynchronous return */
fcall_param_set_async(*param, 1);
asynchronous_msg_id = (*param)->msg_id;
-
+
/* call my_function_rsp() */
my_function_rsp((void*)&asynchronous_msg_id);
-
- return 0;
+
+ return 0;
}
int my_function4 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
{
static unsigned short asynchronous_msg_id = 0;
-
+
/* do other tasks ... */
diag_write_string("=> my_function4\n");
/* prepare the future asynchronous return */
fcall_param_set_async(*param, 1);
asynchronous_msg_id = (*param)->msg_id;
-
+
/* call my_function_rsp() */
my_function_rsp((void*)&asynchronous_msg_id);
-
- return 0;
+
+ return 0;
}
int my_function5 (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
{
static unsigned short asynchronous_msg_id = 0;
-
+
/* do other tasks ... */
diag_write_string("=> my_function5\n");
/* prepare the future asynchronous return */
fcall_param_set_async(*param, 1);
asynchronous_msg_id = (*param)->msg_id;
-
+
/* call my_function_rsp() */
my_function_rsp((void*)&asynchronous_msg_id);
-
- return 0;
+
+ return 0;
}
@@ -294,7 +295,7 @@ int set_tonemask (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
@@ -328,7 +329,7 @@ int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
@@ -342,7 +343,7 @@ int uninit_phy (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
@@ -353,13 +354,13 @@ int function_to_call (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
int main (void)
{
- station_log_set_level(&my_station, STATION_LOG_DEBUG);
+ station_log_set_level(&my_station, STATION_LOG_NONE);
station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/one_thread.c b/cesar/maximus/python/utest/stationtest/src/one_thread.c
index 794bacfcb8..fcd91d8646 100644
--- a/cesar/maximus/stationtest/src/one_thread.c
+++ b/cesar/maximus/python/utest/stationtest/src/one_thread.c
@@ -8,7 +8,7 @@
/**
* \file one_thread.c
* \brief test program with only one thread
- * \ingroup
+ * \ingroup
*
* this is a test program to check eCos well work
*/
@@ -41,7 +41,7 @@ void cyg_user_start(void)
cyg_thread_resume(my_thread_handle);
diag_write_string("scheduler starting...\n");
-
+
cyg_scheduler_start();
}
diff --git a/cesar/maximus/stationtest/src/test_cb.c b/cesar/maximus/python/utest/stationtest/src/test_cb.c
index 4b4bd0609a..dc635369f4 100644
--- a/cesar/maximus/stationtest/src/test_cb.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_cb.c
@@ -8,7 +8,7 @@
/**
* \file test_cb.c
* \brief station executable used for test cb program
- * \ingroup
+ * \ingroup
*/
#include <cyg/infra/diag.h>
@@ -26,12 +26,12 @@ int get_seg (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *d
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
int main (void)
{
- station_log_set_level(&my_station, STATION_LOG_DEBUG);
+ station_log_set_level(&my_station, STATION_LOG_NONE);
station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/test_ether.c b/cesar/maximus/python/utest/stationtest/src/test_ether.c
index 5608038029..9a425ad295 100644
--- a/cesar/maximus/stationtest/src/test_ether.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_ether.c
@@ -8,7 +8,7 @@
/**
* \file test_ether.c
* \brief Test ether program.
- * \ingroup
+ * \ingroup
*/
#include <cyg/infra/diag.h>
@@ -20,7 +20,7 @@
#include "hal/ipmbox/maximus/inc/maximus_ipmbox_ctx.h" /* for 'ipmbox_t' */
#include "hal/ipmbox/maximus/inc/maximus_interrupts.h" /* for
'HAL_IPMBOX_..._INTERRUPT' */
-#include "maximus/common/types/ethernet_types.h" /* for 'ETHERNET_TYPE_...' */
+#include "maximus/common/types/ethernet_types.h"
#include "common/ipmbox/msg.h"
#include "common/defs/homeplugAV.h"
#include <stdlib.h> /* for 'malloc ()' */
@@ -164,7 +164,7 @@ init_ether (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *da
/* Now make the return parameter list. */
fcall_param_reset (*param);
- return 0;
+ return 0;
}
int
@@ -178,13 +178,13 @@ uninit_ether (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *
/* Now make the return parameter list. */
fcall_param_reset (*param);
- return 0;
+ return 0;
}
int
main (void)
{
- station_log_set_level (&my_station, STATION_LOG_DEBUG);
+ station_log_set_level (&my_station, STATION_LOG_NONE);
station_log_set_mask (&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/test_false_alarm.c b/cesar/maximus/python/utest/stationtest/src/test_false_alarm.c
index 17646a86c5..390baa4ac0 100644
--- a/cesar/maximus/stationtest/src/test_false_alarm.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_false_alarm.c
@@ -8,7 +8,7 @@
/**
* \file test_false_alarm.c
* \brief station executable used for test false alarm program
- * \ingroup
+ * \ingroup
*/
#include <cyg/infra/diag.h>
@@ -54,7 +54,7 @@ bool phy_access_conf_cb (void *user)
// Reset IT
maximus_pending_isrs &= (0 << PHY_HAL_INTERRUPT_PHY);
- return true;
+ return true;
}
bool phy_pbdma_cb (void *user, u32 status_word)
@@ -64,7 +64,7 @@ bool phy_pbdma_cb (void *user, u32 status_word)
// Reset IT
maximus_pending_isrs &= (0 << PHY_HAL_INTERRUPT_PBDMA);
- return true;
+ return true;
}
bool phy_tx_false_alarm_cb (void *user)
@@ -99,7 +99,7 @@ int init_phy (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
int activate_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
@@ -141,12 +141,12 @@ int uninit_phy (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
int main (void)
{
- station_log_set_level(&my_station, STATION_LOG_DEBUG);
+ station_log_set_level(&my_station, STATION_LOG_NONE);
station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/test_lib_cesar.c b/cesar/maximus/python/utest/stationtest/src/test_lib_cesar.c
index e5a63eda91..4cf93c751d 100644
--- a/cesar/maximus/stationtest/src/test_lib_cesar.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_lib_cesar.c
@@ -20,7 +20,7 @@
#include "hal/ipmbox/maximus/inc/maximus_ipmbox_ctx.h" /* for 'ipmbox_t' */
#include "hal/ipmbox/maximus/inc/maximus_interrupts.h" /* for
'HAL_IPMBOX_..._INTERRUPT' */
-#include "maximus/common/types/ethernet_types.h" /* for 'ETHERNET_TYPE_...' */
+#include "maximus/common/types/ethernet_types.h"
#include "common/ipmbox/msg.h"
#include "common/defs/homeplugAV.h"
@@ -132,13 +132,13 @@ uninit_ether (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg,
/* Now make the return parameter list. */
fcall_param_reset (*param);
- return 0;
+ return 0;
}
int
main (void)
{
- station_log_set_level (&my_station, STATION_LOG_WARNING);
+ station_log_set_level (&my_station, STATION_LOG_NONE);
station_log_set_mask (&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/test_log.c b/cesar/maximus/python/utest/stationtest/src/test_log.c
index 1329144d9f..68ff126172 100644
--- a/cesar/maximus/stationtest/src/test_log.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_log.c
@@ -18,7 +18,7 @@
#include "hal/ipmbox/maximus/inc/maximus_ipmbox_ctx.h" /* for 'ipmbox_t' */
#include "hal/ipmbox/maximus/inc/maximus_interrupts.h" /* for
'HAL_IPMBOX_..._INTERRUPT' */
-#include "maximus/common/types/ethernet_types.h" /* for 'ETHERNET_TYPE_...' */
+#include "maximus/common/types/ethernet_types.h"
#include "common/ipmbox/msg.h"
#include <cyg/infra/diag.h>
#include <stdio.h>
@@ -153,7 +153,7 @@ int test_log (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg,
memset (big, 'b', BIG_LEN - 1);
big[BIG_LEN - 1]='\0';
- station_log_set_level(&my_station, STATION_LOG_WARNING);
+ station_log_set_level(&my_station, STATION_LOG_NONE);
station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/test_send.c b/cesar/maximus/python/utest/stationtest/src/test_send.c
index bcb264b163..93229544cf 100644
--- a/cesar/maximus/stationtest/src/test_send.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_send.c
@@ -8,7 +8,7 @@
/**
* \file test_send.c
* \brief station executable used for the test send program
- * \ingroup
+ * \ingroup
*/
#include <cyg/infra/diag.h>
@@ -46,7 +46,7 @@ bool phy_rx_fc_cb (void *user, u32 rx_date, const u32 *fc_av)
phy_rx_prepare(ctx, 1, PHY_COMBO_PARAMS (mod, fecrate, pb_size),
(phy_gil_t)gil, 0, 1);
- return true;
+ return true;
}
bool phy_access_cb (void *user)
@@ -56,12 +56,12 @@ bool phy_access_cb (void *user)
bool phy_access_conf_cb (void *user)
{
- return true;
+ return true;
}
bool phy_pbdma_cb (void *user, u32 status_word)
{
- return true;
+ return true;
}
bool phy_tx_false_alarm_cb (void *user)
@@ -102,7 +102,7 @@ int set_tonemask (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void *data)
@@ -117,7 +117,7 @@ int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
int pb_length = MAC_MAX_PB_PER_MPDU;
static u8 pb_data[MAC_MAX_PB_PER_MPDU][MAC_PB520_BYTES];
static phy_pb_t pb[MAC_MAX_PB_PER_MPDU];
-
+
// For noise
int transfer_size = 128;
int chan_length = ((PHY_CARRIER_NB * sizeof(u16)) + ((4 * transfer_size) - 1 )) / (4 * transfer_size);
@@ -210,12 +210,12 @@ int uninit_phy (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
int main (void)
{
- station_log_set_level(&my_station, STATION_LOG_DEBUG);
+ station_log_set_level(&my_station, STATION_LOG_NONE);
station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/test_station.c b/cesar/maximus/python/utest/stationtest/src/test_station.c
index 4222991b1d..e0fa1305f7 100644
--- a/cesar/maximus/stationtest/src/test_station.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_station.c
@@ -18,7 +18,7 @@
#include "hal/ipmbox/maximus/inc/maximus_ipmbox_ctx.h" /* for 'ipmbox_t' */
#include "hal/ipmbox/maximus/inc/maximus_interrupts.h" /* for
'HAL_HLE_INTERRUPT_IPMBOX' */
-#include "maximus/common/types/ethernet_types.h" /* for 'ETHERNET_TYPE_...' */
+#include "maximus/common/types/ethernet_types.h"
#include "common/ipmbox/msg.h"
#include "common/defs/homeplugAV.h"
#include <cyg/infra/diag.h>
@@ -132,13 +132,13 @@ uninit_ether (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg,
/* Now make the return parameter list. */
fcall_param_reset (*param);
- return 0;
+ return 0;
}
int
main (void)
{
- station_log_set_level (&my_station, STATION_LOG_WARNING);
+ station_log_set_level (&my_station, STATION_LOG_NONE);
station_log_set_mask (&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/test_tx_rx.c b/cesar/maximus/python/utest/stationtest/src/test_tx_rx.c
index 63dcee8f23..3fba6e5941 100644
--- a/cesar/maximus/stationtest/src/test_tx_rx.c
+++ b/cesar/maximus/python/utest/stationtest/src/test_tx_rx.c
@@ -8,7 +8,7 @@
/**
* \file test_tx_rx.c
* \brief station executable used for the test tx rx program
- * \ingroup
+ * \ingroup
*/
#include <cyg/infra/diag.h>
@@ -138,7 +138,7 @@ bool phy_rx_fc_cb (void *user, u32 rx_date, const u32 *fc_av)
phy_rx_prepare(ctx, 1, PHY_COMBO_PARAMS (mod, fecrate, pb_size),
(phy_gil_t)gil, 0, 1);
- return true;
+ return true;
}
@@ -273,7 +273,7 @@ int set_tonemask (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, vo
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
@@ -325,13 +325,13 @@ int uninit_phy (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
/* now make the return parameter list */
fcall_param_reset(*param);
- return 0;
+ return 0;
}
int main (void)
{
- station_log_set_level(&my_station, STATION_LOG_DEBUG);
+ station_log_set_level(&my_station, STATION_LOG_NONE);
station_log_set_mask(&my_station, STATION_LOGTYPE_ALL);
my_station.pipe_log_fd = 1;
diff --git a/cesar/maximus/stationtest/src/threaddelay.c b/cesar/maximus/python/utest/stationtest/src/threaddelay.c
index f03a12f7ad..444ff34426 100644
--- a/cesar/maximus/stationtest/src/threaddelay.c
+++ b/cesar/maximus/python/utest/stationtest/src/threaddelay.c
@@ -44,7 +44,7 @@ void cyg_user_start(void)
cyg_thread_resume(my_thread_handle);
diag_write_string("Starting Scheduler... ");
-
+
cyg_scheduler_start();
}
diff --git a/cesar/maximus/run_tests b/cesar/maximus/run_tests
new file mode 100755
index 0000000000..21a62ceaf4
--- /dev/null
+++ b/cesar/maximus/run_tests
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+BASE=../..
+LOG=../../cesar/maximus/maximus.log
+
+TEST_FOLDER=$BASE/common/tests
+TEST_LIST="\
+ -d cesar/maximus \
+ -d cesar/hal/ipmbox/maximus \
+ -d cesar/hal/leon/maximus \
+ -d cesar/hal/phy/maximus \
+ -d cesar/host \
+ -d cesar/interface"
+
+cd $TEST_FOLDER
+./run-test.pl $TEST_LIST ../.. < tests > $LOG 2>&1
diff --git a/cesar/maximus/scheduler/Config b/cesar/maximus/scheduler/Config
new file mode 100644
index 0000000000..5c53022b6d
--- /dev/null
+++ b/cesar/maximus/scheduler/Config
@@ -0,0 +1 @@
+CONFIG_SCHEDULER_FASTER = n
diff --git a/cesar/maximus/scheduler/Module b/cesar/maximus/scheduler/Module
new file mode 100644
index 0000000000..2010eec5c7
--- /dev/null
+++ b/cesar/maximus/scheduler/Module
@@ -0,0 +1 @@
+SOURCES := Scheduler.cpp SchedulerEvent.cpp
diff --git a/cesar/maximus/scheduler/inc/Scheduler.h b/cesar/maximus/scheduler/inc/Scheduler.h
new file mode 100644
index 0000000000..a3424239ad
--- /dev/null
+++ b/cesar/maximus/scheduler/inc/Scheduler.h
@@ -0,0 +1,96 @@
+#ifndef maximus_scheduler_inc_scheduler_h
+#define maximus_scheduler_inc_scheduler_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/inc/Scheduler.h
+ * \ingroup maximus_scheduler
+ *
+ */
+
+#include "maximus/common/types/networkclock_types.h"
+#include "maximus/common/types/sci_types.h"
+#include "maximus/processors/processors.h"
+#include "maximus/sci/sci_msg.h"
+#include <map>
+
+class SchedulerEvent;
+typedef std::multimap <Network_Clock_Tick, SchedulerEvent> calendar_t;
+
+class Scheduler
+{
+private:
+
+ PhyProcessor &phy_proc;
+ ClockProcessor &netclock_proc;
+
+ calendar_t calendar;
+ Network_Clock_Tick current_tick;
+ Network_Clock_Tick max_tick;
+ bool is_max_tick_actived;
+
+public:
+
+ Scheduler (PhyProcessor &a, ClockProcessor &b);
+
+ virtual ~Scheduler ();
+
+ void set_max_tick (Network_Clock_Tick val);
+
+ inline void reset_time ()
+ {
+ current_tick = 0;
+ }
+
+ inline Network_Clock_Tick get_current_tick () const
+ {
+ return current_tick;
+ }
+
+ inline const Network_Clock_Tick *get_time_pointer () const
+ {
+ return &current_tick;
+ }
+
+ void add_phy_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id,
+ SciMsg *msg);
+
+ void add_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id,
+ Network_Clock_Type evt_type);
+
+ void process_next_event ();
+
+ void remove_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id);
+
+ void remove_sta_events (
+ Sci_Msg_Station_Id sta_id);
+
+private:
+
+ void add_generic_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id,
+ Network_Clock_Type evt_type,
+ SciMsg *msg);
+
+ void remove_generic_event (SchedulerEvent &evt);
+
+ void display_calendar () const;
+};
+
+#endif // maximus_scheduler_inc_scheduler_h
diff --git a/cesar/maximus/scheduler/inc/SchedulerEvent.h b/cesar/maximus/scheduler/inc/SchedulerEvent.h
new file mode 100644
index 0000000000..99b7597175
--- /dev/null
+++ b/cesar/maximus/scheduler/inc/SchedulerEvent.h
@@ -0,0 +1,80 @@
+#ifndef maximus_scheduler_inc_schedulerevent_h
+#define maximus_scheduler_inc_schedulerevent_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/inc/SchedulerEvent.h
+ * \ingroup maximus_scheduler
+ *
+ */
+
+#include "maximus/common/types/sci_types.h"
+#include "maximus/common/types/networkclock_types.h"
+#include "maximus/sci/sci_msg.h"
+
+
+class SchedulerEvent
+{
+private:
+ Sci_Msg_Station_Id sta_id;
+ Network_Clock_Id id;
+ Network_Clock_Type type;
+ SciMsg *msg;
+
+public:
+
+ SchedulerEvent (
+ Sci_Msg_Station_Id arg1,
+ Network_Clock_Id arg2,
+ Network_Clock_Type arg3,
+ SciMsg *arg4);
+
+ virtual ~SchedulerEvent ();
+
+ inline void set_sta_id (Sci_Msg_Station_Id val)
+ {
+ sta_id = val;
+ }
+
+ inline Sci_Msg_Station_Id get_sta_id () const
+ {
+ return sta_id;
+ }
+
+ inline void set_clock_id (Network_Clock_Id val)
+ {
+ id = val;
+ }
+
+ inline Network_Clock_Id get_clock_id () const
+ {
+ return id;
+ }
+
+ inline void set_clock_type (Network_Clock_Type val)
+ {
+ type = val;
+ }
+
+ inline Network_Clock_Type get_clock_type () const
+ {
+ return type;
+ }
+
+ inline void set_sci_msg (SciMsg *val)
+ {
+ msg = val;
+ }
+
+ inline SciMsg *get_sci_msg () const
+ {
+ return msg;
+ }
+};
+
+#endif // maximus_scheduler_inc_schedulerevent_h
diff --git a/cesar/maximus/scheduler/scheduler.h b/cesar/maximus/scheduler/scheduler.h
new file mode 100644
index 0000000000..aa949dd4ae
--- /dev/null
+++ b/cesar/maximus/scheduler/scheduler.h
@@ -0,0 +1,19 @@
+#ifndef maximus_scheduler_scheduler_h
+#define maximus_scheduler_scheduler_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/scheduler.h
+ * \ingroup maximus_scheduler
+ *
+ */
+
+/* Forward declaration. */
+class Scheduler;
+
+#endif /* maximus_scheduler_scheduler_h */
diff --git a/cesar/maximus/scheduler/src/Scheduler.cpp b/cesar/maximus/scheduler/src/Scheduler.cpp
new file mode 100644
index 0000000000..4a3e47ed90
--- /dev/null
+++ b/cesar/maximus/scheduler/src/Scheduler.cpp
@@ -0,0 +1,299 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/src/Scheduler.cpp
+ * \ingroup maximus_scheduler
+ *
+ */
+#include "maximus/scheduler/inc/Scheduler.h"
+#include "maximus/scheduler/inc/SchedulerEvent.h"
+#include "maximus/processors/inc/PhyProcessor.h"
+#include "maximus/processors/inc/ClockProcessor.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include "config/scheduler.h"
+#include <list>
+#include <assert.h>
+
+Scheduler::Scheduler (PhyProcessor &a, ClockProcessor &b):
+ phy_proc (a),
+ netclock_proc (b),
+ is_max_tick_actived (false)
+{
+ logFunction ();
+
+ current_tick = 0;
+}
+
+Scheduler::~Scheduler ()
+{
+ logFunction ();
+
+ calendar_t::iterator it;
+
+ while (!calendar.empty ())
+ {
+ it = calendar.begin ();
+ remove_generic_event (it->second);
+ calendar.erase (it);
+ }
+}
+
+inline void
+Scheduler::remove_generic_event (SchedulerEvent &evt)
+{
+ /* Note :
+ * Polymorphism possible on 'scheduler_drop_event ()'.
+ * */
+ if (evt.get_clock_type () == NETWORK_CLOCK_TYPE_PHY)
+ phy_proc.scheduler_drop_event (evt.get_sci_msg ());
+}
+
+inline void
+Scheduler::add_generic_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id,
+ Network_Clock_Type evt_type,
+ SciMsg *msg)
+{
+ logFunction ();
+
+ assert (current_tick <= tick);
+
+ bool is_event_already_exist = false;
+ static calendar_t::iterator it;
+ static std::pair <calendar_t::iterator, calendar_t::iterator> range;
+ range = calendar.equal_range (tick);
+
+ for (it = range.first ; it != range.second; ++it)
+ {
+ if ((it->second.get_sta_id () == sta_id)
+ && (it->second.get_clock_id () == clock_id))
+ {
+ is_event_already_exist = true;
+ break;
+ }
+ }
+
+ assert (!is_event_already_exist);
+
+ calendar.insert (
+#if CONFIG_SCHEDULER_FASTER
+ range.first,
+#endif
+ std::pair <Network_Clock_Tick, SchedulerEvent>
+ (tick, SchedulerEvent (sta_id, clock_id,
+ evt_type, msg)));
+}
+
+void
+Scheduler::set_max_tick (Network_Clock_Tick val)
+{
+ logFunction ();
+
+ if (val != 0)
+ {
+ is_max_tick_actived = true;
+ maximus_log (LOG_INFO, "max_tick is " << val);
+ assert (val >= current_tick);
+ }
+ else
+ {
+ is_max_tick_actived = false;;
+ maximus_log (LOG_INFO, "max_tick is unlimited");
+ }
+
+ max_tick = val;
+}
+
+void
+Scheduler::add_phy_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id,
+ SciMsg *msg)
+{
+ logFunction ();
+
+ if (msg)
+ add_generic_event (
+ tick, sta_id, clock_id, NETWORK_CLOCK_TYPE_PHY, msg);
+ else
+ maximus_log (LOG_ERROR, "pointer SciMsg is null");
+}
+
+void
+Scheduler::add_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id,
+ Network_Clock_Type evt_type)
+{
+ logFunction ();
+
+ if (evt_type != NETWORK_CLOCK_TYPE_PHY)
+ {
+ add_generic_event (
+ tick, sta_id, clock_id, evt_type, NULL);
+ }
+ else
+ maximus_log (LOG_ERROR, "add_event refuse PHY event");
+}
+
+void
+Scheduler::remove_event (
+ Network_Clock_Tick tick,
+ Sci_Msg_Station_Id sta_id,
+ Network_Clock_Id clock_id)
+{
+ logFunction ();
+
+ static calendar_t::iterator it;
+ static std::pair <calendar_t::iterator, calendar_t::iterator> range;
+ range = calendar.equal_range (tick);
+
+ for (it = range.first ; it != range.second; ++it)
+ {
+ if ((it->second.get_sta_id () == sta_id)
+ && (it->second.get_clock_id () == clock_id))
+ {
+ remove_generic_event (it->second);
+ calendar.erase (it);
+ maximus_log (LOG_INFO, "event erased");
+ break;
+ }
+ }
+}
+
+void
+Scheduler::remove_sta_events (
+ Sci_Msg_Station_Id sta_id)
+{
+ logFunction ();
+
+ static calendar_t::iterator it;
+ static std::list <calendar_t::iterator> todel;
+
+ for (it = calendar.begin (); it != calendar.end (); ++it)
+ {
+ if (it->second.get_sta_id () == sta_id)
+ {
+ remove_generic_event (it->second);
+ todel.push_back (it);
+ }
+ }
+
+ while (!todel.empty ())
+ {
+ it = todel.back ();
+ calendar.erase (it);
+ todel.pop_back ();
+ }
+}
+
+void
+Scheduler::process_next_event ()
+{
+ logFunction ();
+
+ bool is_calendar_empty = calendar.empty ();
+ bool is_max_tick_reach = false;
+ static Sci_Msg_Station_Id clock_staid;
+ static Network_Clock_Id clock_id;
+ static Network_Clock_Type clock_type;
+ static SciMsg *clock_msg;
+ static calendar_t::iterator next;
+
+ if (is_calendar_empty)
+ {
+ /* The user have requested to schedule, but there is nothing
+ * in the calendar. That could be the case, when no station exist.
+ * It's quite stupid, but it's like that. */
+ if (is_max_tick_actived && max_tick > current_tick)
+ {
+ is_max_tick_reach = true;
+ current_tick = max_tick;
+ }
+ }
+ else
+ {
+ next = calendar.begin ();
+ assert (current_tick <= next->first);
+
+ if (is_max_tick_actived && max_tick <= next->first)
+ {
+ is_max_tick_reach = true;
+ current_tick = max_tick;
+ }
+ else
+ current_tick = next->first;
+ }
+
+#if CONFIG_LOG
+ logger.updateTickValue (current_tick);
+ display_calendar ();
+#endif
+
+ if (is_max_tick_reach)
+ {
+ maximus_log (LOG_INFO, "Max tick reached");
+ }
+ else if (!is_calendar_empty)
+ {
+ clock_staid = next->second.get_sta_id ();
+ clock_id = next->second.get_clock_id ();
+ clock_type = next->second.get_clock_type ();
+ clock_msg = next->second.get_sci_msg ();
+ calendar.erase (next);
+
+ maximus_log (
+ LOG_INFO,
+ "Processing event at tick " << current_tick);
+
+ /* Note :
+ * Polymorphism possible on 'scheduler_send_event ()'.
+ * */
+ switch (clock_type)
+ {
+ case NETWORK_CLOCK_TYPE_STATION:
+ netclock_proc.scheduler_send_event (
+ clock_staid, clock_id, clock_msg);
+ break;
+
+ case NETWORK_CLOCK_TYPE_PHY:
+ phy_proc.scheduler_send_event (
+ clock_staid, clock_id, clock_msg);
+ break;
+
+ default:
+ /* Type not supported. */
+ assert (false);
+ break;
+ }
+ }
+}
+
+inline void
+Scheduler::display_calendar () const
+{
+#if CONFIG_LOG
+ maximus_log (LOG_INFO, "Calendar content :");
+
+ calendar_t::const_iterator it;
+ for (it = calendar.begin (); it != calendar.end (); ++it)
+ {
+ maximus_log (LOG_INFO, " ["
+ << std::hex << it->first << "] = {"
+ << "staid (" << std::hex << it->second.get_sta_id () << "), "
+ << "id (" << std::hex << it->second.get_clock_id () << "), "
+ << "type (" << std::hex << it->second.get_clock_type () << "), "
+ << "scimsg* (" << std::hex << it->second.get_sci_msg () << ")},");
+ }
+#endif
+}
diff --git a/cesar/maximus/scheduler/src/SchedulerEvent.cpp b/cesar/maximus/scheduler/src/SchedulerEvent.cpp
new file mode 100644
index 0000000000..35ddbf1a49
--- /dev/null
+++ b/cesar/maximus/scheduler/src/SchedulerEvent.cpp
@@ -0,0 +1,30 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/src/SchedulerEvent.cpp
+ * \ingroup maximus_scheduler
+ *
+ */
+
+#include "maximus/scheduler/inc/SchedulerEvent.h"
+
+SchedulerEvent::SchedulerEvent (
+ Sci_Msg_Station_Id arg1,
+ Network_Clock_Id arg2,
+ Network_Clock_Type arg3,
+ SciMsg *arg4):
+ sta_id (arg1),
+ id (arg2),
+ type (arg3),
+ msg (arg4)
+{
+}
+
+SchedulerEvent::~SchedulerEvent ()
+{
+}
diff --git a/cesar/maximus/scheduler/utest/Makefile b/cesar/maximus/scheduler/utest/Makefile
new file mode 100644
index 0000000000..4d5db916fa
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/Makefile
@@ -0,0 +1,19 @@
+BASE = ../../..
+
+HOST_PROGRAMS = scheduler_test
+
+scheduler_test_SOURCES = TestScheduler.cpp EventExpected.cpp
+scheduler_test_MODULES = lib maximus/lib/test maximus/utils maximus/scheduler \
+ maximus/processors maximus/sci
+
+# Modules stubbed for this unit test
+scheduler_test_SOURCES += fake_PhyProcessor.cpp fake_ClockProcessor.cpp \
+ fake_SciServer.cpp
+
+maximus_processors_MODULE_SOURCES = Processor.cpp
+maximus_sci_MODULE_SOURCES = ClockSciMsg.cpp PhySciMsg.cpp SciMsg.cpp
+
+EXTRA_HOST_CFLAGS := $(shell cppunit-config --cflags)
+EXTRA_HOST_LDLIBS := $(shell cppunit-config --libs)
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/maximus/scheduler/utest/inc/EventExpected.h b/cesar/maximus/scheduler/utest/inc/EventExpected.h
new file mode 100644
index 0000000000..cc91aa0657
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/inc/EventExpected.h
@@ -0,0 +1,79 @@
+#ifndef maximus_scheduler_utest_inc_eventexpected_h
+#define maximus_scheduler_utest_inc_eventexpected_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/inc/EventExpected.h
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include "maximus/common/types/networkclock_types.h"
+#include "maximus/common/types/sci_types.h"
+#include "maximus/sci/sci_msg.h"
+#include <list>
+
+class EventExpected
+{
+private:
+ Network_Clock_Tick tick;
+ Sci_Msg_Station_Id sta_id;
+ Network_Clock_Id clock_id;
+ Network_Clock_Type evt_type;
+ SciMsg *msg;
+
+public:
+ EventExpected (
+ Network_Clock_Tick a,
+ Sci_Msg_Station_Id b,
+ Network_Clock_Id c,
+ Network_Clock_Type d,
+ SciMsg *e);
+
+ ~EventExpected ();
+
+ inline bool operator == (EventExpected &comp) const
+ {
+ if (tick == comp.get_tick ()
+ && sta_id == comp.get_sta_id ()
+ && clock_id == comp.get_clock_id ()
+ && evt_type == comp.get_evt_type ()
+ && msg == comp.get_msg ())
+ return true;
+ else
+ return false;
+ }
+
+ inline Network_Clock_Tick get_tick () const
+ {
+ return tick;
+ }
+
+ inline Sci_Msg_Station_Id get_sta_id () const
+ {
+ return sta_id;
+ }
+
+ inline Network_Clock_Id get_clock_id () const
+ {
+ return clock_id;
+ }
+
+ inline Network_Clock_Type get_evt_type () const
+ {
+ return evt_type;
+ }
+
+ inline SciMsg *get_msg () const
+ {
+ return msg;
+ };
+};
+
+typedef std::list <EventExpected> list_event_t;
+
+#endif /* maximus_scheduler_utest_inc_eventexpected_h */
diff --git a/cesar/maximus/scheduler/utest/inc/TestScheduler.h b/cesar/maximus/scheduler/utest/inc/TestScheduler.h
new file mode 100644
index 0000000000..e29a0f6e5f
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/inc/TestScheduler.h
@@ -0,0 +1,60 @@
+#ifndef maximus_scheduler_utest_inc_testscheduler_h
+#define maximus_scheduler_utest_inc_testscheduler_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/inc/TestScheduler.h
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "maximus/scheduler/scheduler.h"
+#include "maximus/interface/station/station.h"
+#include "maximus/processors/processors.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/interface/maximus.h"
+#include "inc/EventExpected.h"
+
+class TestScheduler : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestScheduler);
+ CPPUNIT_TEST (test_add_events_ok);
+ CPPUNIT_TEST (test_max_tick);
+ CPPUNIT_TEST (test_remove_event);
+ CPPUNIT_TEST (test_remove_event_past);
+ CPPUNIT_TEST (test_remove_sta_events);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+
+ stations_list_t sta_list;
+ SciServer *fake_server;
+ Maximus *fake_maximus;
+ PhyProcessor *fake_phy_proc;
+ ClockProcessor *fake_clock_proc;
+ Scheduler *sched;
+
+ void init_procs (Scheduler *p);
+ void add_wanted_list (list_event_t &list);
+ void check_schedule (list_event_t &list);
+
+ void test_add_events_ok ();
+ void test_max_tick ();
+ void test_remove_event ();
+ void test_remove_event_past ();
+ void test_remove_sta_events ();
+};
+
+#endif /* maximus_scheduler_utest_inc_testscheduler_h */
diff --git a/cesar/maximus/scheduler/utest/inc/fake_Maximus.h b/cesar/maximus/scheduler/utest/inc/fake_Maximus.h
new file mode 100644
index 0000000000..b63ab5ef41
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/inc/fake_Maximus.h
@@ -0,0 +1,36 @@
+#ifndef maximus_scheduler_utest_inc_fake_maximus_h
+#define maximus_scheduler_utest_inc_fake_maximus_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/inc/fake_scheduler.h
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include "maximus/interface/inc/MaximusCallBack.h"
+
+class Maximus : public MaximusCallBack
+{
+public:
+ Maximus () {}
+
+ virtual ~Maximus () {}
+
+ void recv_ether_cb (
+ char *pdata,
+ int data_length,
+ Ethernet_Type type,
+ Sci_Msg_Station_Id sta_id) {}
+
+ void recv_phy_mpdu_cb (
+ unsigned long fc_10,
+ unsigned long *fc_av,
+ PhySciMsg &msg) {}
+};
+
+#endif /* maximus_scheduler_utest_inc_fake_maximus_h */
diff --git a/cesar/maximus/scheduler/utest/src/EventExpected.cpp b/cesar/maximus/scheduler/utest/src/EventExpected.cpp
new file mode 100644
index 0000000000..3d8d492071
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/src/EventExpected.cpp
@@ -0,0 +1,32 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/src/EventExpected.cpp
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+
+#include "inc/EventExpected.h"
+
+EventExpected::EventExpected (
+ Network_Clock_Tick a,
+ Sci_Msg_Station_Id b,
+ Network_Clock_Id c,
+ Network_Clock_Type d,
+ SciMsg *e):
+ tick (a),
+ sta_id (b),
+ clock_id (c),
+ evt_type (d),
+ msg (e)
+{
+}
+
+EventExpected::~EventExpected ()
+{
+}
diff --git a/cesar/maximus/scheduler/utest/src/TestScheduler.cpp b/cesar/maximus/scheduler/utest/src/TestScheduler.cpp
new file mode 100644
index 0000000000..8bfbea5ff8
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/src/TestScheduler.cpp
@@ -0,0 +1,298 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/src/TestScheduler.cpp
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include "maximus/scheduler/inc/Scheduler.h"
+#include "maximus/sci/inc/SciServer.h"
+#include "maximus/processors/inc/PhyProcessor.h"
+#include "maximus/processors/inc/ClockProcessor.h"
+#include "maximus/utils/inc/Error.h"
+#include "inc/TestScheduler.h"
+#include "inc/fake_Maximus.h"
+#include "inc/EventExpected.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestScheduler);
+list_event_t received;
+
+void
+TestScheduler::setUp ()
+{
+ fake_maximus = new Maximus ();
+ fake_server = new SciServer (sta_list);
+ fake_phy_proc = new PhyProcessor (*fake_server,
+ *fake_maximus);
+ fake_clock_proc = new ClockProcessor (*fake_server,
+ *fake_maximus);
+ sched = NULL;
+}
+
+void
+TestScheduler::tearDown ()
+{
+ delete fake_clock_proc;
+ delete fake_phy_proc;
+ delete fake_server;
+}
+
+inline void
+TestScheduler::init_procs (Scheduler *p)
+{
+ received.clear ();
+ fake_phy_proc->register_scheduler (sched);
+ fake_clock_proc->register_scheduler (sched);
+}
+
+inline void
+TestScheduler::add_wanted_list (list_event_t &list)
+{
+ list_event_t::iterator it;
+
+ for (it = list.begin (); it != list.end (); ++it)
+ {
+ if (it->get_evt_type () == NETWORK_CLOCK_TYPE_PHY)
+ sched->add_phy_event (
+ it->get_tick (),
+ it->get_sta_id (),
+ it->get_clock_id (),
+ it->get_msg ());
+ else
+ sched->add_event (
+ it->get_tick (),
+ it->get_sta_id (),
+ it->get_clock_id (),
+ it->get_evt_type ());
+ }
+}
+
+inline void
+TestScheduler::check_schedule (list_event_t &list)
+{
+ list_event_t::iterator it;
+ list_event_t::iterator it_rcv;
+ bool is_found;
+ uint id;
+ uint nb_event_expected;
+ Network_Clock_Tick prev_time;
+
+ prev_time = sched->get_current_tick ();
+ nb_event_expected = list.size ();
+
+ for (uint i = list.size (); i != 0; --i)
+ {
+ sched->process_next_event ();
+ CPPUNIT_ASSERT (prev_time <= sched->get_current_tick ());
+ }
+
+ CPPUNIT_ASSERT (nb_event_expected == received.size ());
+
+ id = 0;
+ for (it = list.begin (); it != list.end (); ++it)
+ {
+ ++id;
+ is_found = false;
+
+ for (it_rcv = received.begin ();
+ it_rcv != received.end ();
+ ++it_rcv)
+ {
+ if (*it == *it_rcv)
+ {
+ is_found = true;
+ break;
+ }
+ }
+
+ if (is_found)
+ received.erase (it_rcv);
+ else
+ {
+ std::ostringstream oss;
+ oss << "Event requested not received (" << id << ")";
+ CPPUNIT_FAIL (oss.str ());
+ }
+ }
+
+ sched->process_next_event ();
+ CPPUNIT_ASSERT (0 == received.size ());
+}
+
+void
+TestScheduler::test_add_events_ok ()
+{
+ std::cout << __func__ << std::endl;
+ sched = new Scheduler (*fake_phy_proc, *fake_clock_proc);
+ list_event_t wanted;
+ init_procs (sched);
+
+
+ /* With this list of events, we will test to received:
+ * - events sorted by tick,
+ * - on same tick, there is not sort mandatory,
+ * - all events must be received as there key are different.
+ */
+ wanted.push_back (
+ EventExpected (
+ 0, 25, 30, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 2, 25, 30, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 5, 25, 30, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 5, 25, 31, NETWORK_CLOCK_TYPE_PHY, (SciMsg *)0xDEADBEEF));
+ wanted.push_back (
+ EventExpected (
+ 5, 29, 31, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 6, 29, 31, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 30, 30, 31, NETWORK_CLOCK_TYPE_PHY, (SciMsg *)0xDEADBEEF));
+ wanted.push_back (
+ EventExpected (
+ 10, 40, 31, NETWORK_CLOCK_TYPE_PHY, (SciMsg *)0xDEADBEEF));
+
+ add_wanted_list (wanted);
+
+ CPPUNIT_ASSERT (sched->get_current_tick () == 0);
+ check_schedule (wanted);
+
+ delete sched;
+}
+
+void
+TestScheduler::test_max_tick ()
+{
+ std::cout << __func__ << std::endl;
+ sched = new Scheduler (*fake_phy_proc, *fake_clock_proc);
+ list_event_t wanted;
+ init_procs (sched);
+
+ sched->set_max_tick (200);
+
+ wanted.push_back (
+ EventExpected (
+ 600, 0, 0, NETWORK_CLOCK_TYPE_STATION, NULL));
+ add_wanted_list (wanted);
+ sched->process_next_event ();
+ CPPUNIT_ASSERT (200 == sched->get_current_tick ());
+ CPPUNIT_ASSERT (received.empty ());
+
+ sched->set_max_tick (0);
+ sched->process_next_event ();
+ CPPUNIT_ASSERT (600 == sched->get_current_tick ());
+ CPPUNIT_ASSERT (!received.empty ());
+ CPPUNIT_ASSERT (*received.begin () == *wanted.begin ());
+
+ delete sched;
+}
+
+void
+TestScheduler::test_remove_event ()
+{
+ std::cout << __func__ << std::endl;
+ list_event_t::iterator it;
+ sched = new Scheduler (*fake_phy_proc, *fake_clock_proc);
+ init_procs (sched);
+ list_event_t unwanted, wanted;
+
+ unwanted.push_back (
+ EventExpected (
+ 13, 14, 15, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 35, 15, 31, NETWORK_CLOCK_TYPE_PHY, (SciMsg *)0xBEEF));
+ unwanted.push_back (
+ EventExpected (
+ 35, 26, 40, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 45, 26, 40, NETWORK_CLOCK_TYPE_STATION, NULL));
+
+ add_wanted_list (wanted);
+ add_wanted_list (unwanted);
+
+ for (it = unwanted.begin (); it != unwanted.end (); ++it)
+ {
+ sched->remove_event (
+ it->get_tick (),
+ it->get_sta_id (),
+ it->get_clock_id ());
+ }
+ check_schedule (wanted);
+ delete sched;
+}
+
+void
+TestScheduler::test_remove_event_past ()
+{
+ std::cout << __func__ << std::endl;
+ list_event_t::iterator it;
+ sched = new Scheduler (*fake_phy_proc, *fake_clock_proc);
+ init_procs (sched);
+ list_event_t wanted_1, wanted_2;
+
+ wanted_1.push_back (
+ EventExpected (
+ 100, 14, 15, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted_2.push_back (
+ EventExpected (
+ 200, 15, 31, NETWORK_CLOCK_TYPE_PHY, (SciMsg *)0xBEEF));
+
+ add_wanted_list (wanted_1);
+ add_wanted_list (wanted_2);
+
+ sched->set_max_tick (150);
+ check_schedule (wanted_1);
+
+ /* should we have an error on this request ? */
+ sched->remove_event (40, 11, 12);
+
+ sched->set_max_tick (0);
+ check_schedule (wanted_2);
+ delete sched;
+}
+
+void
+TestScheduler::test_remove_sta_events ()
+{
+ std::cout << __func__ << std::endl;
+ list_event_t::iterator it;
+ sched = new Scheduler (*fake_phy_proc, *fake_clock_proc);
+ init_procs (sched);
+ Sci_Msg_Station_Id staid = 18;
+
+ list_event_t unwanted, wanted;
+
+ unwanted.push_back (
+ EventExpected (
+ 13, staid, 15, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 35, 15, 31, NETWORK_CLOCK_TYPE_PHY, (SciMsg *)0xBEEF));
+ unwanted.push_back (
+ EventExpected (
+ 35, staid, 40, NETWORK_CLOCK_TYPE_STATION, NULL));
+ wanted.push_back (
+ EventExpected (
+ 45, 26, 40, NETWORK_CLOCK_TYPE_STATION, NULL));
+
+ add_wanted_list (wanted);
+ add_wanted_list (unwanted);
+
+ sched->remove_sta_events (staid);
+ check_schedule (wanted);
+ delete sched;
+}
diff --git a/cesar/maximus/scheduler/utest/src/fake_ClockProcessor.cpp b/cesar/maximus/scheduler/utest/src/fake_ClockProcessor.cpp
new file mode 100644
index 0000000000..894196d0f8
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/src/fake_ClockProcessor.cpp
@@ -0,0 +1,56 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/src/fake_clock_proc.cpp
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include "maximus/processors/inc/ClockProcessor.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/scheduler/inc/Scheduler.h"
+#include "inc/EventExpected.h"
+
+extern list_event_t received;
+
+ClockProcessor::ClockProcessor (SciServer &ref1,
+ MaximusCallBack &ref2):
+ Processor (ref1, ref2, SCI_MSG_TYPE_NETWORK_CLOCK),
+ msg_to_send (0)
+
+{
+}
+
+ClockProcessor::~ClockProcessor ( )
+{
+}
+
+SciMsg *
+ClockProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ return NULL;
+}
+
+void
+ClockProcessor::dispatchMsgProc (SciMsg *msg_rx)
+{
+}
+
+void
+ClockProcessor::scheduler_send_event (
+ Sci_Msg_Station_Id clock_staid,
+ Network_Clock_Id clock_id,
+ SciMsg *msg)
+{
+ received.push_back (EventExpected (
+ p_scheduler->get_current_tick (),
+ clock_staid, clock_id,
+ NETWORK_CLOCK_TYPE_STATION,
+ msg));
+}
diff --git a/cesar/maximus/scheduler/utest/src/fake_PhyProcessor.cpp b/cesar/maximus/scheduler/utest/src/fake_PhyProcessor.cpp
new file mode 100644
index 0000000000..9ee39e455d
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/src/fake_PhyProcessor.cpp
@@ -0,0 +1,202 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/src/fake_phy_proc.cpp
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include "maximus/processors/inc/PhyProcessor.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/scheduler/inc/Scheduler.h"
+#include "inc/EventExpected.h"
+
+extern list_event_t received;
+
+PhyProcessor::PhyProcessor (SciServer &ref1,
+ MaximusCallBack &ref2):
+ Processor (ref1, ref2, SCI_MSG_TYPE_PHY),
+ PhySciMsg_ZeroCross (0),
+ PhySciMsg_WrongPre (0)
+{
+}
+
+PhyProcessor::~PhyProcessor ()
+{
+}
+
+SciMsg *
+PhyProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ return NULL;
+}
+
+void
+PhyProcessor::scheduler_drop_event (SciMsg *msg)
+{
+}
+
+void
+PhyProcessor::mpdu_schedule (
+ MsgMpdu *msg,
+ PhySciMsg *preamble,
+ PhySciMsg *fc,
+ PhySciMsg *payload)
+{
+}
+
+void
+PhyProcessor::dispatchMsgProc (SciMsg *msg_rx)
+{
+}
+
+void
+PhyProcessor::scheduler_send_event (
+ Sci_Msg_Station_Id clock_staid,
+ Network_Clock_Id clock_id,
+ SciMsg *msg)
+{
+ received.push_back (EventExpected (
+ p_scheduler->get_current_tick (),
+ clock_staid, clock_id,
+ NETWORK_CLOCK_TYPE_PHY,
+ msg));
+}
+
+void
+PhyProcessor::receiveInvalid (PhySciMsg &sci)
+{
+}
+
+void
+PhyProcessor::receivePre (PhySciMsg &sci)
+{
+}
+
+void
+PhyProcessor::receiveFc (PhySciMsg &sci)
+{
+}
+
+void
+PhyProcessor::receivePrs (PhySciMsg &sci)
+{
+}
+
+void
+PhyProcessor::receive_payload (PhySciMsg &sci)
+{
+}
+
+void
+PhyProcessor::receiveTonemask (PhySciMsg &sci)
+{
+}
+
+void
+PhyProcessor::receiveTonemap (PhySciMsg & sci)
+{
+}
+
+void
+PhyProcessor::receive_rx (PhySciMsg &sci)
+{
+}
+
+void
+PhyProcessor::activateFalseAlarm (
+ const Network_Clock_Tick avg_interval,
+ const float deviation)
+{
+}
+
+void
+PhyProcessor::deactivateFalseAlarm ()
+{
+}
+
+void
+PhyProcessor::set_zerocross_freq (const float frequency)
+{
+}
+
+bool
+PhyProcessor::setChannel (
+ ChannelComputer * p_channel)
+{
+ return false;
+}
+
+ChannelComputer *
+PhyProcessor::getChannel () const
+{
+ return NULL;
+}
+
+bool
+PhyProcessor::setIsChannelEnabled (
+ const bool is_channel_enabled)
+{
+ return false;
+}
+
+bool
+PhyProcessor::isChannelEnabled () const
+{
+ return false;
+}
+
+unsigned int
+PhyProcessor::getNbOfCarriers () const
+{
+ return 0;
+}
+
+bool
+PhyProcessor::setNbOfCarriers (
+ const unsigned int nb_of_carriers)
+{
+ return false;
+}
+
+const uint8_t *
+PhyProcessor::getTonemask () const
+{
+ return NULL;
+}
+
+void
+PhyProcessor::setTonemask (
+ const unsigned int length,
+ const uint8_t * p_tonemask)
+{
+}
+
+void
+PhyProcessor::schedule_next_zero_cross ()
+{
+}
+
+inline void
+PhyProcessor::send_mpdu_and_noise (PhySciMsg &sci_payload)
+{
+}
+
+Network_Clock_Tick
+PhyProcessor::roll_die_next_interval () const
+{
+ return 0;
+}
+
+bool
+PhyProcessor::scheduleNextWrongPre (
+ const Network_Clock_Tick next_interval)
+{
+ return false;
+}
diff --git a/cesar/maximus/scheduler/utest/src/fake_SciServer.cpp b/cesar/maximus/scheduler/utest/src/fake_SciServer.cpp
new file mode 100644
index 0000000000..d557856180
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/src/fake_SciServer.cpp
@@ -0,0 +1,70 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/src/fake_server.cpp
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include "maximus/sci/inc/SciServer.h"
+
+SciServer::SciServer (stations_list_t &ref1):
+ sta_list (ref1)
+{
+}
+
+SciServer::~SciServer ()
+{
+}
+
+void
+SciServer::process () const
+{
+}
+
+void
+SciServer::log () const
+{
+}
+
+inline void
+SciServer::send_SciMsg_to_Station (
+ const SciMsg &sci_msg,
+ Station &dsta) const
+{
+}
+
+void
+SciServer::sendSciMsg (
+ const SciMsg &sci_msg_to_send, const Sci_Msg_Station_Id station_id) const
+{
+}
+
+bool
+SciServer::sendSciMsgToAllActiveStations (
+ SciMsg &sci_msg_to_send) const
+{
+ return false;
+}
+
+void
+SciServer::register_processor (
+ const Sci_Msg_Type sci_msg_type,
+ Processor *client)
+{
+}
+
+void
+SciServer::unregister_processor (
+ const Sci_Msg_Type sci_msg_type)
+{
+}
+
+void
+SciServer::check_if_server_ready ()
+{
+}
diff --git a/cesar/maximus/sci/Module b/cesar/maximus/sci/Module
index b9b574b21c..00648a5371 100644
--- a/cesar/maximus/sci/Module
+++ b/cesar/maximus/sci/Module
@@ -1,5 +1,7 @@
SOURCES := SciMsg.cpp SciServer.cpp
-ifdef UNITTEST
-SOURCES += SciServerTest.cpp SciMsgTest.cpp
-endif
-HOST_INCLUDES += maximus/sci/inc
+
+SOURCES += EtherSciMsg.cpp
+SOURCES += FunctionSciMsg.cpp
+SOURCES += ClockSciMsg.cpp
+SOURCES += PhySciMsg.cpp
+SOURCES += SystemSciMsg.cpp
diff --git a/cesar/maximus/sci/inc/ClockSciMsg.h b/cesar/maximus/sci/inc/ClockSciMsg.h
new file mode 100644
index 0000000000..4efb150c45
--- /dev/null
+++ b/cesar/maximus/sci/inc/ClockSciMsg.h
@@ -0,0 +1,87 @@
+#ifndef maximus_sci_inc_clockscimsg_h
+#define maximus_sci_inc_clockscimsg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/inc/ClockSciMsg.h
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/common/types/sci_types.h"
+#include "maximus/common/types/networkclock_types.h"
+
+
+class ClockSciMsg : public SciMsg
+{
+private:
+
+ Network_Clock_Header *p_clock_header;
+ unsigned char *p_clock_data;
+
+ /* Clock Header fields : */
+ uint8_t h_clock_version;
+ Network_Clock_Type h_clock_type;
+ Network_Clock_Id h_clock_id;
+ uint16_t h_clock_flags;
+ uint16_t h_clock_reserved;
+ Network_Clock_Tick h_clock_tick;
+
+public:
+
+ /**
+ * Constructor used for RX path:
+ * when a SciMsg come from SciServer.
+ */
+ ClockSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ /**
+ * Constructor used for TX path:
+ * when network Processor want to send a message to the SciServer.
+ */
+ ClockSciMsg (size_t size_of_data);
+
+ virtual ~ClockSciMsg ();
+
+ void display_specialized_header () const;
+
+ void setup_and_send (SciServer &SciServer);
+
+ inline uint8_t get_clock_version () const
+ {
+ return h_clock_version;
+ }
+
+ inline Network_Clock_Type get_clock_type () const
+ {
+ return h_clock_type;
+ }
+
+ inline void set_clock_type (Network_Clock_Type val)
+ {
+ h_clock_type = val;
+ }
+
+ inline Network_Clock_Id get_clock_id () const
+ {
+ return h_clock_id;
+ }
+
+ inline void set_clock_id (Network_Clock_Id val)
+ {
+ h_clock_id = val;
+ }
+
+ inline Network_Clock_Tick get_clock_tick ()
+ {
+ return h_clock_tick;
+ }
+};
+
+#endif // maximus_sci_inc_clockscimsg_h
diff --git a/cesar/maximus/sci/inc/EtherSciMsg.h b/cesar/maximus/sci/inc/EtherSciMsg.h
new file mode 100644
index 0000000000..ef4542f260
--- /dev/null
+++ b/cesar/maximus/sci/inc/EtherSciMsg.h
@@ -0,0 +1,79 @@
+#ifndef maximus_sci_inc_etherscimsg_h
+#define maximus_sci_inc_etherscimsg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/inc/EtherSciMsg.h
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/common/types/ethernet_types.h"
+
+
+class EtherSciMsg : public SciMsg
+{
+private:
+
+ Ethernet_Header *p_ether_header;
+ unsigned char *p_ether_data;
+
+ uint8_t h_ether_version;
+ Ethernet_Type h_ether_type;
+ uint8_t h_ether_flags;
+ uint8_t h_ether_reserved;
+
+public:
+
+ /**
+ * Constructor used for RX path:
+ * when a SciMsg come from SciServer.
+ */
+ EtherSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc);
+
+ /**
+ * Constructor used for TX path:
+ * when ethernet Processor want to send a message to the SciServer.
+ */
+ EtherSciMsg (size_t size_of_data);
+
+ virtual ~EtherSciMsg ( );
+
+ void display_specialized_header ( ) const;
+
+ void setup_and_send (SciServer &SciServer);
+
+ inline uint8_t get_ether_version () const
+ {
+ return h_ether_version;
+ }
+
+ inline Ethernet_Type get_ether_type () const
+ {
+ return h_ether_type;
+ }
+
+ inline void set_ether_type (Ethernet_Type val)
+ {
+ h_ether_type = val;
+ }
+
+ inline size_t get_ether_data_size () const
+ {
+ return (get_sci_datalength ()
+ - sizeof (Ethernet_Header));
+ }
+
+ inline unsigned char *get_ether_data_addr ()
+ {
+ return p_ether_data;
+ }
+};
+
+#endif // maximus_sci_inc_etherscimsg_h
diff --git a/cesar/maximus/sci/inc/FunctionSciMsg.h b/cesar/maximus/sci/inc/FunctionSciMsg.h
new file mode 100644
index 0000000000..74f8c632a0
--- /dev/null
+++ b/cesar/maximus/sci/inc/FunctionSciMsg.h
@@ -0,0 +1,94 @@
+#ifndef maximus_sci_inc_functionscimsg_h
+#define maximus_sci_inc_functionscimsg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/inc/FunctionSciMsg.h
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/common/types/functioncall_types.h"
+#include "maximus/common/types/sci_types.h"
+
+
+class FunctionSciMsg : public SciMsg
+{
+private:
+
+ Function_Call_Header *p_fc_header;
+ unsigned char *p_fc_data;
+
+ uint8_t h_fc_version;
+ Function_Call_Type h_fc_type;
+ Function_Call_Msg_Id h_fc_msgid;
+ Function_Call_Parameters_Number h_fc_param_nb;
+ uint8_t h_fc_flags;
+ uint16_t h_fc_reserved;
+
+public:
+
+ /**
+ * Constructor used for RX path:
+ * when a SciMsg come from SciServer.
+ */
+ FunctionSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc);
+
+ /**
+ * Constructor used for TX path:
+ * when FunctionCall Processor want to send a message to the SciServer.
+ */
+ FunctionSciMsg (size_t size_of_data);
+
+ virtual ~FunctionSciMsg ();
+
+ void setup_and_send (SciServer &SciServer);
+
+ void display_specialized_header () const;
+
+ /* patch */
+ void patch_to_get_data (
+ unsigned char **pp_data,
+ unsigned int *p_data_length,
+ Function_Call_Msg_Id *p_msg_id_rx,
+ Function_Call_Parameters_Number *p_param_nb) const;
+
+ inline uint8_t get_fc_version () const
+ {
+ return h_fc_version;
+ }
+
+ inline Function_Call_Type get_fc_type () const
+ {
+ return h_fc_type;
+ }
+
+ inline Function_Call_Msg_Id get_fc_msgid () const
+ {
+ return h_fc_msgid;
+ }
+
+ inline unsigned char *get_fc_data_addr ()
+ {
+ return p_fc_data;
+ }
+
+ inline void set_fc_msg_id (Function_Call_Msg_Id val)
+ {
+ h_fc_msgid = val;
+ }
+
+ inline void set_fc_param_nb (
+ Function_Call_Parameters_Number val)
+ {
+ h_fc_param_nb = val;
+ }
+};
+
+#endif // maximus_sci_inc_functionscimsg_h
diff --git a/cesar/maximus/sci/inc/ISci.h b/cesar/maximus/sci/inc/ISci.h
deleted file mode 100644
index cea7f4b954..0000000000
--- a/cesar/maximus/sci/inc/ISci.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/************************************************************************
- ISci.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/sci/inc/ISci.h
-**************************************************************************/
-
-#ifndef ISCI_H
-#define ISCI_H
-
-#include "ISystem.h"
-
-#include "networkclock_types.h"
-#include "sci_types.h"
-
-#include <string>
-#include <vector>
-
-class SciMsg;
-
-typedef std::vector<Sci_Msg_Station_Id> DestStationsList;
-
-
-/**
- * class ISci
- */
-
-class ISci
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- ISci ( ) { }
-
- /**
- * Empty Destructor
- */
- virtual ~ISci ( ) { }
-
- // public methods
- //
-
- /**
- * @return bool
- * @param station_log_file
- */
- virtual bool init ( const std::string station_log ) = 0;
-
- /**
- * @return bool
- */
- virtual bool process ( ) = 0;
-
- /**
- * @return bool
- * @param sci_msg_to_send
- */
- virtual bool fillSciMsg ( SciMsg & sci_msg_to_send ) const = 0;
-
- /**
- * @return bool
- * @param sci_msg_to_send
- */
- virtual bool sendSciMsg ( const SciMsg & sci_msg_to_send ) const = 0;
-
- /**
- * @return bool
- * @param sci_msg_to_send
- */
- virtual bool sendSciMsgToAllActiveStations ( SciMsg & sci_msg_to_send ) const = 0;
-
- /**
- * @return bool
- * @param sci_msg_to_send
- * @param list_of_dest_stations
- */
- virtual bool sendSciMsgToDestStations ( SciMsg & sci_msg_to_send, DestStationsList & list_of_dest_stations ) const = 0;
-
- /**
- * Set a value into mpSpecializedSciMsgArray
- * @return bool
- * @param sci_msg_type the array position to set
- * @param sci_msg the new value of mpSpecializedSciMsgArray[sci_msg_type]
- */
- virtual bool registerSpecializedSciMsg ( const Sci_Msg_Type sci_msg_type, SciMsg * sci_msg ) = 0;
-
- /**
- * @return bool
- * @param header
- * @param data_length
- * @param received_data
- */
- virtual bool receiveMsg ( const Sci_Msg_Header * header,
- const unsigned long data_length,
- const unsigned char * received_data ) const = 0;
-
- virtual void displaySpecializedSciMsgArray ( ) const = 0;
-
- /**
- * @return bool
- * @param p_list_of_stations
- */
- virtual bool setStationsList ( StationsList * p_list_of_stations ) = 0;
-
- /**
- * @return bool
- * @param current_tick_value
- */
- virtual bool updateTickValue ( const Network_Clock_Tick current_tick_value ) = 0;
-
-};
-
-
-#endif // ISCI_H
diff --git a/cesar/maximus/sci/inc/PhySciMsg.h b/cesar/maximus/sci/inc/PhySciMsg.h
new file mode 100644
index 0000000000..b6f59c50bc
--- /dev/null
+++ b/cesar/maximus/sci/inc/PhySciMsg.h
@@ -0,0 +1,232 @@
+#ifndef maximus_sci_inc_physcimsg_h
+#define maximus_sci_inc_physcimsg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/phy/inc/PhySciMsg.h
+ * \ingroup maximus_phy
+ *
+ */
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/common/types/hal_phy_types.h"
+#include "maximus/common/types/phy_types.h"
+#include "maximus/common/types/hal_phy_types.h"
+#include "maximus/common/types/networkclock_types.h"
+#include <cstring>
+#include <assert.h>
+
+class PhySciMsg : public SciMsg
+{
+private:
+ Phy_Header *p_phy_header;
+ unsigned char *p_phy_data;
+
+ unsigned int phy_version;
+ Phy_Type phy_type;
+ Phy_Mpdu_Format phy_mpdu_format;
+ Phy_Nb_Of_Pbs phy_pb_nb;
+ uint8_t phy_msg_nb;
+ Phy_Fc_Mode phy_fc_mode;
+ Phy_Short_Ppdu phy_short_ppdu;
+ Phy_Mod phy_mod;
+ Phy_Fecrate phy_fecrate;
+ Phy_Gil phy_gil;
+ Phy_Tonemap_Index phy_tonemap_index;
+ Phy_Tx_Id phy_tx_id;
+ Phy_Flags phy_flags;
+ Phy_Nb_Of_Symbols phy_symbol_nb;
+ uint32_t phy_iv[3];
+ uint32_t phy_nek[4];
+ uint32_t phy_pb_measurement[MAC_MAX_PB_PER_MPDU];
+ uint32_t phy_pb_header[MAC_MAX_PB_PER_MPDU];
+
+private:
+
+ inline void setup ();
+
+public:
+
+ /**
+ * Constructor used for RX path:
+ * when a SciMsg come from SciServer.
+ */
+ PhySciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc);
+
+ /**
+ * Constructor used for TX path:
+ * when network Processor want to send a message to the SciServer.
+ */
+ PhySciMsg (size_t size_of_data);
+
+ virtual ~PhySciMsg ( );
+
+ inline unsigned int get_phy_version () const
+ {
+ return phy_version;
+ }
+
+ inline unsigned char *get_phy_data_addr () const
+ {
+ return p_phy_data;
+ }
+
+ inline size_t get_phy_data_size () const
+ {
+ return (get_sci_datalength () - sizeof (Phy_Header));
+ }
+
+ void setup_and_send (SciServer &SciServer, const Sci_Msg_Station_Id dst_sta);
+ void setup_and_send_to_all (SciServer &SciServer);
+
+ void display_specialized_header ( ) const;
+
+ bool check_phy_fields () const;
+
+ /*
+ * Method to read/write header fields.
+ */
+ inline void set_phy_type (Phy_Type val)
+ {
+ phy_type = val;
+ }
+
+ inline Phy_Type get_phy_type ()
+ {
+ return phy_type;
+ }
+
+ inline void set_phy_MpduFormat (Phy_Mpdu_Format val)
+ {
+ phy_mpdu_format = val;
+ }
+
+ inline Phy_Mpdu_Format get_phy_MpduFormat () const
+ {
+ return phy_mpdu_format;
+ }
+
+ inline void set_phy_NbOfPbs (Phy_Nb_Of_Pbs val)
+ {
+ phy_pb_nb = val;
+ }
+
+ inline Phy_Nb_Of_Pbs get_phy_NbOfPbs () const
+ {
+ return phy_pb_nb;
+ }
+
+ inline Phy_Fc_Mode get_phy_FcMode () const
+ {
+ return phy_fc_mode;
+ }
+
+ inline void set_phy_shortppdu (Phy_Short_Ppdu val)
+ {
+ phy_short_ppdu = val;
+ }
+
+ inline Phy_Short_Ppdu get_phy_shortppdu () const
+ {
+ return phy_short_ppdu;
+ }
+
+ inline void set_phy_mod (Phy_Mod val)
+ {
+ phy_mod = val;
+ }
+
+ inline Phy_Mod get_phy_mod () const
+ {
+ return phy_mod;
+ }
+
+ inline void set_phy_FecRate (Phy_Fecrate val)
+ {
+ phy_fecrate = val;
+ }
+
+ inline Phy_Fecrate get_phy_FecRate () const
+ {
+ return phy_fecrate;
+ }
+
+ inline void set_phy_gil (Phy_Gil val)
+ {
+ phy_gil = val;
+ }
+
+ inline Phy_Gil get_phy_gil () const
+ {
+ return phy_gil;
+ }
+
+ inline void set_phy_TxId (Phy_Tx_Id val)
+ {
+ phy_tx_id = val;
+ }
+
+ inline Phy_Tx_Id get_phy_TxId () const
+ {
+ return phy_tx_id;
+ }
+
+ inline size_t get_phy_PbSize ()
+ {
+ if (phy_flags & PHY_FLAG_PB512)
+ return MAC_PB520_BYTES;
+ else
+ return MAC_PB136_BYTES;
+ }
+
+ inline void set_phy_flags (Phy_Flags val)
+ {
+ phy_flags = val;
+ }
+
+ inline Phy_Flags get_phy_flags () const
+ {
+ return phy_flags;
+ }
+
+ inline Phy_Nb_Of_Symbols getNbOfSymbols () const
+ {
+ return phy_symbol_nb;
+ }
+
+ inline uint32_t *get_phy_PbMeasurement ()
+ {
+ return phy_pb_measurement;
+ }
+
+ inline void set_phy_PbMeasurement (const uint32_t *val)
+ {
+ memcpy (phy_pb_measurement,
+ val,
+ MAC_MAX_PB_PER_MPDU * sizeof (uint32_t));
+ }
+
+ inline void set_phy_PbHeader (
+ const int offset, const uint32_t val)
+ {
+ assert (offset < MAC_MAX_PB_PER_MPDU);
+ phy_pb_header[offset] = val;
+ }
+
+ inline void set_phy_PbHeaders (const uint32_t *val)
+ {
+ memcpy (phy_pb_header, val, MAC_MAX_PB_PER_MPDU * sizeof (uint32_t));
+ }
+
+ inline uint32_t *get_phy_PbHeaders ()
+ {
+ return phy_pb_header;
+ }
+};
+
+#endif // maximus_sci_inc_physcimsg_h
diff --git a/cesar/maximus/sci/inc/SciMsg.h b/cesar/maximus/sci/inc/SciMsg.h
index 7ed2608be5..b3e617e54a 100644
--- a/cesar/maximus/sci/inc/SciMsg.h
+++ b/cesar/maximus/sci/inc/SciMsg.h
@@ -1,333 +1,121 @@
-/************************************************************************
- SciMsg.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/sci/inc/SciMsg.h
-**************************************************************************/
-
-#ifndef SCIMSG_H
-#define SCIMSG_H
-
-#include "sci_types.h"
-
-
+#ifndef maximus_sci_inc_scimsg_h
+#define maximus_sci_inc_scimsg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
/**
- * class SciMsg
- */
+ * \file maximus/sci/inc/SciMsg.h
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/sci/sci_msg.h"
+#include <cstring>
class SciMsg
{
-
-public:
-
- // public attributes
- //
-
private:
+ /* Sci Header in host format. */
+ Sci_Msg_Type h_sci_type;
+ size_t h_sci_length;
+ Sci_Msg_Station_Id h_sci_staid;
+ uint16_t h_sci_msgid;
+ Network_Clock_Tick h_sci_tick;
+ Sci_Msg_Flag h_sci_flags;
+ uint16_t h_sci_reserved;
+
+ /* Pointer on memory allocated. */
+ unsigned char *p_alloc;
+ Sci_Msg_Header *p_sci_header;
+ unsigned char *p_sci_data;
+
+ /* local forced sci field. */
+ static Sci_Msg_Id maximus_sci_txid;
- // private attributes
- //
-
- Sci_Msg_Status mSciMsgStatus; // NOT USED YET
-
- // Values of SCI message header
- //
- Sci_Msg_Type mSciMsgType;
- Sci_Msg_Station_Id mSciMsgStationId;
- static Sci_Msg_Id mSciMsgId; // to send to station
- Sci_Msg_Flag mSciMsgFlag;
-
- // SCI message header, SCI message data length, and SCI message data
- //
- Sci_Msg_Header mSciMsgHeader;
- unsigned long mSciMsgDataLength;
- unsigned char * mpSciMsgData;
-
-protected:
-
- // protected attributes
- //
-
- // Specialized SCI message header size, specialized SCI message data length, and specialized SCI message data
- //
- unsigned long mSpecializedSciMsgHeaderSize;
- unsigned long mSpecializedSciMsgDataLength;
- unsigned char * mpSpecializedSciMsgData;
-
public:
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- SciMsg ( );
-
- /**
- * Copy Constructors
- */
- SciMsg ( const SciMsg & sci_msg );
- SciMsg ( const SciMsg * p_sci_msg );
-
- /**
- * Empty Destructor
- */
- virtual ~SciMsg ( );
-
- // public methods
- //
-
- /**
- * @return SciMsg *
- */
- virtual SciMsg * create ( ) const = 0;
-
- /**
- * @return bool
- */
- virtual bool dispatchMsg ( ) = 0;
-
- /**
- * @return bool
- */
- virtual bool identifySpecializedSciMsgHeader ( ) = 0;
-
- /**
- * @return bool
- */
- virtual bool checkCompatibility ( ) const;
-
- /**
- * @return bool
- */
- virtual bool checkValidity ( ) const;
-
- /**
- * @return bool
- */
- bool identifySpecializedSciMsgData ( );
-
- void displaySciMsgHeader ( ) const;
-
- void displaySciMsgData ( ) const;
-
- virtual void displaySpecializedSciMsgHeader ( ) const = 0;
-
- /**
- * Display the specialized SCI message type.
- */
- virtual void displaySpecializedSciMsgType ( int log_level ) const = 0;
-
- void displaySpecializedSciMsgData ( ) const;
-
- /**
- * @return SCI_MSG_MAGIC converted to uint32_t
- */
- uint32_t getDefinedSciMsgMagicId ( ) const;
-
- /**
- * @return SCI_MSG_VERSION
- */
- uint8_t getDefinedSciMsgVersion ( ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return mSciMsgStatus
- */
- Sci_Msg_Status getSciMsgStatus ( ) const;
+ /**
+ * Constructor used for RX path:
+ * when a SciMsg come from SciServer.
+ */
+ SciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_buffer);
- /**
- * @return bool
- * @param status the new value of mSciMsgStatus
- */
- bool setSciMsgStatus ( const Sci_Msg_Status status );
+ /**
+ * Constructor used for TX path:
+ * when one Processor want to send a message to the SciServer.
+ */
+ SciMsg (const size_t sci_data_size,
+ const Sci_Msg_Type sci_type);
- /**
- * @return the value of mSciMsgType
- */
- Sci_Msg_Type getSciMsgType ( ) const;
- /**
- * @return bool
- * @param type the new value of mSciMsgType
- */
- bool setSciMsgType ( const Sci_Msg_Type type );
+ virtual ~SciMsg ();
- /**
- * Get the value of mSciMsgStationId
- * @return the value of mSciMsgStationId
- */
- Sci_Msg_Station_Id getSciMsgStationId ( ) const;
+ /* Polymorphism claim. */
+ virtual void display_specialized_header () const = 0;
- /**
- * Set the value of mSciMsgStationId
- * @return bool
- * @param station_id the new value of mSciMsgStationId
- */
- bool setSciMsgStationId ( const Sci_Msg_Station_Id station_id );
+ inline const unsigned char *get_sci_alloc_addr () const
+ {
+ return p_alloc;
+ }
- /**
- * Get the value of mSciMsgId
- * @return the value of mSciMsgId
- */
- Sci_Msg_Id getSciMsgId ( ) const;
+ inline size_t get_sci_alloc_size () const
+ {
+ return h_sci_length + sizeof (Sci_Msg_Header);
+ }
- /**
- * Increment the value of mSciMsgId
- * @return bool
- */
- bool incrementSciMsgId ( );
+ inline unsigned char *get_sci_data_addr () const
+ {
+ return p_sci_data;
+ }
- /**
- * @return the value of mSciMsgFlag
- */
- Sci_Msg_Flag getSciMsgFlag ( ) const;
+ inline size_t get_sci_datalength () const
+ {
+ return h_sci_length;
+ }
- /**
- * @return bool
- * @param flag the new value of mSciMsgFlag
- */
- bool setSciMsgFlag ( const Sci_Msg_Flag flag );
+ inline Sci_Msg_Station_Id get_sci_stationid () const
+ {
+ return h_sci_staid;
+ }
- /**
- * @return a pointer to mSciMsgHeader
- */
- Sci_Msg_Header * getSciMsgHeader ( ) const;
+ inline void set_sci_stationid (Sci_Msg_Station_Id val)
+ {
+ h_sci_staid = val;
+ }
- /**
- * @return bool
- * @param sci_msg_header the new value of mSciMsgHeader
- */
- bool setSciMsgHeader ( const Sci_Msg_Header & sci_msg_header );
+ void display_sci_header () const;
- /**
- * Get the value of mSciMsgDataLength
- * @return the value of mSciMsgDataLength
- */
- unsigned long getSciMsgDataLength ( ) const;
-
- /**
- * Set the value of mSciMsgDataLength
- * @return bool
- * @param data_length the new value of mSciMsgDataLength
- */
- bool setSciMsgDataLength ( const unsigned long data_length );
- /**
- * Get the value of mpSciMsgData
- * @return the value of mpSciMsgData
- */
- unsigned char * getSciMsgData ( ) const;
-
- /**
- * Set the value of mpSciMsgData
- * @return bool
- * @param p_data the new value of mpSciMsgData
- */
- bool setSciMsgData ( const unsigned char * p_data );
-
- // protected attribute accessor methods
- //
-
- /**
- * Get the value of mSpecializedSciMsgHeaderSize
- * @return the value of mSpecializedSciMsgHeaderSize
- */
- virtual unsigned long getSpecializedSciMsgHeaderSize ( ) const;
-
- /**
- * Set the value of mSpecializedSciMsgHeaderSize
- * @return bool
- * @param header_size the new value of mSpecializedSciMsgHeaderSize
- */
- virtual bool setSpecializedSciMsgHeaderSize ( const unsigned long header_size );
-
- /**
- * Get the value of mpSpecializedSciMsgHeader
- * @return the value of mpSpecializedSciMsgHeader into a void pointer
- */
- virtual void * returnSpecializedSciMsgHeader ( ) const = 0;
-
- /**
- * Get the value of mSpecializedSciMsgDataLength
- * @return the value of mSpecializedSciMsgDataLength
- */
- virtual unsigned long getSpecializedSciMsgDataLength ( ) const;
-
- /**
- * Set the value of mSpecializedSciMsgDataLength
- * @return bool
- * @param data_length the new value of mSpecializedSciMsgDataLength
- */
- virtual bool setSpecializedSciMsgDataLength ( const unsigned long data_length );
-
- /**
- * Get the value of mpSpecializedSciMsgData
- * @return the value of mpSpecializedSciMsgData
- */
- virtual unsigned char * getSpecializedSciMsgData ( ) const;
+private:
- /**
- * Set the value of mpSpecializedSciMsgData
- * @return bool
- * @param p_data the new value of mpSpecializedSciMsgData
- */
- virtual bool setSpecializedSciMsgData ( const unsigned char * p_data );
+ static uint32_t getDefinedSciMsgMagicId ();
+ void setup (SciServer &SciServer);
- void displaySciMsgType ( ) const;
+ /* This object is not allowed to be copy.
+ * Declare copies operators in private to create a compilation error */
+ SciMsg &operator= (SciMsg &a)
+ {
+ return a;
+ };
-private:
+ SciMsg (SciMsg &a) {};
- // private methods
- //
- void initAttributes ( ) ;
-
- void displaySciMsgFlag ( ) const;
-
protected:
- // protected methods
- //
-
- /**
- * @return bool
- * @param data_length_to_remove
- * @param data_length
- * @param pp_data
- */
- bool removeData ( const unsigned long data_length_to_remove, unsigned long & data_length, unsigned char ** pp_data );
+ void setup_and_send (SciServer &SciServer);
+ void setup_and_send (SciServer &SciServer, const Sci_Msg_Station_Id dst_sta);
+ void setup_and_send_to_all (SciServer &SciServer);
-};
+ static void val2str_generic (
+ const char *header, size_t choice,
+ const char *val2str[], size_t array_size);
+};
-#endif // SCIMSG_H
+#endif // maximus_sci_inc_scimsg_h
diff --git a/cesar/maximus/sci/inc/SciMsgTest.h b/cesar/maximus/sci/inc/SciMsgTest.h
deleted file mode 100644
index d588f55ce7..0000000000
--- a/cesar/maximus/sci/inc/SciMsgTest.h
+++ /dev/null
@@ -1,50 +0,0 @@
-
-#ifndef SCIMSGTEST_H
-#define SCIMSGTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class SciMsg;
-class IFunctionCall;
-class ISci;
-class ISystem;
-class IPhy;
-class IEthernet;
-class INetworkClock;
-
-
-class SciMsgTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (SciMsgTest);
- CPPUNIT_TEST (simpleTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void simpleTest (void);
-
-private:
-
- SciMsg * mpFunctionSciMsg;
- SciMsg * mpClockSciMsg;
- SciMsg * mpSystemSciMsg;
- SciMsg * mpPhySciMsg;
- SciMsg * mpEtherSciMsg;
- IFunctionCall * mpFunctionCallManager;
- ISci * mpSciServer;
- ISystem * mpSystemManager;
- IPhy * mpPhyProcessor;
- IEthernet * mpEthernet;
- INetworkClock * mpNetworkClock;
-
-};
-
-
-#endif // SCIMSGTEST_H
diff --git a/cesar/maximus/sci/inc/SciServer.h b/cesar/maximus/sci/inc/SciServer.h
index 1aa49b8964..7722c60f37 100644
--- a/cesar/maximus/sci/inc/SciServer.h
+++ b/cesar/maximus/sci/inc/SciServer.h
@@ -1,248 +1,91 @@
-/************************************************************************
- SciServer.h - Copyright buret
+#ifndef maximus_sci_inc_sciserver_h
+#define maximus_sci_inc_sciserver_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/inc/SciServer.h
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/interface/station/station.h"
+#include "maximus/processors/processors.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/scheduler/scheduler.h"
+#include <string>
+
+class SciServer
+{
+private:
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
+ const stations_list_t &sta_list;
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
+ std::string mStationLog;
+ Processor *processor_array[SCI_MSG_TYPE_NB];
+ const Network_Clock_Tick *mNetworkClockTick;
-/usr/share/apps/umbrello/headings/heading.h
+ bool is_server_ready;
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
+public:
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
+ SciServer (stations_list_t &ref1);
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/sci/inc/SciServer.h
-**************************************************************************/
+ virtual ~SciServer ();
-#ifndef SCISERVER_H
-#define SCISERVER_H
+ inline void set_station_log (
+ const std::string &station_log)
+ {
+ mStationLog = station_log;
+ }
-#include "ISci.h"
-#include "SystemManager.h" // for 'StationsList'
+ void process () const;
-#include "networkclock_types.h"
-#include "system_types.h"
+ void sendSciMsg (
+ const SciMsg &sci_msg_to_send,
+ const Sci_Msg_Station_Id station_id) const;
-class Station;
-class SciMsg;
+ bool sendSciMsgToAllActiveStations (
+ SciMsg & sci_msg_to_send ) const;
+ void register_processor (
+ const Sci_Msg_Type sci_msg_type,
+ Processor *client );
-/**
- * class SciServer
- */
+ void unregister_processor (
+ const Sci_Msg_Type sci_msg_type);
-class SciServer : public ISci
-{
+ inline void register_current_tick_addr (
+ const Network_Clock_Tick *val)
+ {
+ mNetworkClockTick = val;
+ check_if_server_ready ();
+ }
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
+ inline Network_Clock_Tick get_current_tick () const
+ {
+ if (mNetworkClockTick)
+ return *mNetworkClockTick;
- std::string mStationLog;
- SciMsg ** mpSpecializedSciMsgArray;
- unsigned int mArraySize;
- StationsList * mpListOfStations;
- Network_Clock_Tick mNetworkClockTick;
+ return 0;
+ }
-protected:
+private:
- // protected attributes
- //
-
-public:
+ void check_if_server_ready ();
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- SciServer ( );
-
- /**
- * Copy Constructor
- */
- SciServer ( const SciServer & );
-
- /**
- * Empty Destructor
- */
- virtual ~SciServer ( );
-
- // public methods
- //
-
- /**
- * @return bool
- * @param station_log_file
- */
- bool init ( const std::string station_log );
-
- /**
- * @return bool
- */
- bool process ( );
-
- /**
- * @return bool
- * @param sci_msg_to_send
- */
- bool fillSciMsg ( SciMsg & sci_msg_to_send ) const;
-
- /**
- * @return bool
- * @param sci_msg_to_send
- */
- bool sendSciMsg ( const SciMsg & sci_msg_to_send ) const;
-
- /**
- * @return bool
- * @param sci_msg_to_send
- */
- bool sendSciMsgToAllActiveStations ( SciMsg & sci_msg_to_send ) const;
-
- /**
- * @return bool
- * @param sci_msg_to_send
- * @param
- */
- bool sendSciMsgToDestStations ( SciMsg & sci_msg_to_send, DestStationsList & list_of_dest_stations ) const;
-
- /**
- * Set a value into mpSpecializedSciMsgArray
- * @return bool
- * @param sci_msg_type the array position to set
- * @param sci_msg the new value of mpSpecializedSciMsgArray[sci_msg_type]
- */
- bool registerSpecializedSciMsg ( const Sci_Msg_Type sci_msg_type, SciMsg * sci_msg );
-
- /**
- * @return bool
- * @param header
- * @param data_length
- * @param received_data
- */
- bool receiveMsg ( const Sci_Msg_Header * header,
- const unsigned long data_length,
- const unsigned char * received_data ) const;
-
- void displaySpecializedSciMsgArray ( ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return StationsList *
- */
- StationsList * getStationsList ( ) const;
-
- /**
- * @return bool
- * @param p_list_of_stations
- */
- bool setStationsList ( StationsList * p_list_of_stations );
-
- /**
- * Get the value of mArraySize
- * @return the value of mArraySize
- */
- unsigned int getArraySize ( ) const;
-
- /**
- * Get the value of mpSpecializedSciMsgArray
- * @return the value of mpSpecializedSciMsgArray
- */
- SciMsg ** getSpecializedSciMsgArray ( ) const;
-
- /**
- * @return bool
- * @param current_tick_value
- */
- bool updateTickValue ( const Network_Clock_Tick current_tick_value );
-
- /**
- * @return Network_Clock_Tick
- */
- Network_Clock_Tick getNetworkClockTick ( ) const;
-
- // protected attribute accessor methods
- //
-
-private:
+ inline void send_SciMsg_to_Station (
+ const SciMsg &sci_msg_to_send,
+ Station &dsta) const;
- // private methods
- //
-
- bool log ( ) const;
-
- /**
- * @return bool
- * @param type
- * @param received_sci_msg
- */
- bool createSciMsg ( const Sci_Msg_Type type, SciMsg ** received_sci_msg ) const;
-
- /**
- * @return bool
- * @param msg_header
- * @param data_length
- * @param remaining_data
- * @param received_sci_msg
- */
- bool fillSciMsg ( const Sci_Msg_Header * msg_header,
- const unsigned long data_length,
- const unsigned char * received_data,
- SciMsg ** created_sci_msg ) const;
-
- /**
- * @return bool
- * @param received_sci_msg
- */
- bool processSciMsg ( SciMsg * received_sci_msg ) const;
-
- std::string displaySciMsgType ( uint8_t sci_msg_type ) const;
-
- void displayStatus ( ) const;
-
- void initAttributes ( );
-
- // private attribute accessor methods
- //
-
- /**
- * @return std::string
- */
- std::string getStationLog ( ) const;
-
-protected:
-
- // protected methods
- //
+ void log ( ) const;
+ void displayStatus ( ) const;
};
-#endif // SCISERVER_H
+#endif // maximus_sci_inc_sciserver_h
diff --git a/cesar/maximus/sci/inc/SciServerTest.h b/cesar/maximus/sci/inc/SciServerTest.h
deleted file mode 100644
index e92eac8abc..0000000000
--- a/cesar/maximus/sci/inc/SciServerTest.h
+++ /dev/null
@@ -1,62 +0,0 @@
-
-#ifndef SCISERVERTEST_H
-#define SCISERVERTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "sci_types.h" // for 'Sci_Msg_Header'
-
-class SciServer;
-class FunctionCallManager;
-class SystemManager;
-class PhyProcessor;
-class NetworkClockProcessor;
-class FunctionSciMsg;
-class IEthernet;
-
-void functionSciMsgCallback ( const FunctionSciMsg & function_sci_msg );
-
-
-class SciServerTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (SciServerTest);
- CPPUNIT_TEST (registerSpecializedSciMsgTest);
- CPPUNIT_TEST (receiveMsgTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void registerSpecializedSciMsgTest (void);
- void receiveMsgTest (void);
-
-private:
-
- SciServer * mpSciServer;
- FunctionCallManager * mpFunctionCallManager;
- SystemManager * mpSystemManager;
- PhyProcessor * mpPhyProcessor;
- NetworkClockProcessor * mpNetworkClockProcessor;
- IEthernet * mpEthernet;
-
- void registerClockSciMsgTest (void);
- void registerPhySciMsgTest (void);
- void registerSystemSciMsgTest (void);
- void registerFunctionSciMsgTest (void);
- void registerEtherSciMsgTest (void);
- void receiveClockSciMsgTest ( Sci_Msg_Header & msg_header );
- void receivePhySciMsgTest ( Sci_Msg_Header & msg_header );
- void receiveSystemSciMsgTest ( Sci_Msg_Header & msg_header );
- void receiveFunctionSciMsgTest ( Sci_Msg_Header & msg_header );
- void receiveEtherSciMsgTest ( Sci_Msg_Header & msg_header );
-
-};
-
-
-#endif // SCISERVERTEST_H
diff --git a/cesar/maximus/sci/inc/SystemSciMsg.h b/cesar/maximus/sci/inc/SystemSciMsg.h
new file mode 100644
index 0000000000..7b19d421b5
--- /dev/null
+++ b/cesar/maximus/sci/inc/SystemSciMsg.h
@@ -0,0 +1,75 @@
+#ifndef maximus_sci_inc_systemscimsg_h
+#define maximus_sci_inc_systemscimsg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/inc/SystemSciMsg.h
+ * \ingroup maximus_sci
+ *
+ */
+
+#include "maximus/sci/inc/SciMsg.h"
+
+#include "maximus/common/types/sci_types.h"
+#include "maximus/common/types/system_types.h"
+
+
+class SystemSciMsg : public SciMsg
+{
+private:
+
+ System_Header *p_sys_header;
+ unsigned char *p_sys_data;
+
+ uint8_t h_system_version;
+ System_Type h_system_type;
+ uint16_t h_system_flags;
+
+public:
+
+ /**
+ * Constructor used for RX path:
+ * when a SciMsg come from SciServer.
+ */
+ SystemSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc);
+
+ /**
+ * Constructor used for TX path:
+ * when system Processor want to send a message to the SciServer.
+ */
+ SystemSciMsg (size_t size_of_data);
+
+ virtual ~SystemSciMsg ();
+
+ void display_specialized_header ( ) const;
+
+ void setup_and_send (SciServer &SciServer);
+
+ inline uint8_t get_system_version () const
+ {
+ return h_system_version;
+ }
+
+ inline unsigned char *get_system_data_addr () const
+ {
+ return p_sys_data;
+ }
+
+ inline System_Type get_system_type () const
+ {
+ return h_system_type;
+ }
+
+ inline void set_system_type (System_Type val)
+ {
+ h_system_type = val;
+ }
+};
+
+#endif // maximus_sci_inc_systemscimsg_h
diff --git a/cesar/maximus/sci/sci_msg.h b/cesar/maximus/sci/sci_msg.h
new file mode 100644
index 0000000000..beae64fe72
--- /dev/null
+++ b/cesar/maximus/sci/sci_msg.h
@@ -0,0 +1,26 @@
+#ifndef maximus_sci_sci_msg_h
+#define maximus_sci_sci_msg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/sci_msg.h
+ * \ingroup maximus_sci
+ *
+ */
+
+/* Forward declaration. */
+class SciServer;
+class SciMsg;
+
+class ClockSciMsg;
+class PhySciMsg;
+class SystemSciMsg;
+class EtherSciMsg;
+class FunctionSciMsg;
+
+#endif /* maximus_sci_sci_msg_h */
diff --git a/cesar/maximus/sci/src/ClockSciMsg.cpp b/cesar/maximus/sci/src/ClockSciMsg.cpp
new file mode 100644
index 0000000000..1ecf98d37c
--- /dev/null
+++ b/cesar/maximus/sci/src/ClockSciMsg.cpp
@@ -0,0 +1,121 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/src/ClockSciMsg.cpp
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/ClockSciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+#include "maximus/utils/inc/Logger.h"
+#include <assert.h>
+#include <netinet/in.h>
+
+static const size_t h_clock_size = sizeof (Network_Clock_Header);
+
+ClockSciMsg::ClockSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc):
+ SciMsg (header, p_alloc)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = get_sci_data_addr ();
+ size_t data_length = get_sci_datalength ();
+
+ p_clock_header = (Network_Clock_Header *) p_buffer;
+ p_clock_data = p_buffer + h_clock_size;
+
+ assert (data_length >= h_clock_size);
+
+ Network_Clock_Header &h = *p_clock_header;
+ h_clock_version = static_cast <uint8_t> (h.version);
+ h_clock_type = static_cast <Network_Clock_Type> (h.type);
+ h_clock_id = static_cast <Network_Clock_Id> (ntohs (h.id));
+ h_clock_flags = static_cast <uint16_t> (ntohs (h.flags));
+ h_clock_reserved = static_cast <uint16_t> (ntohs (h.reserved));
+
+ uint32_t tick_high = ntohl (p_clock_header->tick_high);
+ uint32_t tick_low = ntohl (p_clock_header->tick_low);
+
+ /* Recompose tick value. */
+ h_clock_tick = ((static_cast <uint64_t> (tick_high) << 32)
+ + static_cast <uint64_t> (tick_low));
+}
+
+ClockSciMsg::ClockSciMsg (size_t size_of_data):
+ SciMsg (size_of_data + h_clock_size,
+ SCI_MSG_TYPE_NETWORK_CLOCK),
+ h_clock_version (NETWORK_CLOCK_VERSION),
+ h_clock_type (NETWORK_CLOCK_TYPE_NONE),
+ h_clock_id (0),
+ h_clock_flags (0),
+ h_clock_reserved (0),
+ h_clock_tick (0)
+
+{
+ logFunction ();
+
+ unsigned char *p_buffer = get_sci_data_addr ();
+ p_clock_header = (Network_Clock_Header*) p_buffer;
+ p_clock_data = p_buffer + h_clock_size;
+}
+
+ClockSciMsg::~ClockSciMsg ()
+{
+ logFunction ();
+}
+
+void
+ClockSciMsg::setup_and_send (SciServer &SciServer)
+{
+ logFunction ();
+
+ h_clock_tick = SciServer.get_current_tick ();
+
+ uint32_t tick_low = h_clock_tick;
+ uint32_t tick_high = h_clock_tick >> 32;
+
+ Network_Clock_Header &h = *p_clock_header;
+ h.version = static_cast <uint8_t> (h_clock_version);
+ h.type = static_cast <uint8_t> (h_clock_type);
+ h.id = static_cast <uint16_t> (htons (h_clock_id));
+ h.flags = static_cast <uint16_t> (htons (h_clock_flags));
+ h.reserved = static_cast <uint16_t> (htons (h_clock_reserved));
+ h.tick_high = static_cast <uint32_t> (htonl (tick_high));
+ h.tick_low = static_cast <uint32_t> (htonl (tick_low));
+
+ SciMsg::setup_and_send (SciServer);
+}
+
+void
+ClockSciMsg::display_specialized_header () const
+{
+ static const char *type2str[NETWORK_CLOCK_TYPE_NB] = {
+ "TYPE_NONE",
+ "TYPE_REMOVE",
+ "TYPE_STATION",
+ "TYPE_FUNCTION_CALL",
+ "TYPE_PHY",
+ "TYPE_SYSTEM",
+ "TYPE_ETHERNET"
+ };
+
+ maximus_log (LOG_INFO, "ClockSciMsg header =");
+ maximus_log (LOG_INFO, " version = 0x"
+ << std::hex << (uint) h_clock_version);
+ val2str_generic (" type", (size_t) h_clock_type,
+ type2str, NETWORK_CLOCK_TYPE_NB);
+ maximus_log (LOG_INFO, " id = 0x"
+ << std::hex << h_clock_id);
+ maximus_log (LOG_INFO, " flags = 0x"
+ << std::hex << h_clock_flags);
+ maximus_log (LOG_INFO, " reserved = 0x"
+ << std::hex << h_clock_reserved);
+ maximus_log (LOG_INFO, " tick = 0x"
+ << std::hex << h_clock_tick);
+}
diff --git a/cesar/maximus/sci/src/EtherSciMsg.cpp b/cesar/maximus/sci/src/EtherSciMsg.cpp
new file mode 100644
index 0000000000..f7b611cc4c
--- /dev/null
+++ b/cesar/maximus/sci/src/EtherSciMsg.cpp
@@ -0,0 +1,100 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/src/EtherSciMsg.cpp
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/EtherSciMsg.h"
+#include "maximus/utils/inc/Logger.h"
+#include <assert.h>
+#include <netinet/in.h>
+
+static const size_t h_ether_size = sizeof (Ethernet_Header);
+
+EtherSciMsg::EtherSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc):
+ SciMsg (header, p_alloc)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = SciMsg::get_sci_data_addr ();
+ p_ether_header = (Ethernet_Header*) p_buffer;
+ p_ether_data = p_buffer + h_ether_size;
+
+ unsigned int data_length = SciMsg::get_sci_datalength ();
+
+ assert (data_length >= h_ether_size);
+
+ Ethernet_Header &h = *p_ether_header;
+ h_ether_version = static_cast <uint8_t> (h.version);
+ h_ether_type = static_cast <Ethernet_Type> (h.type);
+ h_ether_flags = static_cast <uint8_t> (h.flags);
+ h_ether_reserved = static_cast <uint8_t> (h.reserved);
+}
+
+EtherSciMsg::EtherSciMsg (size_t size_of_data):
+ SciMsg (size_of_data + h_ether_size,
+ SCI_MSG_TYPE_ETHERNET),
+ h_ether_version (ETHERNET_VERSION),
+ h_ether_type (ETHERNET_TYPE_NONE),
+ h_ether_flags (0),
+ h_ether_reserved (0)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = get_sci_data_addr ();
+
+ p_ether_header = (Ethernet_Header*) p_buffer;
+ p_ether_data = p_buffer + h_ether_size;
+}
+
+EtherSciMsg::~EtherSciMsg ()
+{
+ logFunction ();
+}
+
+void
+EtherSciMsg::setup_and_send (SciServer &SciServer)
+{
+ logFunction ();
+
+ Ethernet_Header &h = *p_ether_header;
+
+ h.version = static_cast <uint8_t> (h_ether_version);
+ h.type = static_cast <uint8_t> (h_ether_type);
+ h.flags = static_cast <uint8_t> (h_ether_flags);
+ h.reserved = static_cast <uint8_t> (h_ether_reserved);
+
+ SciMsg::setup_and_send (SciServer);
+}
+
+void
+EtherSciMsg::display_specialized_header () const
+{
+ static const char *type2str[ETHERNET_TYPE_NB] = {
+ "TYPE_NONE",
+ "TYPE_DATA",
+ "TYPE_MME",
+ "TYPE_BUFFER_ADD",
+ "TYPE_BUFFER_RELEASED"
+ };
+
+ maximus_log (LOG_INFO, "EtherSciMsg header =");
+ maximus_log (LOG_INFO,
+ " version = 0x" << std::hex
+ << (uint) h_ether_version);
+ val2str_generic (" type", (size_t) h_ether_type,
+ type2str, ETHERNET_TYPE_NB);
+ maximus_log (LOG_INFO,
+ " flags = 0x" << std::hex
+ << (uint) h_ether_flags);
+ maximus_log (LOG_INFO,
+ " reserved = 0x" << std::hex
+ << (uint) h_ether_reserved);
+}
diff --git a/cesar/maximus/sci/src/FunctionSciMsg.cpp b/cesar/maximus/sci/src/FunctionSciMsg.cpp
new file mode 100644
index 0000000000..f78d9839b5
--- /dev/null
+++ b/cesar/maximus/sci/src/FunctionSciMsg.cpp
@@ -0,0 +1,121 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/inc/FunctionSciMsg.cpp
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/FunctionSciMsg.h"
+#include "maximus/utils/inc/Logger.h"
+#include <assert.h>
+#include <netinet/in.h>
+
+static const size_t h_fc_size = sizeof (Function_Call_Header);
+
+FunctionSciMsg::FunctionSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc):
+ SciMsg (header, p_alloc)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = SciMsg::get_sci_data_addr ();
+ unsigned int data_length = get_sci_datalength ();
+
+ p_fc_header = (Function_Call_Header*) p_buffer;
+ p_fc_data = p_buffer + h_fc_size;
+
+ assert (data_length >= h_fc_size);
+
+ Function_Call_Header &h = *p_fc_header;
+ h_fc_version = static_cast <uint8_t> (h.version);
+ h_fc_type = static_cast <Function_Call_Type> (h.type);
+ h_fc_msgid = static_cast <Function_Call_Msg_Id> (htons (h.msg_id));
+ h_fc_param_nb = static_cast <Function_Call_Parameters_Number> (
+ h.param_nb);
+ h_fc_flags = static_cast <uint8_t> (h.flags);
+ h_fc_reserved = static_cast <uint16_t> (htons (h.reserved));
+}
+
+FunctionSciMsg::FunctionSciMsg (size_t size_of_data):
+ SciMsg (size_of_data + h_fc_size,
+ SCI_MSG_TYPE_FUNCTION_CALL),
+ h_fc_version (FUNCTION_CALL_VERSION),
+ h_fc_type (FUNCTION_CALL_TYPE_REQ),
+ h_fc_msgid (0),
+ h_fc_param_nb (0),
+ h_fc_flags (FUNCTION_CALL_FLAG_NONE),
+ h_fc_reserved (0)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = SciMsg::get_sci_data_addr ();
+
+ p_fc_header = (Function_Call_Header*) p_buffer;
+ p_fc_data = p_buffer + h_fc_size;
+}
+
+FunctionSciMsg::~FunctionSciMsg ()
+{
+ logFunction ();
+}
+
+void
+FunctionSciMsg::patch_to_get_data (
+ unsigned char **pp_data,
+ unsigned int *p_data_length,
+ Function_Call_Msg_Id *p_msg_id_rx,
+ Function_Call_Parameters_Number *p_param_nb) const
+{
+ logFunction ();
+
+ *pp_data = p_fc_data;
+ *p_data_length = get_sci_datalength () - h_fc_size;
+ *p_msg_id_rx = p_fc_header->msg_id;
+ *p_param_nb = p_fc_header->param_nb;
+}
+
+void
+FunctionSciMsg::setup_and_send (SciServer &SciServer)
+{
+ logFunction ();
+
+ Function_Call_Header &h = *p_fc_header;
+ h.version = static_cast <uint8_t> (h_fc_version);
+ h.type = static_cast <uint8_t> (h_fc_type);
+ h.msg_id = static_cast <uint16_t> (htons (h_fc_msgid));
+ h.param_nb = static_cast <uint8_t> (h_fc_param_nb);
+ h.flags = static_cast <uint8_t> (h_fc_flags);
+ h.reserved = static_cast <uint16_t> (htons (h_fc_reserved));
+
+ SciMsg::setup_and_send (SciServer);
+}
+
+void
+FunctionSciMsg::display_specialized_header () const
+{
+ static const char *type2str[FUNCTION_CALL_TYPE_NB] = {
+ "TYPE_NONE",
+ "TYPE_REQ",
+ "TYPE_RSP"
+ };
+
+ maximus_log (LOG_INFO, "FunctionSciMsg header =");
+ maximus_log (LOG_INFO, " version = 0x"
+ << std::hex << (uint) h_fc_version);
+ val2str_generic (" type", (size_t) h_fc_type,
+ type2str, FUNCTION_CALL_TYPE_NB);
+ maximus_log (LOG_INFO, " msg id = 0x"
+ << std::hex << (uint) h_fc_msgid);
+ maximus_log (LOG_INFO, " param nb = "
+ << (uint) h_fc_param_nb << " (0x"
+ << std::hex << (uint) h_fc_param_nb << ")");
+ maximus_log (LOG_INFO, " flags = 0x"
+ << std::hex << (uint) h_fc_flags);
+ maximus_log (LOG_INFO, " reserved = 0x"
+ << std::hex << (uint) h_fc_reserved);
+}
diff --git a/cesar/maximus/sci/src/PhySciMsg.cpp b/cesar/maximus/sci/src/PhySciMsg.cpp
new file mode 100644
index 0000000000..581fa85194
--- /dev/null
+++ b/cesar/maximus/sci/src/PhySciMsg.cpp
@@ -0,0 +1,311 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/src/PhySciMsg.cpp
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/PhySciMsg.h"
+#include "maximus/utils/inc/Logger.h"
+#include "common/std.h"
+#include "mac/common/tonemap.h"
+#include <assert.h>
+#include <netinet/in.h>
+#include <sstream>
+
+static const size_t h_phy_size = sizeof (Phy_Header);
+
+PhySciMsg::PhySciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc):
+ SciMsg (header, p_alloc)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = SciMsg::get_sci_data_addr ();
+ size_t buffer_size = SciMsg::get_sci_datalength ();
+
+ p_phy_header = (Phy_Header*) p_buffer;
+ p_phy_data = p_buffer + h_phy_size;
+
+ assert (buffer_size >= h_phy_size);
+
+ Phy_Header &h = *p_phy_header;
+
+ phy_version = static_cast <uint> (h.version);
+ phy_type = static_cast <Phy_Type> (h.type);
+ phy_mpdu_format = static_cast <Phy_Mpdu_Format> (h.mpdu_format);
+ phy_pb_nb = static_cast <Phy_Nb_Of_Pbs> (h.pb_nb);
+ phy_msg_nb = static_cast <uint8_t> (h.msg_nb);
+ phy_fc_mode = static_cast <Phy_Fc_Mode> (h.fc_mode);
+ phy_short_ppdu = static_cast <Phy_Short_Ppdu> (h.short_ppdu);
+ phy_mod = static_cast <Phy_Mod> (h.mod);
+ phy_fecrate = static_cast <Phy_Fecrate> (h.fecrate);
+ phy_gil = static_cast <Phy_Gil> (h.gil);
+ phy_tonemap_index = static_cast <Phy_Tonemap_Index> (h.tonemap_index);
+ phy_tx_id = static_cast <Phy_Tx_Id> (ntohs (h.tx_id));
+ phy_flags = static_cast <Phy_Flags> (ntohs (h.flags));
+ phy_symbol_nb = static_cast <Phy_Nb_Of_Symbols> (ntohl (h.symbol_nb));
+
+ for (unsigned int i=0; i<3; i++)
+ phy_iv[i] = static_cast <uint32_t> (
+ ntohl (h.iv[i]));
+
+ for (unsigned int i=0; i<4; i++)
+ phy_nek[i] = static_cast <uint32_t> (
+ ntohl (h.nek[i]));
+
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ phy_pb_measurement[i] = static_cast <uint32_t> (
+ ntohl (h.pb_measurement[i]));
+
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ phy_pb_header[i] = static_cast <uint32_t> (
+ ntohl (h.pb_header[i]));
+}
+
+PhySciMsg::PhySciMsg (size_t size_of_data):
+ SciMsg (size_of_data + h_phy_size,
+ SCI_MSG_TYPE_PHY),
+ phy_type (PHY_TYPE_NONE),
+ phy_mpdu_format (PHY_MPDU_FORMAT_NONE),
+ phy_pb_nb (0),
+ phy_msg_nb (1),
+ phy_fc_mode (PHY_FC_MODE_NONE),
+ phy_short_ppdu (false),
+ phy_mod (PHY_MOD_NONE),
+ phy_fecrate (PHY_FEC_RATE_NONE),
+ phy_gil (PHY_GIL_NONE),
+ phy_tonemap_index (0),
+ phy_tx_id (0),
+ phy_flags (0),
+ phy_symbol_nb (0)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = SciMsg::get_sci_data_addr ();
+ p_phy_header = (Phy_Header*) p_buffer;
+ p_phy_data = p_buffer + h_phy_size;
+}
+
+PhySciMsg::~PhySciMsg ()
+{
+ logFunction ();
+}
+
+inline void
+PhySciMsg::setup ()
+{
+ /* Step 1 - Inputs check. */
+ assert (check_phy_fields ());
+
+ /* Step 2 - Encode the Phy_Header for transmission. */
+ Phy_Header &h = *p_phy_header;
+
+ phy_version = PHY_VERSION;
+ h.version = PHY_VERSION;
+ h.type = static_cast <uint8_t> (phy_type);
+ h.mpdu_format = static_cast <uint8_t> (phy_mpdu_format);
+ h.pb_nb = static_cast <uint8_t> (phy_pb_nb);
+ h.msg_nb = static_cast <uint8_t> (phy_msg_nb);
+ h.fc_mode = static_cast <uint8_t> (phy_fc_mode);
+ h.short_ppdu = static_cast <uint8_t> (phy_short_ppdu);
+ h.mod = static_cast <uint8_t> (phy_mod);
+ h.fecrate = static_cast <uint8_t> (phy_fecrate);
+ h.gil = static_cast <uint8_t> (phy_gil);
+ h.tonemap_index = static_cast <uint8_t> (phy_tonemap_index);
+ h.reserved = 0;
+ h.tx_id = htons (static_cast <uint16_t> (phy_tx_id));
+ h.flags = htons (static_cast <uint16_t> (phy_flags));
+ h.symbol_nb = htonl (static_cast <uint32_t> (phy_symbol_nb));
+
+ for (unsigned int i=0; i<3; i++)
+ h.iv[i] = htonl (
+ static_cast <uint32_t> (phy_iv[i]));
+
+ for (unsigned int i=0; i<4; i++)
+ h.nek[i] = htonl (
+ static_cast <uint32_t> (phy_nek[i]));
+
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ h.pb_measurement[i] = htonl (
+ static_cast <uint32_t> (phy_pb_measurement[i]));
+
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ h.pb_header[i] = htonl (
+ static_cast <uint32_t> (phy_pb_header[i]));
+}
+
+void
+PhySciMsg::setup_and_send (SciServer &SciServer, const Sci_Msg_Station_Id dst_sta)
+{
+ logFunction ();
+
+ PhySciMsg::setup ();
+ SciMsg::setup_and_send (SciServer, dst_sta);
+}
+
+void
+PhySciMsg::setup_and_send_to_all (SciServer &SciServer)
+{
+ logFunction ();
+
+ PhySciMsg::setup ();
+ SciMsg::setup_and_send_to_all (SciServer);
+}
+
+void
+PhySciMsg::display_specialized_header () const
+{
+ static const char *val2str_type[PHY_TYPE_NB] = {
+ "TYPE_NONE",
+ "TYPE_PREAMBLE",
+ "TYPE_FC_HYBRID_MODE",
+ "TYPE_FC_AV_ONLY_MODE",
+ "TYPE_PRS",
+ "TYPE_MPDU_PAYLOAD",
+ "TYPE_TONEMASK",
+ "TYPE_TONEMAP",
+ "TYPE_NOISE",
+ "TYPE_RX",
+ "TYPE_ZERO_CROSS",
+ };
+
+ static const char *val2str_format[PHY_MPDU_FORMAT_NB] = {
+ "FORMAT_NONE",
+ "FORMAT_BEACON",
+ "FORMAT_SOF",
+ "FORMAT_SACK",
+ "FORMAT_RTS_CTS",
+ "FORMAT_SOUND",
+ "FORMAT_RSOF",
+ };
+
+ static const char *val2str_fec[PHY_FEC_RATE_NB + 1] = {
+ "FEC_RATE_1_2",
+ "FEC_RATE_16_21",
+ "FEC_RATE_NONE or NB",
+ };
+
+ static const char *val2str_gil[PHY_GIL_NB + 1] = {
+ "GIL_417",
+ "GIL_567",
+ "GIL_3534",
+ "GIL_NONE or NB",
+ };
+
+ static const char *val2str_mod[PHY_MOD_ROBO_NB + 2] = {
+ "MOD_ROBO",
+ "MOD_HS_ROBO",
+ "MOD_MINI_ROBO",
+ "MOD_TM or MOD_NB",
+ "MOD_NONE",
+ };
+
+ static const char *val2str_fc_mode[PHY_FC_MODE_NB + 1] = {
+ "MODE_HYBRID_1",
+ "MODE_HYBRID_2",
+ "MODE_AV_1",
+ "MODE_AV_2",
+ "NONE or NB",
+ };
+
+ maximus_log (LOG_INFO, "PhySciMsg header =");
+ maximus_log (LOG_INFO, " version = 0x"
+ << std::hex << (uint) phy_version);
+ val2str_generic (" type", (size_t) phy_type,
+ val2str_type, PHY_TYPE_NB);
+ val2str_generic (" mpdu format", (size_t) phy_mpdu_format,
+ val2str_format, PHY_MPDU_FORMAT_NB);
+ maximus_log (LOG_INFO, " pb nb = " << std::dec << (uint) phy_pb_nb);
+ maximus_log (LOG_INFO, " msg nb = " << std::dec << (uint) phy_msg_nb);
+ val2str_generic (" fc mode", (size_t) phy_fc_mode,
+ val2str_fc_mode, PHY_FC_MODE_NB + 1);
+ maximus_log (LOG_INFO, " short ppdu = 0x"
+ << std::hex << (uint) phy_short_ppdu);
+ val2str_generic (" mod", (size_t) phy_mod,
+ val2str_mod, PHY_MOD_ROBO_NB + 2);
+ val2str_generic (" fecrate", (size_t) phy_fecrate,
+ val2str_fec, PHY_FEC_RATE_NB + 1);
+ val2str_generic (" gil", (size_t) phy_gil,
+ val2str_gil, PHY_GIL_NB + 1);
+ maximus_log (LOG_INFO, " tonemap index = " << std::dec
+ << (uint) phy_tonemap_index);
+ maximus_log (LOG_INFO, " tx id = " << std::dec << (uint) phy_tx_id);
+ maximus_log (LOG_INFO, " flags = 0x"
+ << std::hex << (uint) phy_flags);
+ maximus_log (LOG_INFO, " symbol nb = " << std::dec << (uint) phy_symbol_nb);
+
+#if CONFIG_LOG
+ /* displayIv */
+ std::ostringstream oss_iv;
+ oss_iv << " iv =";
+ for (unsigned int i=0; i<3; i++)
+ {
+ oss_iv << " 0x"
+ << std::hex << phy_iv[i];
+ }
+ maximus_log (LOG_INFO, oss_iv.str());
+
+ /* displayNek */
+ std::ostringstream oss_nek;
+ oss_nek << " nek =";
+ for (unsigned int i=0; i<4; i++)
+ {
+ oss_nek << " 0x"
+ << std::hex << phy_nek[i];
+ }
+ maximus_log (LOG_INFO, oss_nek.str());
+
+ /* displayPbMeasurement */
+ std::ostringstream oss_pb;
+ oss_pb << " pb_measurement =";
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ {
+ oss_pb << " 0x"
+ << std::hex << phy_pb_measurement[i];
+ }
+ maximus_log (LOG_INFO, oss_pb.str());
+
+ /* displayPbHeader */
+ std::ostringstream oss_h;
+ oss_h << " pb_header =";
+ for (unsigned int i=0; i<MAC_MAX_PB_PER_MPDU; i++)
+ {
+ oss_h << " 0x"
+ << std::hex << phy_pb_header[i];
+ }
+ maximus_log (LOG_INFO, oss_h.str());
+#endif
+}
+
+bool
+PhySciMsg::check_phy_fields () const
+{
+ bool bCheck = false;
+
+ if ((PHY_TYPE_NB > phy_type) && (PHY_TYPE_NONE < phy_type)
+ && (PHY_MPDU_FORMAT_NB > phy_mpdu_format)
+ && (MAC_MAX_PB_PER_MPDU > phy_pb_nb)
+ && (PHY_FC_MODE_NONE >= phy_fc_mode)
+ && ((0 == phy_short_ppdu) || (1 == phy_short_ppdu))
+ && (PHY_MOD_NONE >= phy_mod)
+ && (PHY_FEC_RATE_NONE >= phy_fecrate)
+ && (PHY_GIL_NONE >= phy_gil)
+ && (TONEMAP_INDEX_NB > phy_tonemap_index)
+ && (PHY_FLAG_MAX >= phy_flags)
+ && (MAC_MAX_SYMB_PER_MPDU >= phy_symbol_nb))
+ {
+ bCheck = true;
+ }
+
+ if (bCheck == false)
+ maximus_log (LOG_WARNING,
+ __PRETTY_FUNCTION__
+ << " => Invalid Phy Header value(s)");
+ return bCheck;
+}
diff --git a/cesar/maximus/sci/src/SciMsg.cpp b/cesar/maximus/sci/src/SciMsg.cpp
index 1ce0caeb36..7d2c700ff5 100644
--- a/cesar/maximus/sci/src/SciMsg.cpp
+++ b/cesar/maximus/sci/src/SciMsg.cpp
@@ -1,721 +1,202 @@
-/************************************************************************
- SciMsg.cpp - Copyright buret
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/src/SciMsg.cpp
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+#include "maximus/utils/inc/Logger.h"
+#include <netinet/in.h>
+
+static const size_t h_sci_size = sizeof (Sci_Msg_Header);
+Sci_Msg_Id SciMsg::maximus_sci_txid = 0;
+
+SciMsg::SciMsg (const size_t sci_data_size,
+ const Sci_Msg_Type sci_type):
+ h_sci_type (sci_type),
+ h_sci_length (sci_data_size),
+ h_sci_staid (0),
+ h_sci_msgid (0),
+ h_sci_tick (0),
+ h_sci_flags (SCI_MSG_FLAG_NONE),
+ h_sci_reserved (0)
+{
+ logFunction ();
+
+ /* The sci header size isn't included in h_sci_length.
+ * because the length field is inside the sci header. */
+ size_t total_size = sci_data_size + h_sci_size;
+ p_alloc = new unsigned char [total_size];
+ p_sci_header = (Sci_Msg_Header *) p_alloc;
+ p_sci_data = p_alloc + h_sci_size;
+}
+
+SciMsg::SciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_buffer)
+{
+ logFunction ();
+
+ h_sci_type = static_cast <Sci_Msg_Type> (header.type);
+ h_sci_length = static_cast <size_t> (ntohl (header.length));
+ h_sci_staid = static_cast <Sci_Msg_Station_Id> (ntohs (header.station_id));
+ h_sci_msgid = static_cast <uint16_t> (ntohs (header.msg_id));
+ h_sci_tick =
+ (static_cast <uint64_t> (ntohl (header.netclock_high)) << 32)
+ + static_cast <uint64_t> (ntohl (header.netclock_low));
+ h_sci_flags = static_cast <Sci_Msg_Flag> (ntohs (header.flags));
+ h_sci_reserved = static_cast <uint16_t> (ntohs (header.reserved));
+
+ /* Note : It's not important to copy the header in,
+ * the p_sci_header zone.
+ * As h_sci variables are correctly set.
+ *
+ * The idea is to have the header zone and data zone
+ * continuous, in case of this message is re-send to
+ * Sta. */
+ p_alloc = p_buffer;
+ p_sci_header = (Sci_Msg_Header *) p_alloc;
+ p_sci_data = p_alloc + h_sci_size;
+}
+
+SciMsg::~SciMsg ()
+{
+ logFunction ();
+ delete [] p_alloc;
+}
+
+void
+SciMsg::display_sci_header () const
+{
+ static const char *type2str[SCI_MSG_TYPE_NB] = {
+ "TYPE_NONE",
+ "TYPE_NETWORK_CLOCK",
+ "TYPE_FUNCTION_CALL",
+ "TYPE_PHY",
+ "TYPE_SYSTEM",
+ "TYPE_ETHERNET",
+ };
+
+ maximus_log (LOG_INFO, "SciMsg header =");
+ val2str_generic (" type", (size_t) h_sci_type,
+ type2str, SCI_MSG_TYPE_NB);
+ maximus_log (LOG_INFO, " length = "
+ << std::dec << h_sci_length << " bytes (0x"
+ << std::hex << h_sci_length << ")");
+ maximus_log (LOG_INFO, " station_id = "
+ << std::dec << h_sci_staid << " (0x"
+ << std::hex << (uint) h_sci_staid << ")");
+ maximus_log (LOG_INFO, " msg_id = 0x"
+ << std::hex << (uint) h_sci_msgid);
+ maximus_log (LOG_INFO, " netclock = 0x"
+ << std::hex << h_sci_tick);
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/sci/src/SciMsg.cpp
-**************************************************************************/
-
-#include "SciMsg.h"
-
-#include "Station.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <sstream> // for 'ostringstream'
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-Sci_Msg_Id SciMsg::mSciMsgId = 0;
-
-
-SciMsg::SciMsg ( ):
-mSciMsgStatus(MAXIMUS_SCI_MSG_STATUS_NONE),
-mSciMsgType(SCI_MSG_TYPE_NONE),
-mSciMsgStationId(0),
-mSciMsgFlag(SCI_MSG_FLAG_NONE),
-mSciMsgDataLength(0),
-mpSciMsgData(NULL),
-mSpecializedSciMsgHeaderSize(0),
-mSpecializedSciMsgDataLength(0),
-mpSpecializedSciMsgData(NULL)
-{
- logFunction();
-
- initAttributes();
-}
-
-
-void SciMsg::initAttributes ( )
-{
- logFunction();
-
- mSciMsgHeader.magic_id = 0x00000000;
- mSciMsgHeader.version = 0x00;
- mSciMsgHeader.type = 0x00;
- mSciMsgHeader.length = 0x0000;
- mSciMsgHeader.station_id = 0x0000;
- mSciMsgHeader.msg_id = 0x0000;
- mSciMsgHeader.netclock_high = 0x00000000;
- mSciMsgHeader.netclock_low = 0x00000000;
- mSciMsgHeader.flags = 0x0000;
- mSciMsgHeader.reserved = 0x0000;
-}
-
-
-SciMsg::SciMsg ( const SciMsg & sci_msg )
-{
- logFunction();
-
- initAttributes();
-
- mSciMsgStatus = sci_msg.getSciMsgStatus();
-
- mSciMsgType = sci_msg.getSciMsgType();
- mSciMsgStationId = sci_msg.getSciMsgStationId();
- mSciMsgFlag = sci_msg.getSciMsgFlag();
-
- setSciMsgHeader(*(sci_msg.getSciMsgHeader()));
- mSciMsgDataLength = sci_msg.getSciMsgDataLength();
- mpSciMsgData = sci_msg.getSciMsgData();
-
- mSpecializedSciMsgHeaderSize = sci_msg.getSpecializedSciMsgHeaderSize();
- mSpecializedSciMsgDataLength = sci_msg.getSpecializedSciMsgDataLength();
- mpSpecializedSciMsgData = sci_msg.getSpecializedSciMsgData();
-}
-
-
-SciMsg::SciMsg ( const SciMsg * p_sci_msg )
-{
- logFunction();
-
- initAttributes();
-
- if (NULL != p_sci_msg)
- {
- mSciMsgStatus = p_sci_msg->getSciMsgStatus();
-
- mSciMsgType = p_sci_msg->getSciMsgType();
- mSciMsgStationId = p_sci_msg->getSciMsgStationId();
- mSciMsgFlag = p_sci_msg->getSciMsgFlag();
-
- setSciMsgHeader(*(p_sci_msg->getSciMsgHeader()));
- mSciMsgDataLength = p_sci_msg->getSciMsgDataLength();
- mpSciMsgData = p_sci_msg->getSciMsgData();
-
- mSpecializedSciMsgHeaderSize = p_sci_msg->getSpecializedSciMsgHeaderSize();
- mSpecializedSciMsgDataLength = p_sci_msg->getSpecializedSciMsgDataLength();
- mpSpecializedSciMsgData = p_sci_msg->getSpecializedSciMsgData();
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message pointer is NULL", errno);
- }
-}
-
-
-SciMsg::~SciMsg ( )
-{
- logFunction();
-
- if (NULL != mpSciMsgData)
- {
- delete [] mpSciMsgData;
- mpSciMsgData = NULL;
- }
- if (NULL != mpSpecializedSciMsgData)
- {
- delete [] mpSpecializedSciMsgData;
- mpSpecializedSciMsgData = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-// Check SCI msg compatibility (check SCI msg version)
-//
-bool SciMsg::checkCompatibility ( ) const
-{
- logFunction();
-
- return (getDefinedSciMsgVersion() == getSciMsgHeader()->version);
-}
-
-
-// Check SCI msg validity (check SCI msg magic id and SCI msg id)
-//
-bool SciMsg::checkValidity ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- if ( (getDefinedSciMsgMagicId() == getSciMsgHeader()->magic_id)
- && (SCI_MSG_ID_STATION <= getSciMsgHeader()->msg_id) )
- {
- bCheck = true;
- }
-
- return bCheck;
-}
-
-
-// Remove specialized SCI message header from specialized SCI msg data
-// Then, set specialized SCI message data length, and specialized SCI msg data
-//
-bool SciMsg::identifySpecializedSciMsgData ( )
-{
- logFunction();
- bool bIdentifyData = false;
-
- if (NULL != getSciMsgData())
- {
- // Check data lengths coherence
- //
- if (getSciMsgDataLength() == getSciMsgHeader()->length)
- {
- // Create temporary variables
- //
- unsigned long tempDataLength = getSciMsgDataLength();
- unsigned char * pTempData = new unsigned char [tempDataLength];
-
- if (NULL != pTempData)
- {
- for (unsigned long i=0; i<tempDataLength; i++)
- {
- *(pTempData+i) = *(getSciMsgData()+i);
- }
-
- bIdentifyData = removeData (getSpecializedSciMsgHeaderSize(), tempDataLength, &pTempData);
-
- if (0 != bIdentifyData)
- {
- bIdentifyData &= setSpecializedSciMsgDataLength (tempDataLength);
- bIdentifyData &= setSpecializedSciMsgData (pTempData);
- }
-
- // Free temporary allocated memory
- //
- delete [] pTempData;
- pTempData = NULL;
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Initialized data pointer is NULL");
- }
- }
- else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "Incoherent data lengths between SCI message header and set data length", errno);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Received data pointer is NULL");
- }
-
- return bIdentifyData;
-}
-
-
-void SciMsg::displaySciMsgHeader ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "SCI msg header = " << endl;
- clog << logger(LOG_INFO) << "\tmagic_id = 0x" << setfill('0') << setw(8) << uppercase << hex << getSciMsgHeader()->magic_id << endl;
- clog << logger(LOG_INFO) << "\tversion = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSciMsgHeader()->version) << endl;
- displaySciMsgType();
- clog << logger(LOG_INFO) << "\tlength = " << dec << getSciMsgHeader()->length << " bytes (0x" << setfill('0') << setw(4) << uppercase << hex << getSciMsgHeader()->length << ")" << endl;
- clog << logger(LOG_INFO) << "\tstation_id = " << dec << getSciMsgHeader()->station_id << " (0x" << setfill('0') << setw(4) << uppercase << hex << getSciMsgHeader()->station_id << ")" << endl;
- clog << logger(LOG_INFO) << "\tmsg_id = 0x" << setfill('0') << setw(4) << uppercase << hex << getSciMsgHeader()->msg_id << endl;
- clog << logger(LOG_INFO) << "\tnetclock = 0x" << setfill('0') << setw(8) << uppercase << hex << getSciMsgHeader()->netclock_high \
- << setfill('0') << setw(8) << uppercase << hex << getSciMsgHeader()->netclock_low << endl;
- displaySciMsgFlag();
- clog << logger(LOG_INFO) << "\treserved = 0x" << setfill('0') << setw(4) << uppercase << hex << getSciMsgHeader()->reserved << dec << endl;
-#endif /* CONFIG_LOG */
-}
-
-
-void SciMsg::displaySciMsgData ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- ostringstream oss;
- oss << "SCI msg data = ";
- if (NULL != getSciMsgData())
- {
- for (unsigned long i=0; i<getSciMsgDataLength(); i++)
- {
- if ( '\0' == *(getSciMsgData()+i) )
- {
- oss << "\\0";
- }
- else
- {
- oss << *(getSciMsgData()+i);
- }
- }
- }
- else
- {
- oss << "NULL!";
- }
- oss << endl;
- oss.flush();
- clog << logger(LOG_INFO) << oss.str();
-#endif /* CONFIG_LOG */
-}
-
-
-void SciMsg::displaySpecializedSciMsgData ( ) const
-{
#if CONFIG_LOG
- logFunction();
-
- ostringstream oss;
- oss << "specialized SCI msg data = ";
- if (NULL != getSpecializedSciMsgData())
- {
- for (unsigned long i=0; i<getSpecializedSciMsgDataLength(); i++)
- {
- if ( '\0' == *(getSpecializedSciMsgData()+i) )
- {
- oss << "\\0";
- }
- else
- {
- oss << *(getSpecializedSciMsgData()+i);
- }
- }
- }
- else
- {
- oss << "NULL!";
- }
- oss << endl;
- oss.flush();
- clog << logger(LOG_INFO) << oss.str();
-#endif /* CONFIG_LOG */
-}
-
-
-uint32_t SciMsg::getDefinedSciMsgMagicId ( ) const
-{
- logFunction();
-
- // Convert string to uint32_t
- //
- string stringMagicId(SCI_MSG_MAGIC);
- uint32_t magicId = (static_cast<uint8_t>(stringMagicId[0])<<24) + (static_cast<uint8_t>(stringMagicId[1])<<16) + (static_cast<uint8_t>(stringMagicId[2])<<8) + static_cast<uint8_t>(stringMagicId[3]);
-
- return magicId;
-}
-
-
-uint8_t SciMsg::getDefinedSciMsgVersion ( ) const
-{
- return SCI_MSG_VERSION;
-}
-
-
-void SciMsg::displaySciMsgType ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- switch (getSciMsgHeader()->type)
- {
- case 0:
- clog << logger(LOG_INFO) << "\ttype = SCI_MSG_TYPE_NONE" << endl;
- break;
- case 1:
- clog << logger(LOG_INFO) << "\ttype = SCI_MSG_TYPE_NETWORK_CLOCK" << endl;
- break;
- case 2:
- clog << logger(LOG_INFO) << "\ttype = SCI_MSG_TYPE_FUNCTION_CALL" << endl;
- break;
- case 3:
- clog << logger(LOG_INFO) << "\ttype = SCI_MSG_TYPE_PHY" << endl;
- break;
- case 4:
- clog << logger(LOG_INFO) << "\ttype = SCI_MSG_TYPE_SYSTEM" << endl;
- break;
- case 5:
- clog << logger(LOG_INFO) << "\ttype = SCI_MSG_TYPE_ETHERNET" << endl;
- break;
- default:
- clog << logger(LOG_INFO) << "\ttype = unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-void SciMsg::displaySciMsgFlag ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- switch (getSciMsgHeader()->flags)
- {
- case 0:
- clog << logger(LOG_INFO) << "\tflags = SCI_MSG_FLAG_NONE" << endl;
- break;
- case 1:
- clog << logger(LOG_INFO) << "\tflags = SCI_MSG_FLAG_RESP" << endl;
- break;
- case 2:
- clog << logger(LOG_INFO) << "\tflags = SCI_MSG_FLAG_ACK" << endl;
- break;
- case 3:
- clog << logger(LOG_INFO) << "\tflags = SCI_MSG_FLAG_NEEDACK" << endl;
- break;
- case 4:
- clog << logger(LOG_INFO) << "\tflags = SCI_MSG_FLAG_SYNC" << endl;
- break;
- default:
- clog << logger(LOG_INFO) << "\tflags = unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// protected methods
-//
-
-
-// Remove required data length from data, and update data length
-//
-bool SciMsg::removeData ( const unsigned long data_length_to_remove, unsigned long & data_length, unsigned char ** pp_data )
-{
- logFunction();
- bool bRemoveData = false;
-
- if ( (data_length >= data_length_to_remove) // check that there are enough data to remove the required data length
- && (NULL != *pp_data) )
- {
- // Create temporary variable and copy data
- //
- unsigned char * remainingData = new unsigned char [data_length-data_length_to_remove];
- for (unsigned long i=data_length_to_remove; i<data_length; i++)
- {
- *(remainingData+i-data_length_to_remove) = *((*pp_data)+i);
- }
-
- // Update data length
- //
- data_length -= data_length_to_remove;
-
- // Fill data
- //
- for (unsigned long i=0; i<data_length; i++)
+ std::string flags_str;
+ if (h_sci_flags == SCI_MSG_FLAG_NONE)
+ flags_str = "NONE ";
+ else
{
- *((*pp_data)+i) = *(remainingData+i);
+ if (h_sci_flags & SCI_MSG_FLAG_RESP)
+ flags_str.append ("Resp ");
+ if (h_sci_flags & SCI_MSG_FLAG_ACK)
+ flags_str.append ("Ack ");
+ if (h_sci_flags & SCI_MSG_FLAG_NEEDACK)
+ flags_str.append ("Needack ");
+ if (h_sci_flags & SCI_MSG_FLAG_SYNC)
+ flags_str.append ("Sync ");
}
-
- // Free temporary allocated memory
- //
- delete [] remainingData;
- remainingData = NULL;
-
- bRemoveData = true;
- }
- else
- {
- errno = ENODATA;
- throw Error(__PRETTY_FUNCTION__, "Not enough data", errno);
- }
-
- return bRemoveData;
-}
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-Sci_Msg_Status SciMsg::getSciMsgStatus ( ) const
-{
- return mSciMsgStatus;
-}
-
-
-bool SciMsg::setSciMsgStatus ( const Sci_Msg_Status status )
-{
- mSciMsgStatus = status;
-
- return true;
-}
-
-
-Sci_Msg_Type SciMsg::getSciMsgType ( ) const
-{
- return mSciMsgType;
-}
-
-
-bool SciMsg::setSciMsgType ( const Sci_Msg_Type type )
-{
- mSciMsgType = type;
-
- return true;
-}
-
-
-Sci_Msg_Station_Id SciMsg::getSciMsgStationId ( ) const
-{
- return mSciMsgStationId;
-}
-
-
-bool SciMsg::setSciMsgStationId ( const Sci_Msg_Station_Id station_id )
-{
- mSciMsgStationId = station_id;
-
- return true;
-}
-
-
-Sci_Msg_Id SciMsg::getSciMsgId ( ) const
-{
- return mSciMsgId;
+ maximus_log (LOG_INFO, " flags = 0x" << std::hex
+ << h_sci_flags << " ( " << flags_str << ")");
+#endif
+ maximus_log (LOG_INFO, " reserved = 0x"
+ << std::hex << h_sci_reserved);
}
-
-bool SciMsg::incrementSciMsgId ( )
+inline uint32_t
+SciMsg::getDefinedSciMsgMagicId ()
{
- logFunction();
-
- if ( SCI_MSG_ID_STATION > (mSciMsgId+1) )
- {
- mSciMsgId++;
- }
- else
- {
- mSciMsgId = 0x0001;
- }
-
- return true;
-}
-
-
-Sci_Msg_Flag SciMsg::getSciMsgFlag ( ) const
-{
- return mSciMsgFlag;
-}
+ static const char *stringMagicId = SCI_MSG_MAGIC;
+ static const uint32_t magicId = htonl (
+ (stringMagicId[0] << 24)
+ + (stringMagicId[1] << 16)
+ + (stringMagicId[2] << 8)
+ + stringMagicId[3]);
-
-bool SciMsg::setSciMsgFlag ( const Sci_Msg_Flag flag )
-{
- mSciMsgFlag = flag;
-
- return true;
+ return magicId;
}
-
-Sci_Msg_Header * SciMsg::getSciMsgHeader ( ) const
+inline void
+SciMsg::setup (SciServer &SciServer)
{
- return (Sci_Msg_Header *)&mSciMsgHeader;
-}
+ logFunction ();
+ maximus_sci_txid ++;
-bool SciMsg::setSciMsgHeader ( const Sci_Msg_Header & sci_msg_header )
-{
- logFunction();
- bool bSetHeader = false;
+ if (SCI_MSG_ID_STATION <= maximus_sci_txid)
+ maximus_sci_txid = 0x0001;
- mSciMsgHeader = sci_msg_header;
+ /* Forced fields. */
+ h_sci_msgid = maximus_sci_txid;
+ h_sci_tick = SciServer.get_current_tick ();
- // Set SCI msg attributes from SCI msg header
- //
- setSciMsgType (static_cast<Sci_Msg_Type>(getSciMsgHeader()->type));
- setSciMsgStationId (static_cast<Sci_Msg_Station_Id>(getSciMsgHeader()->station_id));
- setSciMsgFlag (static_cast<Sci_Msg_Flag>(getSciMsgHeader()->flags));
-
- displaySciMsgHeader();
- bSetHeader = true;
+ uint32_t netclockLow = h_sci_tick;
+ uint32_t netclockHigh = h_sci_tick >> 32;
- return bSetHeader;
+ /* Host To Network transformation. */
+ Sci_Msg_Header &h = *p_sci_header;
+ h.magic_id = getDefinedSciMsgMagicId ();
+ h.version = static_cast <uint8_t> (SCI_MSG_VERSION);
+ h.type = static_cast <uint8_t> (h_sci_type);
+ h.length = static_cast <uint32_t> (htonl (h_sci_length));
+ h.station_id = static_cast <uint16_t> (htons (h_sci_staid));
+ h.msg_id = static_cast <uint16_t> (htons (h_sci_msgid));
+ h.netclock_high = static_cast <uint32_t> (htonl (netclockHigh));
+ h.netclock_low = static_cast <uint32_t> (htonl (netclockLow));
+ h.flags = static_cast <uint16_t> (htons (h_sci_flags));
+ h.reserved = static_cast <uint16_t> (htons (h_sci_reserved));
}
-
-unsigned long SciMsg::getSciMsgDataLength ( ) const
+void
+SciMsg::setup_and_send (SciServer &SciServer, const Sci_Msg_Station_Id dst_sta)
{
- return mSciMsgDataLength;
+ logFunction ();
+ SciMsg::setup (SciServer);
+ SciServer.sendSciMsg (*this, dst_sta);
}
-
-bool SciMsg::setSciMsgDataLength ( const unsigned long data_length )
+void
+SciMsg::setup_and_send_to_all (SciServer &SciServer)
{
- logFunction();
-
- if ( SCI_MSG_MAX_SIZE >= data_length )
- {
- mSciMsgDataLength = data_length;
- }
- else
- {
- errno = EMSGSIZE;
- throw Error(__PRETTY_FUNCTION__, "Data length exceeds max size", errno);
- }
-
- return true;
+ logFunction ();
+ SciMsg::setup (SciServer);
+ SciServer.sendSciMsgToAllActiveStations (*this);
}
-
-unsigned char * SciMsg::getSciMsgData ( ) const
+void
+SciMsg::setup_and_send (SciServer &SciServer)
{
- return mpSciMsgData;
+ logFunction ();
+ SciMsg::setup (SciServer);
+ SciServer.sendSciMsg (*this, h_sci_staid);
}
-
-bool SciMsg::setSciMsgData ( const unsigned char * p_data )
+void
+SciMsg::val2str_generic (
+ const char *header, size_t choice,
+ const char *val2str[], size_t array_size)
{
- logFunction();
- bool bSetData = false;
-
- if (NULL != mpSciMsgData)
- {
- delete [] mpSciMsgData;
- mpSciMsgData = NULL;
- }
-
- if (NULL != p_data)
- {
- mpSciMsgData = new unsigned char [getSciMsgDataLength()];
- if (NULL != mpSciMsgData)
- {
- for (unsigned int i=0; i<getSciMsgDataLength(); i++)
- {
- *(mpSciMsgData+i) = *(p_data+i);
- }
-
- displaySciMsgData();
- bSetData = true;
- }
+ if (array_size <= choice)
+ maximus_log (LOG_ERROR,
+ header << " = 0x" << std::hex << choice);
else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI message data pointer is NULL");
- }
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Received data pointer is NULL", errno);
- }
-
- return bSetData;
-}
-
-
-// protected attribute accessor methods
-//
-
-
-unsigned long SciMsg::getSpecializedSciMsgHeaderSize ( ) const
-{
- return mSpecializedSciMsgHeaderSize;
-}
-
-
-bool SciMsg::setSpecializedSciMsgHeaderSize ( const unsigned long header_size )
-{
- mSpecializedSciMsgHeaderSize = header_size;
-
- return true;
-}
-
-
-unsigned long SciMsg::getSpecializedSciMsgDataLength ( ) const
-{
- return mSpecializedSciMsgDataLength;
+ maximus_log (LOG_INFO,
+ header << " = 0x" << std::hex << choice
+ << " (" << val2str[choice] << ")");
}
-
-
-bool SciMsg::setSpecializedSciMsgDataLength ( const unsigned long data_length )
-{
- mSpecializedSciMsgDataLength = data_length;
-
- return true;
-}
-
-
-unsigned char * SciMsg::getSpecializedSciMsgData ( ) const
-{
- return mpSpecializedSciMsgData;
-}
-
-
-bool SciMsg::setSpecializedSciMsgData ( const unsigned char * p_data )
-{
- logFunction();
-
- if (NULL != mpSpecializedSciMsgData)
- {
- delete [] mpSpecializedSciMsgData;
- mpSpecializedSciMsgData = NULL;
- }
-
- if (NULL != p_data)
- {
- mpSpecializedSciMsgData = new unsigned char [getSpecializedSciMsgDataLength()];
- if (NULL != mpSpecializedSciMsgData)
- {
- for (unsigned long i=0; i<getSpecializedSciMsgDataLength(); i++)
- {
- *(mpSpecializedSciMsgData+i) = *(p_data+i);
- }
- }
- }
-
- return true;
-}
-
diff --git a/cesar/maximus/sci/src/SciMsgTest.cpp b/cesar/maximus/sci/src/SciMsgTest.cpp
deleted file mode 100644
index a45f3b5f28..0000000000
--- a/cesar/maximus/sci/src/SciMsgTest.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-
-#include "SciMsgTest.h"
-
-#include "SciMsg.h"
-#include "FunctionSciMsg.h"
-#include "SystemSciMsg.h"
-#include "PhySciMsg.h"
-#include "ClockSciMsg.h"
-#include "EtherSciMsg.h"
-#include "FunctionCallManager.h"
-#include "SciServer.h"
-#include "SystemManager.h"
-#include "PhyProcessor.h"
-#include "EthernetProcessor.h"
-#include "NetworkClockProcessor.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (SciMsgTest);
-
-
-void SciMsgTest::setUp (void)
-{
- logTest();
-
- try
- {
- mpSciServer = new SciServer();
- mpFunctionCallManager = new FunctionCallManager(mpSciServer);
- mpPhyProcessor = new PhyProcessor(mpSciServer);
- mpSystemManager = new SystemManager(mpSciServer);
- mpEthernet = new EthernetProcessor(mpSciServer);
- mpNetworkClock = new NetworkClockProcessor(mpSciServer, mpSystemManager, mpFunctionCallManager, mpPhyProcessor, mpEthernet);
- mpFunctionSciMsg = new FunctionSciMsg (mpFunctionCallManager);
- mpPhySciMsg = new PhySciMsg (mpPhyProcessor);
- mpSystemSciMsg = new SystemSciMsg(mpSystemManager);
- mpEtherSciMsg = new EtherSciMsg(mpEthernet);
- mpClockSciMsg = new ClockSciMsg (mpNetworkClock);
- }
- catch ( Error &e )
- {
- e.display();
-
- CPPUNIT_FAIL ( "setUp failed" );
- }
-}
-
-
-void SciMsgTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpFunctionSciMsg)
- {
- delete mpFunctionSciMsg;
- mpFunctionSciMsg = NULL;
- }
- if (NULL != mpClockSciMsg)
- {
- delete mpClockSciMsg;
- mpClockSciMsg = NULL;
- }
- if (NULL != mpPhySciMsg)
- {
- delete mpPhySciMsg;
- mpPhySciMsg = NULL;
- }
- if (NULL != mpSystemSciMsg)
- {
- delete mpSystemSciMsg;
- mpSystemSciMsg = NULL;
- }
- if (NULL != mpEtherSciMsg)
- {
- delete mpEtherSciMsg;
- mpEtherSciMsg = NULL;
- }
-
- if (NULL != mpSciServer)
- {
- delete mpSciServer;
- mpSciServer = NULL;
- }
- if (NULL != mpFunctionCallManager)
- {
- delete mpFunctionCallManager;
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpPhyProcessor)
- {
- delete mpPhyProcessor;
- mpPhyProcessor = NULL;
- }
- if (NULL != mpSystemManager)
- {
- delete mpSystemManager;
- mpSystemManager = NULL;
- }
- if (NULL != mpEthernet)
- {
- delete mpEthernet;
- mpEthernet = NULL;
- }
- if (NULL != mpNetworkClock)
- {
- delete mpNetworkClock;
- mpNetworkClock = NULL;
- }
-}
-
-
-void SciMsgTest::simpleTest (void)
-{
- logTest();
-
- if ( (NULL == mpClockSciMsg)
- || (NULL == mpFunctionSciMsg)
- || (NULL == mpPhySciMsg)
- || (NULL == mpSystemSciMsg)
- || (NULL == mpEtherSciMsg) )
- {
- CPPUNIT_FAIL ( "At least one of the initialized SciMsg pointers is NULL" );
- }
-}
-
diff --git a/cesar/maximus/sci/src/SciServer.cpp b/cesar/maximus/sci/src/SciServer.cpp
index 87296bbd76..051956ab1f 100644
--- a/cesar/maximus/sci/src/SciServer.cpp
+++ b/cesar/maximus/sci/src/SciServer.cpp
@@ -1,1058 +1,308 @@
-/************************************************************************
- SciServer.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/sci/src/SciServer.cpp
-**************************************************************************/
-
-#include "SciServer.h"
-
-#include "Station.h"
-#include "SciMsg.h"
-#include "ClockSciMsg.h"
-
-#include "Error.h"
-#include "Logger.h"
-
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/inc/SciServer.cpp
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/SciServer.h"
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/processors/inc/Processor.h"
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include <assert.h>
#include <unistd.h>
-#include <sstream> // for 'ostringstream'
-#include <fstream> // for 'ofstream'
-#include <stdlib.h>
-#include <errno.h>
+#include <fstream>
#include <sys/select.h>
-#include <iomanip>
-#include <netinet/in.h> // for 'ntohl()' and 'ntohs()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-#include <cstring> // memcmp, memcpy
-#include <cstdlib> // system
-using namespace std;
-
+#include <netinet/in.h>
+#include <iostream>
+#include <cstring>
-// Constructors/Destructors
-//
+SciServer::SciServer (stations_list_t &ref1):
+ sta_list (ref1),
+ mNetworkClockTick (NULL),
+ is_server_ready (false)
-
-SciServer::SciServer ( ) :
-mpSpecializedSciMsgArray(NULL),
-mArraySize(0),
-mpListOfStations(NULL),
-mNetworkClockTick(0)
{
- logFunction();
+ logFunction ();
- initAttributes();
+ for (unsigned int i = 0; i < SCI_MSG_TYPE_NB; i ++)
+ processor_array[i] = NULL;
}
-
-void SciServer::initAttributes ( )
+SciServer::~SciServer ()
{
- logFunction();
-
- // Init array
- //
- mArraySize = 10;
- mpSpecializedSciMsgArray = new SciMsg * [mArraySize];
- if (NULL != mpSpecializedSciMsgArray)
- {
- for (unsigned int i=0; i<mArraySize; i++)
- {
- *(mpSpecializedSciMsgArray+i) = NULL;
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Specialized SCI message array pointer is NULL");
- }
+ logFunction ();
}
-
-SciServer::~SciServer ( )
+void
+SciServer::process () const
{
- logFunction();
-
- // Do not free stations list
- // Station list is deleted when SystemManager is deleted
- // Only set pointer to NULL
- //
- if (NULL != mpListOfStations)
- {
- mpListOfStations = NULL;
- }
-
- // Free array
- //
- if (NULL != mpSpecializedSciMsgArray)
- {
- for (unsigned int i=0; i<mArraySize; i++)
- {
- if (NULL != (*(mpSpecializedSciMsgArray+i)))
- {
- delete(*(mpSpecializedSciMsgArray+i));
- (*(mpSpecializedSciMsgArray+i)) = NULL;
- }
- }
- delete [] mpSpecializedSciMsgArray;
- mpSpecializedSciMsgArray = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
+ logFunction ();
+ /* polling mode. */
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
-// public methods
-//
+ fd_set read_fds;
+ FD_ZERO (&read_fds);
+ int fd_max, fd_min, fd_index;
+ bool first_fd = true;
+ stations_list_t::const_iterator it;
+ assert (is_server_ready);
-bool SciServer::init ( const std::string station_log )
-{
- logFunction();
-
- mStationLog = station_log;
-
- return true;
-}
-
-
-bool SciServer::process ( )
-{
- logFunction();
- bool bProcess = false;
-
- int fd_max, fd_index;
- fd_set read_fds;
- struct timeval timeout;
- int result;
- Station *station;
- StationsList::iterator it;
-
- // timeout set to 1s
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
-
- // Read input pipes
- //
- FD_ZERO(&read_fds);
- fd_max = 0;
- for(it = getStationsList()->begin() ; it != getStationsList()->end(); it++)
- {
- station = *it;
-
- FD_SET(station->getInputFileDescriptor(), &read_fds);
- if(station->getInputFileDescriptor() > fd_max)
- fd_max = station->getInputFileDescriptor();
- }
-
- result = select(fd_max + 1, &read_fds, NULL, NULL, &timeout);
-
- if(result > 0)
- {
- // skim through the list...
- for(fd_index = 0; fd_index <= fd_max; fd_index++)
+ for (it = sta_list.begin () ;
+ it != sta_list.end ();
+ it ++)
{
- if(FD_ISSET(fd_index, &read_fds))
- {
- int len, header_len;
- struct Sci_Msg_Header header;
- unsigned char *buffer;
- header_len = sizeof(struct Sci_Msg_Header);
- if((len = read(fd_index, &header, sizeof(struct Sci_Msg_Header))) < header_len)
- {
- if (EAGAIN != errno)
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "header read error: len = " << dec << len << ", errno = " << errno << endl;
-#endif /* CONFIG_LOG */
- throw Error(__PRETTY_FUNCTION__, "Header read error: len < header_len", errno);
- }
- else
- {
- len = 0;
- }
- }
- else
- {
- // check for header
- if(memcmp(&header.magic_id, SCI_MSG_MAGIC, 4))
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "bad magic id: 0x" << hex << htonl(header.magic_id) << endl;
-#endif /* CONFIG_LOG */
- continue;
- }
- header.length = ntohs (header.length);
- if((header.type <= SCI_MSG_TYPE_NONE)
- || (header.type >= SCI_MSG_TYPE_NB))
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "bad type: " << dec << header.type << endl;
-#endif /* CONFIG_LOG */
- continue;
- }
- if(header.version != SCI_MSG_VERSION)
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "bad version: " << dec << header.version << endl;
-#endif /* CONFIG_LOG */
- continue;
- }
- header.magic_id = ntohl(header.magic_id);
- header.msg_id = ntohs (header.msg_id);
- header.station_id = ntohs(header.station_id);
- header.netclock_high = ntohl(header.netclock_high);
- header.netclock_low = ntohl(header.netclock_low);
- header.reserved = ntohs(header.reserved);
- header.flags = ntohs(header.flags);
-
- buffer = (unsigned char *)malloc(header.length);
- if((len = read(fd_index, buffer, header.length)) != header.length)
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "data read error: len = " << dec << len << ", errno = " << errno << endl;
-#endif /* CONFIG_LOG */
- free(buffer);
- if (0 == len)
- {
- throw Error(__PRETTY_FUNCTION__, "Data read error: len = 0", errno);
- }
- continue;
- }
- receiveMsg(&header, header.length, buffer);
- free(buffer);
- }
- }
- }
- }
- station = NULL;
-
- // Read log pipes
- //
- log();
-
- return bProcess;
-}
-
-
-#if CONFIG_LOG
-bool SciServer::log ( ) const
-{
- logFunction();
- bool bLog;
+ Station *station = *it;
- ofstream stationLogFile;
- if ( (!getStationLog().empty()) && (getStationLog().compare("-")) )
- {
- stationLogFile.open(getStationLog().c_str(), ios_base::app | ios_base::ate | ios_base::out);
- }
+ FD_SET (station->getInputFileDescriptor (), &read_fds);
+ if (first_fd || (fd_min > station->getInputFileDescriptor ()))
+ fd_min = station->getInputFileDescriptor ();
- // Skim through stations list
- //
- if ( (NULL != mpListOfStations) && (!mpListOfStations->empty()) )
- {
- int length;
- int maxLength = 1024;
- char pBuffer[maxLength];
+ if (first_fd || (fd_max < station->getInputFileDescriptor ()))
+ fd_max = station->getInputFileDescriptor ();
- for (StationsList::const_iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
- {
- if (NULL != *it)
- {
- // Read logs coming from all stations (from log pipes)
- //
- length = read((*it)->getLogFileDescriptor(), pBuffer, maxLength);
- if (-1 != length)
- {
- if (stationLogFile.is_open())
- {
- stationLogFile.write(pBuffer, length);
- }
- else
- {
- cout.write(pBuffer, length);
- }
- bLog = true;
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "A station pointer is NULL");
- }
+ first_fd = false;
}
- }
- stationLogFile.close();
- return bLog;
-}
-#else
-bool SciServer::log ( ) const
-{
- return true;
-}
-#endif
-
-bool SciServer::fillSciMsg ( SciMsg & sci_msg_to_send ) const
-{
- logFunction();
- bool bFill = false;
-
- // Fill SCI msg data length
- //
- bFill = sci_msg_to_send.setSciMsgDataLength(sci_msg_to_send.getSpecializedSciMsgHeaderSize() + sci_msg_to_send.getSpecializedSciMsgDataLength());
-
- // Decompose current tick value into two uint32_t values
- //
- uint32_t netclockHigh=0, netclockLow=0;
- netclockLow = (uint32_t)(getNetworkClockTick());
- netclockHigh = (uint32_t)(((uint64_t)(getNetworkClockTick()) >> 32));
-
- // Fill SCI msg header
- //
- bFill &= sci_msg_to_send.incrementSciMsgId(); // to have an updated msg id
- struct Sci_Msg_Header sciMsgHeader = { sci_msg_to_send.getDefinedSciMsgMagicId(),
- sci_msg_to_send.getDefinedSciMsgVersion(),
- static_cast<uint8_t>(sci_msg_to_send.getSciMsgType()),
- static_cast<uint16_t>(sci_msg_to_send.getSciMsgDataLength()),
- sci_msg_to_send.getSciMsgStationId(),
- sci_msg_to_send.getSciMsgId(),
- netclockHigh,
- netclockLow,
- 0, // flags
- 0 }; // reserved
- bFill &= sci_msg_to_send.setSciMsgHeader(sciMsgHeader);
-
- // As SCI msg header will be sent on an output pipe, 'hton' functions have to be called
- //
- sci_msg_to_send.getSciMsgHeader()->magic_id = htonl(sci_msg_to_send.getSciMsgHeader()->magic_id);
- sci_msg_to_send.getSciMsgHeader()->length = htons(sci_msg_to_send.getSciMsgHeader()->length);
- sci_msg_to_send.getSciMsgHeader()->station_id = htons(sci_msg_to_send.getSciMsgHeader()->station_id);
- sci_msg_to_send.getSciMsgHeader()->msg_id = htons(sci_msg_to_send.getSciMsgHeader()->msg_id);
- sci_msg_to_send.getSciMsgHeader()->netclock_high = htonl(sci_msg_to_send.getSciMsgHeader()->netclock_high);
- sci_msg_to_send.getSciMsgHeader()->netclock_low = htonl(sci_msg_to_send.getSciMsgHeader()->netclock_low);
-
- // Fill SCI msg data length
- // When sending a SCI msg, SCI msg data contain:
- // - SCI msg header,
- // - specialized SCI msg header,
- // - and specialized SCI msg data
- //
- bFill = sci_msg_to_send.setSciMsgDataLength(static_cast<unsigned long>(sizeof(struct Sci_Msg_Header)) + sci_msg_to_send.getSpecializedSciMsgHeaderSize() + sci_msg_to_send.getSpecializedSciMsgDataLength());
-
- // Fill SCI msg data
- // When sending a SCI msg, since only SCI msg data will be sent on an output pipe,
- // SCI msg header and specialized SCI msg header have to be copied into SCI msg data
- // Then, specialized SCI msg data have to be copied into SCI msg data
- //
- unsigned char * pTempData = new unsigned char [sci_msg_to_send.getSciMsgDataLength()];
- if (NULL != pTempData)
- {
- memcpy(pTempData, (unsigned char *)sci_msg_to_send.getSciMsgHeader(), sizeof(struct Sci_Msg_Header));
- memcpy(pTempData+sizeof(Sci_Msg_Header), (unsigned char *)sci_msg_to_send.returnSpecializedSciMsgHeader(), sci_msg_to_send.getSpecializedSciMsgHeaderSize());
- memcpy(pTempData+sizeof(Sci_Msg_Header)+sci_msg_to_send.getSpecializedSciMsgHeaderSize(), sci_msg_to_send.getSpecializedSciMsgData(), sci_msg_to_send.getSpecializedSciMsgDataLength());
- }
- bFill &= sci_msg_to_send.setSciMsgData(pTempData);
-
- // Free temporary allocated memory
- //
- if (NULL != pTempData)
- {
- delete [] pTempData;
- pTempData = NULL;
- }
-
- return bFill;
-}
-
-
-bool SciServer::sendSciMsg ( const SciMsg & sci_msg_to_send ) const
-{
- logFunction();
- bool bSend = false;
-
- // Retrieve destination station
- //
- if (NULL != mpListOfStations)
- {
- // Skim through stations list
- //
- for (StationsList::const_iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
+ while (select (fd_max + 1, &read_fds, NULL, NULL, &timeout) > 0)
{
- if ( (NULL != *it)
- && ((*it)->getStationId() == sci_msg_to_send.getSciMsgStationId())
- && ((MAXIMUS_STATION_STATUS_IDLE == (*it)->getStationStatus())
- || (MAXIMUS_STATION_STATUS_DEACTIVATED == (*it)->getStationStatus())) )
- {
- bSend = true;
-
- // Before sending a SCI msg, check that station status is 'IDLE'
- //
- if (MAXIMUS_STATION_STATUS_IDLE == (*it)->getStationStatus())
+ for (fd_index = fd_min; fd_index <= fd_max; fd_index++)
{
- // Write data into output pipe
- //
- int length = 0;
- int totalLength = 0;
- while(totalLength < (int)sci_msg_to_send.getSciMsgDataLength())
- {
- length = write((*it)->getOutputFileDescriptor(), sci_msg_to_send.getSciMsgData() + totalLength, sci_msg_to_send.getSciMsgDataLength()-totalLength);
- if(length < 0)
- {
- if (EAGAIN != errno)
- {
- throw Error(__PRETTY_FUNCTION__, "write data failed", errno);
- }
- else
- {
- length = 0;
- }
- }
- totalLength += length;
- }
-
- // Station status is set to 'BUSY'
- // Station status will stay 'BUSY' until all system 'IDLE' msgs will be received
- //
- (*it)->setStationStatus(MAXIMUS_STATION_STATUS_BUSY);
- (*it)->incrementStationIdleCounter();
-
- break;
- }
- }
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Stations list pointer is NULL");
- }
+ if (!FD_ISSET (fd_index, &read_fds))
+ continue;
- if (bSend)
- {
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "<--- send " << displaySciMsgType(sci_msg_to_send.getSciMsgHeader()->type) \
- << " SCI message to station " << dec << sci_msg_to_send.getSciMsgStationId() \
- << " (0x" << setfill('0') << setw(4) << uppercase << hex << sci_msg_to_send.getSciMsgStationId() << ")" << dec << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType(LOG_COM);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "--- did not send " << displaySciMsgType(sci_msg_to_send.getSciMsgHeader()->type) \
- << " SCI message to station " << dec << sci_msg_to_send.getSciMsgStationId() \
- << " (0x" << setfill('0') << setw(4) << uppercase << hex << sci_msg_to_send.getSciMsgStationId() << ")" << dec << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType(LOG_ERROR);
- }
+ const static int header_size = sizeof (struct Sci_Msg_Header);
+ struct Sci_Msg_Header sci_header;
+ size_t data_length_received;
+ int status;
- return bSend;
-}
+ status = read (fd_index, &sci_header, header_size);
+ assert (status == header_size);
+ /* Be careful, the check is done before ntoh transformation. */
+ assert (!memcmp (&(sci_header.magic_id), SCI_MSG_MAGIC, 4));
+ assert (sci_header.type != SCI_MSG_TYPE_NONE);
+ assert (sci_header.type < SCI_MSG_TYPE_NB);
+ assert (processor_array[sci_header.type]);
+ assert (sci_header.version == SCI_MSG_VERSION);
-bool SciServer::sendSciMsgToAllActiveStations ( SciMsg & sci_msg_to_send ) const
-{
- logFunction();
- bool bSend = false;
- bool bWrite = false;
+ data_length_received = ntohl (sci_header.length);
- if (NULL != mpListOfStations)
- {
- const Sci_Msg_Station_Id txStationId = sci_msg_to_send.getSciMsgStationId(); // get id of the transmitting station
- int length;
- int totalLength;
+ unsigned char *msg_alloc =
+ new unsigned char [data_length_received + header_size];
+ unsigned char *buffer_data = msg_alloc + header_size;
- // Skim through stations list
- //
- for (StationsList::const_iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
- {
- // Send message to all active stations...
- //
- if ( (NULL != *it)
- && (MAXIMUS_STATION_STATUS_DEACTIVATED != (*it)->getStationStatus())
- && fillSciMsg(sci_msg_to_send) )
- {
- bSend = true;
+ status = read (fd_index, buffer_data, data_length_received);
+ assert (status == (int) data_length_received);
- /* ... except the sender */
- if ((txStationId != (*it)->getStationId())
- /* ... and hidden stations */
- && ((*it)->getHiddenStationsList ().find (txStationId) == \
- (*it)->getHiddenStationsList ().end ()))
- {
- // Write data into output pipe
- //
- length = 0;
- totalLength = 0;
- bWrite = true;
- while(totalLength < (int)sci_msg_to_send.getSciMsgDataLength())
- {
- length = write((*it)->getOutputFileDescriptor(), sci_msg_to_send.getSciMsgData() + totalLength, sci_msg_to_send.getSciMsgDataLength()-totalLength);
- if(length < 0)
- {
- if (EAGAIN != errno)
- {
- throw Error(__PRETTY_FUNCTION__, "write data failed", errno);
- }
- else
- {
- length = 0;
- }
- }
- totalLength += length;
- }
+ Sci_Msg_Type t = static_cast <Sci_Msg_Type> (sci_header.type);
+ SciMsg *msg = NULL;
+ msg = processor_array[t]->create_sci_msg (
+ sci_header, msg_alloc);
- if (bWrite)
- {
- // Station status is set to 'BUSY'
- // Station status will stay 'BUSY' until all system 'IDLE' msgs will be received
- //
- (*it)->setStationStatus(MAXIMUS_STATION_STATUS_BUSY);
- (*it)->incrementStationIdleCounter();
- }
+ maximus_log (LOG_INFO, "---> SciMsg received");
+ msg->display_sci_header ();
+ msg->display_specialized_header();
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "--- send " << displaySciMsgType(sci_msg_to_send.getSciMsgHeader()->type) \
- << " SCI message to station " << dec << (*it)->getStationId() \
- << " (0x" << setfill('0') << setw(4) << uppercase << hex << (*it)->getStationId() << ")" << dec << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType(LOG_INFO);
+ processor_array[t]->dispatchMsgProc (msg);
+ break;
}
- }
}
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Stations list pointer is NULL");
- }
-
- if (bWrite)
- {
-#if CONFIG_LOG
- clog << logger (LOG_COM) << "<--- send " << displaySciMsgType (sci_msg_to_send.getSciMsgHeader ()->type) \
- << " SCI message to all stations" << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType (LOG_COM);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger (LOG_COM) << "--- did not send " << displaySciMsgType (sci_msg_to_send.getSciMsgHeader ()->type) \
- << " SCI message to all stations!" << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType (LOG_COM);
- }
- return bSend;
+ /* Read log pipes. */
+ log ();
}
-
-bool SciServer::sendSciMsgToDestStations ( SciMsg & sci_msg_to_send, DestStationsList & list_of_dest_stations ) const
+void
+SciServer::log () const
{
- logFunction();
- bool bSend = list_of_dest_stations.empty();
- bool bWrite = false;
-
- if (bSend)
- {
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "--- did not send " << displaySciMsgType(sci_msg_to_send.getSciMsgType()) \
- << " SCI message because no station requested it" << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType(LOG_COM);
- }
- else
- {
- if (NULL != mpListOfStations)
- {
- Sci_Msg_Station_Id txStationId;
- while (!list_of_dest_stations.empty())
- {
- txStationId = list_of_dest_stations.back();
- int length;
- int totalLength;
-
- // Skim through stations list
- //
- for (StationsList::const_iterator it = mpListOfStations->begin(); it != mpListOfStations->end(); ++it)
- {
- // Send message to destination stations
- //
- if ( (NULL != *it)
- && (txStationId == (*it)->getStationId())
- && (MAXIMUS_STATION_STATUS_DEACTIVATED != (*it)->getStationStatus())
- && fillSciMsg(sci_msg_to_send) )
- {
- bSend = true;
-
- // Write data into output pipe
- //
- length = 0;
- totalLength = 0;
- bWrite = true;
- while(totalLength < (int)sci_msg_to_send.getSciMsgDataLength())
- {
- length = write((*it)->getOutputFileDescriptor(), sci_msg_to_send.getSciMsgData() + totalLength, sci_msg_to_send.getSciMsgDataLength()-totalLength);
- if(length < 0)
- {
- if (EAGAIN != errno)
- {
- throw Error(__PRETTY_FUNCTION__, "write data failed", errno);
- }
- else
- {
- length = 0;
- }
- }
- totalLength += length;
- }
-
- if (bWrite)
- {
- // Station status is set to 'BUSY'
- // Station status will stay 'BUSY' until all system 'IDLE' msgs will be received
- //
- (*it)->setStationStatus(MAXIMUS_STATION_STATUS_BUSY);
- (*it)->incrementStationIdleCounter();
- }
-
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "--- send " << displaySciMsgType(sci_msg_to_send.getSciMsgHeader()->type) \
- << " SCI message to station " << dec << (*it)->getStationId() \
- << " (0x" << setfill('0') << setw(4) << uppercase << hex << (*it)->getStationId() << ")" << dec << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType(LOG_INFO);
- }
- }
- list_of_dest_stations.pop_back();
- }
- if (bWrite)
- {
#if CONFIG_LOG
- clog << logger (LOG_COM) << "<--- send " << displaySciMsgType (sci_msg_to_send.getSciMsgHeader ()->type) \
- << " SCI message to destination stations" << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType (LOG_COM);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger (LOG_COM) << "--- did not send " << displaySciMsgType (sci_msg_to_send.getSciMsgHeader ()->type) \
- << " SCI message to destination stations!" << endl;
-#endif /* CONFIG_LOG */
- sci_msg_to_send.displaySpecializedSciMsgType (LOG_COM);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Stations list pointer is NULL");
- }
- }
-
- return bSend;
-}
-
+ logFunction ();
-bool SciServer::registerSpecializedSciMsg ( const Sci_Msg_Type sci_msg_type, SciMsg * sci_msg )
-{
- logFunction();
- bool bRegister = false;
-
- if (NULL != sci_msg)
- {
- if (getArraySize() > (unsigned int)sci_msg_type)
+ std::ofstream stationLogFile;
+ if ((!mStationLog.empty ()) && (mStationLog.compare ("-")))
{
- if (NULL != getSpecializedSciMsgArray())
- {
- if (NULL != *(mpSpecializedSciMsgArray + (unsigned int)sci_msg_type))
- {
- delete(*(mpSpecializedSciMsgArray + (unsigned int)sci_msg_type));
- *(mpSpecializedSciMsgArray + (unsigned int)sci_msg_type) = NULL;
- }
- *(mpSpecializedSciMsgArray + (unsigned int)sci_msg_type) = sci_msg; // set mpSpecializedSciMsgArray
- bRegister = true;
- }
- }
- else
- {
- errno = ENOMSG;
- throw Error(__PRETTY_FUNCTION__, "SCI message type exceeds specialized SCI message array size", errno);
+ stationLogFile.open (mStationLog.c_str (),
+ std::ios_base::app
+ | std::ios_base::ate
+ | std::ios_base::out);
}
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message pointer is NULL", errno);
- }
-
- return bRegister;
-}
+ int length;
+ int maxLength = 1024;
+ char pBuffer[maxLength];
-bool SciServer::receiveMsg ( const Sci_Msg_Header * header,
- const unsigned long data_length,
- const unsigned char * received_data ) const
-{
- logFunction();
- bool bReceiveMsg = false;
-
- if (NULL != header)
- {
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "---> receive " << displaySciMsgType(header->type) << " SCI message from station " << dec << header->station_id << " (" << setfill('0') << setw(4) << uppercase << hex << header->station_id << ")" << dec << endl;
-#endif /* CONFIG_LOG */
-
- // Create a specialized SCI message according to the message header type
- //
- SciMsg * sciMsg = NULL;
- Sci_Msg_Type type = static_cast<Sci_Msg_Type>(header->type);
- bReceiveMsg = createSciMsg (type, &sciMsg);
-
- // Process the created specialized SCI message
- //
- if ( (NULL != sciMsg) && (0 != bReceiveMsg) )
+ stations_list_t::const_iterator it;
+ for (it = sta_list.begin ();
+ it != sta_list.end ();
+ ++ it)
{
- if (NULL != received_data)
- {
- // Fill SCI msg
- //
- bReceiveMsg = fillSciMsg (header, data_length, received_data, &sciMsg);
- sciMsg->displaySpecializedSciMsgData();
- sciMsg->displaySpecializedSciMsgType(LOG_COM);
-
- // Check msg compatibility (check msg versions)
- // Check msg validity
- //
- if (0 != bReceiveMsg)
- {
- bReceiveMsg = sciMsg->checkCompatibility();
- bReceiveMsg &= sciMsg->checkValidity();
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI message not correctly filled in");
- }
-
- // Process SCI msg
- //
- if (0 != bReceiveMsg)
- {
- bReceiveMsg = processSciMsg (sciMsg);
- }
+ assert (*it);
+ /* Read logs coming from all stations (from log pipes). */
+ length = read ((*it)->getLogFileDescriptor (),
+ pBuffer, maxLength);
+ assert (length >= 0);
+
+ if (stationLogFile.is_open ())
+ stationLogFile.write (pBuffer, length);
else
- {
- errno = EPROTO;
- throw Error(__PRETTY_FUNCTION__, "SCI message not valid", errno);
- }
-
- // Free allocated memory
- //
- if (NULL != sciMsg)
- {
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "delete SCI message" << endl;
-#endif /* CONFIG_LOG */
- delete (sciMsg);
- sciMsg = NULL;
- }
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Data pointer is NULL", errno);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Error when creating SCI message");
+ std::cout.write (pBuffer, length);
}
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message header pointer is NULL", errno);
- }
-
- return bReceiveMsg;
-}
-
-
-void SciServer::displaySpecializedSciMsgArray ( ) const
-{
-#if CONFIG_LOG
- logFunction();
- ostringstream oss;
- oss << "specialized SCI msg array = " << endl;
- for (unsigned int i=0; i<getArraySize(); i++)
- {
- if (NULL != *(getSpecializedSciMsgArray()+i))
- {
- oss << "\t" << hex << setfill('0') << setw(8) << uppercase << *(getSpecializedSciMsgArray()+i) << endl;
- }
- else
- {
- oss << "\tNULL" << endl;
- }
- }
- oss.flush();
- clog << logger(LOG_INFO) << oss.str() << dec;
-#endif /* CONFIG_LOG */
+ stationLogFile.close ();
+#endif
}
-
-// private methods
-//
-
-
-bool SciServer::createSciMsg ( const Sci_Msg_Type type, SciMsg ** received_sci_msg ) const
+inline void
+SciServer::send_SciMsg_to_Station (
+ const SciMsg &sci_msg,
+ Station &dsta) const
{
- logFunction();
- bool bCreateMsg = false;
-
- // Create a specialized SCI message according to the header type
- //
- if (NULL != received_sci_msg)
- {
- if ( (getArraySize() > (unsigned int)type) && (NULL != *(getSpecializedSciMsgArray() + (unsigned int)type)) )
- {
- *received_sci_msg = (*(getSpecializedSciMsgArray() + type))->create();
- }
- else
+ logFunction ();
+ const Station_Status dsta_status = dsta.getStationStatus ();
+
+ /* Station status refused are :
+ * - MAXIMUS_STATION_STATUS_NONE
+ * - MAXIMUS_STATION_STATUS_DEACTIVATED */
+ if (dsta_status != MAXIMUS_STATION_STATUS_IDLE
+ && dsta_status != MAXIMUS_STATION_STATUS_BUSY)
{
- errno = ENOMSG;
- throw Error(__PRETTY_FUNCTION__, "SCI message type is invalid: no corresponding SCI message", errno);
+ maximus_log (LOG_ERROR,
+ "|--- did not send "
+ << " SCI message to station "
+ << std::dec << dsta.getStationId () << " (0x"
+ << std::hex << dsta.getStationId () << ")");
+ sci_msg.display_sci_header ();
+ sci_msg.display_specialized_header ();
+ return;
}
- // Check if the just created SCI msg is valid
- //
- if (NULL != *received_sci_msg)
- {
- bCreateMsg = true;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message pointer is invalid", errno);
- }
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message pointer is invalid", errno);
- }
-
- return bCreateMsg;
+ const size_t msg_size = sci_msg.get_sci_alloc_size ();
+ const unsigned char *p_data = sci_msg.get_sci_alloc_addr ();
+
+ /* Pipe is declared as blocking. So we can send totally the sci message
+ * without loop implementation around the write function. */
+ int status = write (dsta.getOutputFileDescriptor (),
+ p_data, msg_size);
+ assert (status == (int) msg_size);
+
+ dsta.setStationStatus (MAXIMUS_STATION_STATUS_BUSY);
+ dsta.incrementStationIdleCounter ();
+
+ maximus_log (LOG_COM,
+ "<--- send "
+ << " SCI message to station "
+ << std::dec << dsta.getStationId () << " (0x"
+ << std::hex << dsta.getStationId () << ")");
+ sci_msg.display_sci_header ();
+ sci_msg.display_specialized_header ();
}
-
-bool SciServer::fillSciMsg ( const Sci_Msg_Header * p_msg_header,
- const unsigned long data_length,
- const unsigned char * p_received_data,
- SciMsg ** created_sci_msg ) const
+void
+SciServer::sendSciMsg (
+ const SciMsg &sci_msg_to_send,
+ const Sci_Msg_Station_Id station_id) const
{
- logFunction();
- bool bFillMsg = false;
+ logFunction ();
- // Fill SCI message contents
- //
- if (NULL != created_sci_msg)
- {
- if (NULL != p_msg_header)
- {
- // Set SCI message header
- // Set SCI message attributes
- //
- bFillMsg = (*created_sci_msg)->setSciMsgHeader(*p_msg_header);
-
- bFillMsg &= (*created_sci_msg)->setSciMsgDataLength(data_length);
- if (NULL != p_received_data)
- {
- bFillMsg &= (*created_sci_msg)->setSciMsgData(p_received_data);
-
- // Set specialized SCI message header
- // Set specialized attributes
- //
- bFillMsg &= (*created_sci_msg)->identifySpecializedSciMsgHeader();
-
- // Remove specialized SCI message header from specialized SCI msg data
- // Then, set specialized SCI message data length, and specialized SCI message data
- //
- bFillMsg &= (*created_sci_msg)->identifySpecializedSciMsgData();
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Data pointer is NULL", errno);
- }
- }
- else
+ assert (is_server_ready);
+
+ stations_list_t::const_iterator it;
+ Station *psta = NULL;
+
+ for (it = sta_list.begin ();
+ psta == NULL && it != sta_list.end (); ++it)
{
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message header pointer is NULL", errno);
+ if ((*it)
+ && (station_id == (*it)->getStationId ()))
+ psta = *it;
}
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message pointer is NULL", errno);
- }
-
- return bFillMsg;
-}
-
-bool SciServer::processSciMsg ( SciMsg * received_sci_msg ) const
-{
- logFunction();
- bool bProcessMsg = false;
-
- if (NULL != received_sci_msg)
- {
- bProcessMsg = received_sci_msg->dispatchMsg();
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI message pointer is NULL", errno);
- }
-
- return bProcessMsg;
+ assert (psta);
+ send_SciMsg_to_Station (sci_msg_to_send, *psta);
}
-
-string SciServer::displaySciMsgType ( uint8_t sci_msg_type ) const
+bool
+SciServer::sendSciMsgToAllActiveStations (
+ SciMsg &sci_msg_to_send) const
{
- logFunction();
- string type;
-
- switch (sci_msg_type)
- {
- case 1:
- type.assign("network clock");
- break;
- case 2:
- type.assign("function call");
- break;
- case 3:
- type.assign("PHY");
- break;
- case 4:
- type.assign("system");
- break;
- case 5:
- type.assign("ethernet");
- break;
- case 0:
- default:
- type.assign("unknown");
- break;
- }
-
- return type;
-}
+ logFunction ();
+ assert (is_server_ready);
-// protected methods
-//
+ /* Get id of the transmitting station. */
+ const Sci_Msg_Station_Id txStationId =
+ sci_msg_to_send.get_sci_stationid ();
+ bool bSend = false;
+ stations_list_t::const_iterator it;
+ for (it = sta_list.begin ();
+ it != sta_list.end (); ++it)
+ {
+ Station *psta = *it;
+
+ /* ... except the sender ... and hidden stations */
+ if (psta
+ && (MAXIMUS_STATION_STATUS_DEACTIVATED != psta->getStationStatus ())
+ && (txStationId != psta->getStationId ())
+ && (psta->getHiddenStationsList ().find (txStationId)
+ == psta->getHiddenStationsList ().end ()))
+ {
+ bSend = true;
+ send_SciMsg_to_Station (sci_msg_to_send, *psta);
+ }
+ }
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-StationsList * SciServer::getStationsList ( ) const
-{
- return mpListOfStations;
+ return bSend;
}
-
-bool SciServer::setStationsList ( StationsList * p_list_of_stations )
+void
+SciServer::register_processor (
+ const Sci_Msg_Type sci_msg_type,
+ Processor *client)
{
- logFunction();
- bool bSetList = false;
-
- if (NULL != p_list_of_stations)
- {
- mpListOfStations = p_list_of_stations;
- bSetList = true;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "List of stations pointer is NULL", errno);
- }
-
- return bSetList;
-}
+ logFunction ();
+ assert (client);
-SciMsg ** SciServer::getSpecializedSciMsgArray ( ) const
-{
- return mpSpecializedSciMsgArray;
-}
+ /* Check if Sci message type exceeds specialized SCI Processor
+ * array size. */
+ assert (SCI_MSG_TYPE_NB > sci_msg_type);
+ /* Check if this Processor have been already registered. */
+ assert (!processor_array[sci_msg_type]);
-unsigned int SciServer::getArraySize ( ) const
-{
- return mArraySize;
+ processor_array[sci_msg_type] = client;
}
-
-Network_Clock_Tick SciServer::getNetworkClockTick ( ) const
+void
+SciServer::unregister_processor (
+ const Sci_Msg_Type sci_msg_type)
{
- return mNetworkClockTick;
-}
+ logFunction ();
+ assert (SCI_MSG_TYPE_NB > sci_msg_type);
+ assert (processor_array[sci_msg_type]);
-bool SciServer::updateTickValue ( const Network_Clock_Tick current_tick_value )
-{
- mNetworkClockTick = current_tick_value;
-
- return true;
+ processor_array[sci_msg_type] = NULL;
}
-
-std::string SciServer::getStationLog ( ) const
+void
+SciServer::check_if_server_ready ()
{
- return mStationLog;
+ if (mNetworkClockTick)
+ is_server_ready = true;
+ else
+ is_server_ready = false;
}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/sci/src/SciServerTest.cpp b/cesar/maximus/sci/src/SciServerTest.cpp
deleted file mode 100644
index 2748d8451a..0000000000
--- a/cesar/maximus/sci/src/SciServerTest.cpp
+++ /dev/null
@@ -1,509 +0,0 @@
-
-#include "SciServerTest.h"
-
-#include "SciServer.h"
-#include "FunctionCallManager.h"
-#include "SystemManager.h"
-#include "PhyProcessor.h"
-#include "NetworkClockProcessor.h"
-#include "ClockSciMsg.h"
-#include "SystemSciMsg.h"
-#include "PhySciMsg.h"
-#include "FunctionSciMsg.h"
-#include "EthernetProcessor.h"
-#include "EtherSciMsg.h"
-
-#include "networkclock_types.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <string>
-#include <iomanip>
-#include <netinet/in.h> // for 'htonl()' and 'htons()'
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (SciServerTest);
-
-
-void SciServerTest::setUp (void)
-{
- logTest();
-
- mpSciServer = new SciServer ();
- mpFunctionCallManager = new FunctionCallManager(mpSciServer);
- mpSystemManager = new SystemManager(mpSciServer);
- mpPhyProcessor = new PhyProcessor(mpSciServer);
- mpEthernet = new EthernetProcessor(mpSciServer);
- mpNetworkClockProcessor = new NetworkClockProcessor(mpSciServer, mpSystemManager, mpFunctionCallManager, mpPhyProcessor, mpEthernet);
-}
-
-
-void SciServerTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpNetworkClockProcessor)
- {
- delete mpNetworkClockProcessor;
- mpNetworkClockProcessor = NULL;
- }
- if (NULL != mpPhyProcessor)
- {
- delete mpPhyProcessor;
- mpPhyProcessor = NULL;
- }
- if (NULL != mpSystemManager)
- {
- delete mpSystemManager;
- mpSystemManager = NULL;
- }
- if (NULL != mpFunctionCallManager)
- {
- delete mpFunctionCallManager;
- mpFunctionCallManager = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete mpSciServer;
- mpSciServer = NULL;
- }
- if (NULL != mpEthernet)
- {
- delete mpEthernet;
- mpEthernet = NULL;
- }
-}
-
-
-void SciServerTest::registerSpecializedSciMsgTest (void)
-{
- logTest();
-
- if (NULL != mpSciServer)
- {
- try
- {
- registerFunctionSciMsgTest ();
- registerSystemSciMsgTest ();
- registerPhySciMsgTest ();
- registerClockSciMsgTest ();
- registerEtherSciMsgTest ();
- }
- catch ( Error &e )
- {
- e.display();
- CPPUNIT_FAIL ("Catch exception");
- }
- }
- else
- {
- CPPUNIT_FAIL ("SciServer pointer is NULL");
- }
-}
-
-
-void SciServerTest::receiveMsgTest (void)
-{
- logTest();
-
- if (NULL != mpSciServer)
- {
- // Before receiving a message, SCI messages have to be registered
- //
- try
- {
- registerFunctionSciMsgTest ();
- registerSystemSciMsgTest ();
- registerPhySciMsgTest ();
- registerClockSciMsgTest ();
- registerEtherSciMsgTest ();
- }
- catch ( Error &e )
- {
- e.display();
- CPPUNIT_FAIL ("Catch exception");
- }
-
- mpSciServer->displaySpecializedSciMsgArray();
-
- // Create a station
- //
- Sci_Msg_Station_Id stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- // Convert string to uint32_t
- //
- string stringMagicId(SCI_MSG_MAGIC);
- uint32_t magicId = (static_cast<uint8_t>(stringMagicId[0])<<24) + (static_cast<uint8_t>(stringMagicId[1])<<16) + (static_cast<uint8_t>(stringMagicId[2])<<8) + static_cast<uint8_t>(stringMagicId[3]);
-
- Sci_Msg_Header msgHeader = { magicId, // uint32_t magic_id
- SCI_MSG_VERSION, // uint8_t version = 0x01
- SCI_MSG_TYPE_NONE, // uint8_t type = 0x00
- 0x0000, // uint16_t length
- stationId, // uint16_t station_id
- SCI_MSG_ID_STATION, // uint16_t msg_id
- 0x01234567, // uint32_t netclock_high
- 0x89101112, // uint32_t netclock_low
- 0xFFFF, //uint16_t flags
- 0xFFFF }; // uint16_t reserved
-
- mpSystemManager->updateStationStatus ( stationId, MAXIMUS_STATION_STATUS_IDLE );
-
- try
- {
- receiveClockSciMsgTest (msgHeader);
- receivePhySciMsgTest (msgHeader);
- receiveSystemSciMsgTest (msgHeader);
- receiveFunctionSciMsgTest (msgHeader);
- receiveEtherSciMsgTest (msgHeader);
- }
- catch ( Error &e )
- {
- e.display();
- CPPUNIT_FAIL ("Catch exception");
- }
-
- // Remove station
- //
- mpSystemManager->removeStation(stationId);
- }
- else
- {
- CPPUNIT_FAIL ("SciServer pointer is NULL");
- }
-}
-
-
-void SciServerTest::registerClockSciMsgTest (void)
-{
- logTest();
-
- // Test a network clock SCI message registration
- //
- CPPUNIT_ASSERT_MESSAGE ( "registerSpecializedSciMsg failed",
- mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_NETWORK_CLOCK, new ClockSciMsg(mpNetworkClockProcessor)) );
-
- // Check results
- //
- CPPUNIT_ASSERT_MESSAGE ( "KO",
- (*((mpSciServer->getSpecializedSciMsgArray())+(unsigned int)SCI_MSG_TYPE_NETWORK_CLOCK)) != NULL );
-}
-
-
-void SciServerTest::registerFunctionSciMsgTest (void)
-{
- logTest();
-
- // Test a function call SCI message registration
- //
- if (NULL != mpFunctionCallManager)
- {
- CPPUNIT_ASSERT_MESSAGE ( "registerSpecializedSciMsg failed",
- mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_FUNCTION_CALL, new FunctionSciMsg(mpFunctionCallManager)) );
- }
- else
- {
- CPPUNIT_FAIL ("FunctionCallManager pointer is NULL");
- }
-
- // Check results
- //
- CPPUNIT_ASSERT_MESSAGE ( "KO",
- (*((mpSciServer->getSpecializedSciMsgArray())+(unsigned int)SCI_MSG_TYPE_FUNCTION_CALL)) != NULL );
-}
-
-
-void SciServerTest::registerPhySciMsgTest (void)
-{
- logTest();
-
- // Test a PHY SCI message registration
- //
- CPPUNIT_ASSERT_MESSAGE ( "registerSpecializedSciMsg failed",
- mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_PHY, new PhySciMsg(mpPhyProcessor)) );
-
- // Check results
- //
- CPPUNIT_ASSERT_MESSAGE ( "KO",
- (*((mpSciServer->getSpecializedSciMsgArray())+(unsigned int)SCI_MSG_TYPE_PHY)) != NULL );
-}
-
-
-void SciServerTest::registerSystemSciMsgTest (void)
-{
- logTest();
-
- // Test a system SCI message registration
- //
- CPPUNIT_ASSERT_MESSAGE ( "registerSpecializedSciMsg failed",
- mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_SYSTEM, new SystemSciMsg(mpSystemManager)) );
-
- // Check results
- //
- CPPUNIT_ASSERT_MESSAGE ( "KO",
- (*((mpSciServer->getSpecializedSciMsgArray())+(unsigned int)SCI_MSG_TYPE_SYSTEM)) != NULL );
-}
-
-
-void SciServerTest::registerEtherSciMsgTest (void)
-{
- logTest();
-
- // Test an Ether SCI message registration
- //
- CPPUNIT_ASSERT_MESSAGE ( "registerSpecializedSciMsg failed",
- mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_ETHERNET, new EtherSciMsg(mpEthernet)) );
-
- // Check results
- //
- CPPUNIT_ASSERT_MESSAGE ( "KO",
- (*((mpSciServer->getSpecializedSciMsgArray())+(unsigned int)SCI_MSG_TYPE_ETHERNET)) != NULL );
-}
-
-
-void SciServerTest::receiveClockSciMsgTest ( Sci_Msg_Header & msg_header )
-{
- logTest();
-
- // Message header type and length have to be set to the corresponding specialized SCI message
- //
- msg_header.type = SCI_MSG_TYPE_NETWORK_CLOCK; // uint8_t type = 0x01
-
- unsigned long dataLength = (unsigned long)sizeof(Network_Clock_Header);
- msg_header.length = (uint16_t)dataLength;
-
- unsigned char * pData = new unsigned char [dataLength];
- if (NULL != pData)
- {
- *pData = static_cast<unsigned char>(NETWORK_CLOCK_VERSION); // uint8_t version = 0x01
- *(pData+1) = static_cast<unsigned char>(NETWORK_CLOCK_TYPE_STATION); // uint8_t type = 0x02
- *(pData+2) = static_cast<unsigned char>(0x01); // uint16_t id
- *(pData+3) = static_cast<unsigned char>(0x23);
- *(pData+4) = static_cast<unsigned char>(0x45); // uint16_t flags
- *(pData+5) = static_cast<unsigned char>(0x67);
- *(pData+6) = static_cast<unsigned char>(0x89); // uint16_t reserved
- *(pData+7) = static_cast<unsigned char>(0x12);
- *(pData+8) = static_cast<unsigned char>(0x01); // uint32_t tick_high
- *(pData+9) = static_cast<unsigned char>(0x23);
- *(pData+10) = static_cast<unsigned char>(0x45);
- *(pData+11) = static_cast<unsigned char>(0x67);
- *(pData+12) = static_cast<unsigned char>(0x89); // uint32_t tick_low
- *(pData+13) = static_cast<unsigned char>(0x10);
- *(pData+14) = static_cast<unsigned char>(0x11);
- *(pData+15) = static_cast<unsigned char>(0x13);
- }
-
- // Test the receiveMsg method
- //
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg ClockSciMsg failed",
- mpSciServer->receiveMsg (&msg_header, dataLength, pData) );
-
- // Free allocated memory
- //
- if (NULL != pData)
- {
- delete [] pData;
- pData = NULL;
- }
-}
-
-
-void SciServerTest::receiveSystemSciMsgTest ( Sci_Msg_Header & msg_header )
-{
- logTest();
-
- // Message header type and length have to be set to the corresponding specialized SCI message
- //
- msg_header.type = SCI_MSG_TYPE_SYSTEM; // uint8_t type = 0x04
-
- unsigned long dataLength = sizeof(struct System_Header);
- msg_header.length = (uint16_t)dataLength;
-
- unsigned char * pData = new unsigned char [dataLength];
- if (NULL != pData)
- {
- *pData = static_cast<unsigned char>(SYSTEM_VERSION); // uint8_t version = 0x01
- *(pData+1) = static_cast<unsigned char>(SYSTEM_TYPE_IDLE); // uint8_t type = 0x01
- *(pData+2) = static_cast<unsigned char>(0xFF); // uint16_t flags
- *(pData+3) = static_cast<unsigned char>(0xFF);
- }
-
- // Test the receiveMsg method
- //
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg SystemSciMsg failed",
- mpSciServer->receiveMsg (&msg_header, dataLength, pData) );
-
- // Free allocated memory
- //
- if (NULL != pData)
- {
- delete [] pData;
- pData = NULL;
- }
-}
-
-
-void SciServerTest::receivePhySciMsgTest ( Sci_Msg_Header & msg_header )
-{
- logTest();
-
- // Message header type and length have to be set to the corresponding specialized SCI message
- //
- msg_header.type = SCI_MSG_TYPE_PHY; // uint8_t type = 0x03
-
- uint32_t iv[3];
- memset(iv, 'z', 3*sizeof(uint32_t));
- uint32_t nek[4];
- memset(nek, 'a', 4*sizeof(uint32_t));
- uint32_t pbMeasurement [PHY_PB_MAX_NB];
- memset(pbMeasurement, 'b', PHY_PB_MAX_NB*sizeof(uint32_t));
- uint32_t pbHeader [PHY_PB_MAX_NB];
- memset(pbHeader, 'c', PHY_PB_MAX_NB*sizeof(uint32_t));
-
- Phy_Header phyHeader;
- phyHeader.version = PHY_VERSION;
- phyHeader.type = PHY_TYPE_PREAMBLE;
- phyHeader.mpdu_format = PHY_MPDU_FORMAT_NONE;
- phyHeader.pb_nb = 0x00;
- phyHeader.msg_nb = 0x01;
- phyHeader.fc_mode = 0x01;
- phyHeader.short_ppdu = 0x01;
- phyHeader.mod = 0x01;
- phyHeader.fecrate = 0x01;
- phyHeader.gil = 0x01;
- phyHeader.tonemap_index = 0x02;
- phyHeader.reserved = 0xFF;
- phyHeader.tx_id = htons(0x0001);
- phyHeader.flags = htons(PHY_FLAG_CRC_OK);
- phyHeader.symbol_nb = htonl(0x00000010);
-
- memcpy(phyHeader.iv, iv, 3*sizeof(uint32_t));
- memcpy(phyHeader.nek, nek, 4*sizeof(uint32_t));
- memcpy(phyHeader.pb_measurement, pbMeasurement, PHY_PB_MAX_NB*sizeof(uint32_t));
- memcpy(phyHeader.pb_header, pbHeader, PHY_PB_MAX_NB*sizeof(uint32_t));
-
- unsigned long dataLength = sizeof(struct Phy_Header);
- msg_header.length = (uint16_t)dataLength;
-
- unsigned char * pData = new unsigned char [dataLength];
- if (NULL != pData)
- {
- memcpy(pData, (unsigned char *)&phyHeader, sizeof(struct Phy_Header));
- }
-
- //Test the receiveMsg method
- //
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg PhySciMsg failed",
- mpSciServer->receiveMsg (&msg_header, dataLength, pData) );
-
- // Free allocated memory
- //
- if (NULL != pData)
- {
- delete [] pData;
- pData = NULL;
- }
-}
-
-
-void SciServerTest::receiveFunctionSciMsgTest ( Sci_Msg_Header & msg_header )
-{
- logTest();
-
- // Message header type and length have to be set to the corresponding specialized SCI message
- //
- msg_header.type = SCI_MSG_TYPE_FUNCTION_CALL;
-
- stringstream ioss;
- ioss << static_cast<unsigned char>(FUNCTION_CALL_VERSION); // uint8_t version = 0x01
- ioss << static_cast<unsigned char>(FUNCTION_CALL_TYPE_RSP); // uint8_t type = 0x01
- ioss << static_cast<unsigned char>(0x00); // uint16_t msg_id = 0x0001
- ioss << static_cast<unsigned char>(0x01);
- ioss << static_cast<unsigned char>(0x02); // uint8_t param_nb
- ioss << static_cast<unsigned char>(0xFF); // uint8_t flags
- ioss << static_cast<unsigned char>(0x00); // uint16_t reserved = 0x0000
- ioss << static_cast<unsigned char>(0x00);
- ioss << "functionSciMsgCallback"; // function call id: null terminated string; id of the called function
- ioss << '\0';
- // parameter list: for each parameter inside the function call message
- ioss << "parameter1"; // parameter id: null terminated string; id of the parameter
- ioss << '\0';
- ioss << static_cast<unsigned char>(0x00); // parameter length: 2 bytes; length of parameter data
- ioss << static_cast<unsigned char>(0x01);
- ioss << static_cast<unsigned char>(0x02); // parameter data: binary content of parameter data
- ioss << "parameter2"; // parameter id: null terminated string; id of the parameter
- ioss << '\0';
- ioss << static_cast<unsigned char>(0x00); // parameter length: 2 bytes; length of parameter data
- ioss << static_cast<unsigned char>(0x02);
- ioss << static_cast<unsigned char>(0x01); // parameter data: binary content of parameter data
- ioss << static_cast<unsigned char>(0x23);
-
- unsigned long dataLength = ioss.str().length();
- msg_header.length = (uint16_t)dataLength;
-
- unsigned char * pData = new unsigned char [dataLength+1];
- if (NULL != pData)
- {
- ioss >> pData;
- }
-
- // Register callback
- //
- if (NULL != mpFunctionCallManager)
- {
- CPPUNIT_ASSERT_MESSAGE ( "registerCallback failed",
- mpFunctionCallManager->registerCallback (0x0001, &functionSciMsgCallback) );
- }
- else
- {
- CPPUNIT_FAIL ("FunctionCallManager pointer is NULL");
- }
-
- // Test the receiveMsg method
- //
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg FunctionSciMsg failed",
- mpSciServer->receiveMsg (&msg_header, dataLength, pData) );
-
- // Free allocated memory
- //
- if (NULL != pData)
- {
- delete [] pData;
- pData = NULL;
- }
-}
-
-
-void SciServerTest::receiveEtherSciMsgTest ( Sci_Msg_Header & msg_header )
-{
- logTest();
-
- // Message header type and length have to be set to the corresponding specialized SCI message
- //
- msg_header.type = SCI_MSG_TYPE_ETHERNET; // uint8_t type = 0x05
-
- Ethernet_Header ethernetHeader;
- ethernetHeader.version = ETHERNET_VERSION;
- ethernetHeader.type = ETHERNET_TYPE_DATA;
- ethernetHeader.flags = 0x00;
- ethernetHeader.reserved = 0xFF;
-
- unsigned long dataLength = 1500;
- unsigned char data[sizeof(struct Ethernet_Header) + dataLength];
- memcpy(data, (unsigned char *)&ethernetHeader, sizeof(struct Ethernet_Header));
- memset(data + sizeof(struct Ethernet_Header), 'D', dataLength);
- dataLength += sizeof(struct Ethernet_Header);
- msg_header.length = (uint16_t)dataLength;
-
- // Test the receiveMsg method
- //
- CPPUNIT_ASSERT_MESSAGE ( "receiveMsg EtherSciMsg failed",
- mpSciServer->receiveMsg (&msg_header, dataLength, data) );
-}
-
-
-void functionSciMsgCallback ( const FunctionSciMsg & function_sci_msg )
-{
- logTest();
-}
-
diff --git a/cesar/maximus/sci/src/SystemSciMsg.cpp b/cesar/maximus/sci/src/SystemSciMsg.cpp
new file mode 100644
index 0000000000..7c99ab893c
--- /dev/null
+++ b/cesar/maximus/sci/src/SystemSciMsg.cpp
@@ -0,0 +1,89 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/src/SystemSciMsg.cpp
+ * \ingroup maximus_sci
+ *
+ */
+#include "maximus/sci/inc/SystemSciMsg.h"
+#include "maximus/utils/inc/Logger.h"
+#include <assert.h>
+#include <netinet/in.h>
+
+static const size_t h_system_size = sizeof (System_Header);
+
+SystemSciMsg::SystemSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *p_alloc):
+ SciMsg (header, p_alloc)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = get_sci_data_addr ();
+ size_t sci_data_size = get_sci_datalength ();
+
+ p_sys_header = (System_Header*) p_buffer;
+ p_sys_data = p_buffer + h_system_size;
+
+ assert (sci_data_size >= h_system_size);
+
+ System_Header &h = *p_sys_header;
+
+ h_system_version = static_cast <uint8_t> (h.version);
+ h_system_type = static_cast <System_Type> (h.type);
+ h_system_flags = static_cast <uint16_t> (ntohs (h.flags));
+}
+
+SystemSciMsg::SystemSciMsg (size_t size_of_data):
+ SciMsg (size_of_data + h_system_size,
+ SCI_MSG_TYPE_SYSTEM),
+ h_system_version (SYSTEM_VERSION),
+ h_system_type (SYSTEM_TYPE_NONE),
+ h_system_flags (0)
+{
+ logFunction ();
+
+ unsigned char *p_buffer = get_sci_data_addr ();
+ p_sys_header = (System_Header*) p_buffer;
+ p_sys_data = p_buffer + h_system_size;
+}
+
+SystemSciMsg::~SystemSciMsg ()
+{
+ logFunction ();
+}
+
+void
+SystemSciMsg::setup_and_send (SciServer &SciServer)
+{
+ logFunction ();
+
+ System_Header &h = *p_sys_header;
+ h.version = static_cast <uint8_t> (h_system_version);
+ h.type = static_cast <uint8_t> (h_system_type);
+ h.flags = static_cast <uint16_t> (htons (h_system_flags));
+
+ SciMsg::setup_and_send (SciServer);
+}
+
+void
+SystemSciMsg::display_specialized_header () const
+{
+ static const char *type2str[SYSTEM_TYPE_NB] = {
+ "TYPE_NONE",
+ "TYPE_IDLE",
+ "TYPE_STATION_NAME"
+ };
+
+ maximus_log (LOG_INFO, "SystemSciMsg header =");
+ maximus_log (LOG_INFO, " version = 0x"
+ << std::hex << (uint) h_system_version);
+ val2str_generic (" type", (size_t) h_system_type,
+ type2str, SYSTEM_TYPE_NB);
+ maximus_log (LOG_INFO, " flags = 0x"
+ << std::hex << h_system_flags);
+}
diff --git a/cesar/maximus/sci/utest/scimsg/Makefile b/cesar/maximus/sci/utest/scimsg/Makefile
new file mode 100644
index 0000000000..1a95343723
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/Makefile
@@ -0,0 +1,23 @@
+BASE = ../../../..
+
+HOST_PROGRAMS = sci_msg_test
+
+sci_msg_test_SOURCES = TestClock.cpp TestPhy.cpp TestSystem.cpp \
+ TestEther.cpp TestFunctionCall.cpp
+sci_msg_test_MODULES = lib maximus/lib/test maximus/utils maximus/sci
+
+# class tested
+maximus_sci_MODULE_SOURCES = SciMsg.cpp \
+ ClockSciMsg.cpp \
+ PhySciMsg.cpp \
+ EtherSciMsg.cpp \
+ FunctionSciMsg.cpp \
+ SystemSciMsg.cpp
+
+# Modules stubbed for this unit test
+sci_msg_test_SOURCES += fake_SciServer.cpp
+
+EXTRA_HOST_CFLAGS := $(shell cppunit-config --cflags)
+EXTRA_HOST_LDLIBS := $(shell cppunit-config --libs)
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/maximus/sci/utest/scimsg/inc/TestClock.h b/cesar/maximus/sci/utest/scimsg/inc/TestClock.h
new file mode 100644
index 0000000000..c6efccbc65
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/inc/TestClock.h
@@ -0,0 +1,52 @@
+#ifndef maximus_sci_utest_scimsg_inc_testclock_h
+#define maximus_sci_utest_scimsg_inc_testclock_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/inc/TestClock.h
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/interface/station/station.h"
+#include "maximus/sci/sci_msg.h"
+#include <sys/types.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class TestClock : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestClock);
+ CPPUNIT_TEST (test_encode);
+ CPPUNIT_TEST (test_decode);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+
+ stations_list_t fake_sta_list;
+ Network_Clock_Tick time_base;
+ SciServer *fake_server;
+
+ void __build_clock_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Network_Clock_Type test_type,
+ Network_Clock_Id test_id,
+ Sci_Msg_Station_Id test_staid);
+
+ void test_encode ();
+ void test_decode ();
+};
+
+#endif /* maximus_sci_utest_scimsg_inc_testclock_h */
diff --git a/cesar/maximus/sci/utest/scimsg/inc/TestEther.h b/cesar/maximus/sci/utest/scimsg/inc/TestEther.h
new file mode 100644
index 0000000000..065c93c329
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/inc/TestEther.h
@@ -0,0 +1,50 @@
+#ifndef maximus_sci_utest_scimsg_inc_testether_h
+#define maximus_sci_utest_scimsg_inc_testether_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/inc/TestEther.h
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/interface/station/station.h"
+#include "maximus/sci/sci_msg.h"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class TestEther : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestEther);
+ CPPUNIT_TEST (test_encode);
+ CPPUNIT_TEST (test_decode);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+
+ stations_list_t fake_sta_list;
+ Network_Clock_Tick time_base;
+ SciServer *fake_server;
+
+ void __build_ether_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ Ethernet_Type test_type);
+
+ void test_encode ();
+ void test_decode ();
+};
+
+#endif /* maximus_sci_utest_scimsg_inc_testether_h */
diff --git a/cesar/maximus/sci/utest/scimsg/inc/TestFunctionCall.h b/cesar/maximus/sci/utest/scimsg/inc/TestFunctionCall.h
new file mode 100644
index 0000000000..888a3c109a
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/inc/TestFunctionCall.h
@@ -0,0 +1,51 @@
+#ifndef maximus_sci_utest_scimsg_inc_testfunctioncall_h
+#define maximus_sci_utest_scimsg_inc_testfunctioncall_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/inc/TestFunctionCall.h
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/interface/station/station.h"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class TestFunctionCall : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestFunctionCall);
+ CPPUNIT_TEST (test_encode);
+ CPPUNIT_TEST (test_decode);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+
+ stations_list_t fake_sta_list;
+ Network_Clock_Tick time_base;
+ SciServer *fake_server;
+
+ void __build_functioncall_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ Function_Call_Type test_type,
+ Function_Call_Msg_Id test_msg_id);
+
+ void test_encode ();
+ void test_decode ();
+};
+
+#endif /* maximus_sci_utest_scimsg_inc_testfunctioncall_h */
diff --git a/cesar/maximus/sci/utest/scimsg/inc/TestPhy.h b/cesar/maximus/sci/utest/scimsg/inc/TestPhy.h
new file mode 100644
index 0000000000..baa8763804
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/inc/TestPhy.h
@@ -0,0 +1,60 @@
+#ifndef maximus_sci_utest_scimsg_inc_testphy_h
+#define maximus_sci_utest_scimsg_inc_testphy_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/inc/TestPhy.h
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/interface/station/station.h"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class TestPhy : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestPhy);
+ CPPUNIT_TEST (test_encode);
+ CPPUNIT_TEST (test_decode);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+
+ stations_list_t fake_sta_list;
+ Network_Clock_Tick time_base;
+ SciServer *fake_server;
+
+ void __build_phy_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ Phy_Type test_type,
+ Phy_Mpdu_Format test_mpdu_format,
+ Phy_Nb_Of_Pbs test_pb_nb,
+ Phy_Short_Ppdu test_short_ppdu,
+ Phy_Mod test_mod,
+ Phy_Fecrate test_fecrate,
+ Phy_Gil test_gil,
+ Phy_Tx_Id test_tx_id,
+ Phy_Flags test_flags,
+ uint32_t test_pb_measurement[MAC_MAX_PB_PER_MPDU],
+ uint32_t test_pb_header[MAC_MAX_PB_PER_MPDU]);
+
+ void test_encode ();
+ void test_decode ();
+};
+
+#endif /* maximus_sci_utest_scimsg_inc_testphy_h */
diff --git a/cesar/maximus/sci/utest/scimsg/inc/TestSystem.h b/cesar/maximus/sci/utest/scimsg/inc/TestSystem.h
new file mode 100644
index 0000000000..c95483cd75
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/inc/TestSystem.h
@@ -0,0 +1,50 @@
+#ifndef maximus_sci_utest_scimsg_inc_testsystem_h
+#define maximus_sci_utest_scimsg_inc_testsystem_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/inc/TestSystem.h
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/sci/sci_msg.h"
+#include "maximus/interface/station/station.h"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class TestSystem : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestSystem);
+ CPPUNIT_TEST (test_encode);
+ CPPUNIT_TEST (test_decode);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+
+ stations_list_t fake_sta_list;
+ Network_Clock_Tick time_base;
+ SciServer *fake_server;
+
+ void __build_system_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ System_Type test_type);
+
+ void test_encode ();
+ void test_decode ();
+};
+
+#endif /* maximus_sci_utest_scimsg_inc_testsystem_h */
diff --git a/cesar/maximus/sci/utest/scimsg/src/TestClock.cpp b/cesar/maximus/sci/utest/scimsg/src/TestClock.cpp
new file mode 100644
index 0000000000..511c1851f2
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/src/TestClock.cpp
@@ -0,0 +1,162 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/src/TestClock.cpp
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
+#include "inc/TestClock.h"
+#include "maximus/sci/inc/ClockSciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+#include <sys/types.h>
+#include <string.h>
+#include <ostream>
+
+uint expected_msg_id = 0;
+CPPUNIT_TEST_SUITE_REGISTRATION (TestClock);
+
+void
+TestClock::setUp ()
+{
+ fake_server = new SciServer (fake_sta_list);
+ fake_server->register_current_tick_addr (&time_base);
+ time_base = 0xDEADBEAF;
+}
+
+void
+TestClock::tearDown ()
+{
+ delete fake_server;
+ fake_server = NULL;
+}
+
+inline void
+TestClock::__build_clock_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Network_Clock_Type test_type,
+ Network_Clock_Id test_id,
+ Sci_Msg_Station_Id test_staid)
+{
+ /* Build the expected buffer in network format. */
+ CPPUNIT_ASSERT (msg_size >= 42);
+
+ memset (expected, 0, msg_size);
+ size_t test_length = data_size + sizeof (Network_Clock_Header);
+
+ /* SciMsg Header from here. */
+ expected[0] = 'M';
+ expected[1] = 'A';
+ expected[2] = 'X';
+ expected[3] = 'I';
+ expected[4] = SCI_MSG_VERSION;
+ expected[5] = SCI_MSG_TYPE_NETWORK_CLOCK;
+ expected[6] = test_length >> 24;
+ expected[7] = test_length >> 16;
+ expected[8] = test_length >> 8;
+ expected[9] = test_length;
+ expected[10] = static_cast <uint16_t> (test_staid) >> 8;
+ expected[11] = static_cast <uint16_t> (test_staid);
+ expected[12] = expected_msg_id >> 8;
+ expected[13] = expected_msg_id;
+ expected[14] = time_base >> 56;
+ expected[15] = time_base >> 48;
+ expected[16] = time_base >> 40;
+ expected[17] = time_base >> 32;
+ expected[18] = time_base >> 24;
+ expected[19] = time_base >> 16;
+ expected[20] = time_base >> 8;
+ expected[21] = time_base;
+ /* Network_Clock Header from here. */
+ expected[26] = NETWORK_CLOCK_VERSION;
+ expected[27] = static_cast <uint8_t> (test_type);
+ expected[28] = static_cast <uint16_t> (test_id) >> 8;
+ expected[29] = static_cast <uint16_t> (test_id);
+ expected[34] = time_base >> 56;
+ expected[35] = time_base >> 48;
+ expected[36] = time_base >> 40;
+ expected[37] = time_base >> 32;
+ expected[38] = time_base >> 24;
+ expected[39] = time_base >> 16;
+ expected[40] = time_base >> 8;
+ expected[41] = time_base;
+}
+
+void
+TestClock::test_encode ()
+{
+ std::cout << "TestClock_encode" << std::endl;
+ const unsigned char *serial_msg;
+ const size_t msg_data_size = 0;
+ Network_Clock_Type type = NETWORK_CLOCK_TYPE_NB;
+ Network_Clock_Id id = 20;
+ Sci_Msg_Station_Id staid = 30;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Network_Clock_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ ++expected_msg_id;
+ __build_clock_msg (expected, msg_size, msg_data_size,
+ type, id, staid);
+
+ ClockSciMsg msg (msg_data_size);
+ msg.set_clock_type (type);
+ msg.set_clock_id (id);
+ msg.set_sci_stationid (staid);
+ msg.setup_and_send (*fake_server);
+ serial_msg = msg.get_sci_alloc_addr ();
+ CPPUNIT_ASSERT (serial_msg);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size ()
+ != (msg_data_size + sizeof (Network_Clock_Header)));
+
+ for (uint i = 0; i < msg_size; i++)
+ {
+ if (expected[i] != serial_msg[i])
+ {
+ std::ostringstream oss;
+ oss << "expected[" << i << "] = "
+ << (uint) expected[i]
+ << " != "
+ << (uint) serial_msg[i]
+ << " = serial_msg[" << i << "]";
+ CPPUNIT_FAIL (oss.str ().c_str ());
+ }
+ }
+ delete [] expected;
+}
+
+void
+TestClock::test_decode ()
+{
+ std::cout << "TestClock_decode" << std::endl;
+ const size_t msg_data_size = 10;
+ Network_Clock_Type type = NETWORK_CLOCK_TYPE_NONE;
+ Network_Clock_Id id = 42;
+ Sci_Msg_Station_Id staid = 99;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Network_Clock_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ __build_clock_msg (expected, msg_size, msg_data_size,
+ type, id, staid);
+
+ ClockSciMsg msg (*((struct Sci_Msg_Header *)expected), expected);
+
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size () == msg_size);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_addr () == expected);
+ CPPUNIT_ASSERT (msg.get_sci_data_addr () == (expected + sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_datalength () == (msg_size - sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_stationid () == staid);
+ CPPUNIT_ASSERT (msg.get_clock_type () == type);
+ CPPUNIT_ASSERT (msg.get_clock_id () == id);
+}
diff --git a/cesar/maximus/sci/utest/scimsg/src/TestEther.cpp b/cesar/maximus/sci/utest/scimsg/src/TestEther.cpp
new file mode 100644
index 0000000000..bd676426a7
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/src/TestEther.cpp
@@ -0,0 +1,161 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/src/TestEther.cpp
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
+#include "inc/TestEther.h"
+#include "maximus/sci/inc/EtherSciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+#include <sys/types.h>
+#include <string.h>
+#include <ostream>
+
+extern uint expected_msg_id;
+CPPUNIT_TEST_SUITE_REGISTRATION (TestEther);
+
+void
+TestEther::setUp ()
+{
+ fake_server = new SciServer (fake_sta_list);
+ fake_server->register_current_tick_addr (&time_base);
+ time_base = 0x1234567809123;
+}
+
+void
+TestEther::tearDown ()
+{
+ delete fake_server;
+ fake_server = NULL;
+}
+
+inline void
+TestEther::__build_ether_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ Ethernet_Type test_type)
+{
+ /* Build the expected buffer in network format. */
+
+ /* 30 = sizeof (Sci_Msg_Header) + sizeof (Ethernet_Header). */
+ CPPUNIT_ASSERT (msg_size >= 30);
+
+ memset (expected, 0, msg_size);
+ size_t test_length = data_size + sizeof (Ethernet_Header);
+
+ /* SciMsg Header from here. */
+ expected[0] = 'M';
+ expected[1] = 'A';
+ expected[2] = 'X';
+ expected[3] = 'I';
+ expected[4] = SCI_MSG_VERSION;
+ expected[5] = SCI_MSG_TYPE_ETHERNET;
+ expected[6] = test_length >> 24;
+ expected[7] = test_length >> 16;
+ expected[8] = test_length >> 8;
+ expected[9] = test_length;
+ expected[10] = static_cast <uint16_t> (test_staid) >> 8;
+ expected[11] = static_cast <uint16_t> (test_staid);
+ expected[12] = expected_msg_id >> 8;
+ expected[13] = expected_msg_id;
+ expected[14] = time_base >> 56;
+ expected[15] = time_base >> 48;
+ expected[16] = time_base >> 40;
+ expected[17] = time_base >> 32;
+ expected[18] = time_base >> 24;
+ expected[19] = time_base >> 16;
+ expected[20] = time_base >> 8;
+ expected[21] = time_base;
+ /* ether Header from here. */
+ expected[26] = SYSTEM_VERSION;
+ expected[27] = static_cast <uint8_t> (test_type);
+}
+
+void
+TestEther::test_encode ()
+{
+ std::cout << "TestEther_encode" << std::endl;
+ const unsigned char *serial_msg;
+ const size_t msg_data_size = 0;
+
+ Sci_Msg_Station_Id staid = 66;
+ Ethernet_Type type = ETHERNET_TYPE_MME;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Ethernet_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ ++expected_msg_id;
+ __build_ether_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type);
+
+ EtherSciMsg msg (msg_data_size);
+ msg.set_sci_stationid (staid);
+ msg.set_ether_type (type);
+
+ msg.setup_and_send (*fake_server);
+ serial_msg = msg.get_sci_alloc_addr ();
+ CPPUNIT_ASSERT (serial_msg);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size ()
+ != (msg_data_size + sizeof (Ethernet_Header)));
+
+ for (uint i = 0; i < msg_size; i++)
+ {
+ if (expected[i] != serial_msg[i])
+ {
+ std::ostringstream oss;
+ oss << "expected[" << i << "] = "
+ << (uint) expected[i]
+ << " != "
+ << (uint) serial_msg[i]
+ << " = serial_msg[" << i << "]";
+ CPPUNIT_FAIL (oss.str ().c_str ());
+ }
+ }
+ delete [] expected;
+}
+
+void
+TestEther::test_decode ()
+{
+ std::cout << "TestEther_decode" << std::endl;
+ const size_t msg_data_size = 15;
+
+ Sci_Msg_Station_Id staid = 42;
+ Ethernet_Type type = ETHERNET_TYPE_DATA;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Ethernet_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ __build_ether_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type);
+
+ EtherSciMsg msg (*((struct Sci_Msg_Header *)expected), expected);
+
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size () == msg_size);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_addr () == expected);
+ CPPUNIT_ASSERT (msg.get_sci_data_addr () == (expected + sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_datalength () == (msg_size - sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_stationid () == staid);
+
+ CPPUNIT_ASSERT (msg.get_ether_type () == type);
+}
diff --git a/cesar/maximus/sci/utest/scimsg/src/TestFunctionCall.cpp b/cesar/maximus/sci/utest/scimsg/src/TestFunctionCall.cpp
new file mode 100644
index 0000000000..a5ede75be9
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/src/TestFunctionCall.cpp
@@ -0,0 +1,169 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/src/TestFunctionCall.cpp
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
+#include "inc/TestFunctionCall.h"
+#include "maximus/sci/inc/FunctionSciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+#include <sys/types.h>
+#include <string.h>
+#include <ostream>
+
+extern uint expected_msg_id;
+CPPUNIT_TEST_SUITE_REGISTRATION (TestFunctionCall);
+
+void
+TestFunctionCall::setUp ()
+{
+ fake_server = new SciServer (fake_sta_list);
+ fake_server->register_current_tick_addr (&time_base);
+ time_base = 0xBEEFBEEFBEEFBEEFll;
+}
+
+void
+TestFunctionCall::tearDown ()
+{
+ delete fake_server;
+ fake_server = NULL;
+}
+
+inline void
+TestFunctionCall::__build_functioncall_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ Function_Call_Type test_type,
+ Function_Call_Msg_Id test_msg_id)
+{
+ /* Build the expected buffer in network format. */
+
+ /* 34 = sizeof (Sci_Msg_Header) + sizeof (Function_Call_Header). */
+ CPPUNIT_ASSERT (msg_size >= 34);
+
+ memset (expected, 0, msg_size);
+ size_t test_length = data_size + sizeof (Function_Call_Header);
+
+ /* SciMsg Header from here. */
+ expected[0] = 'M';
+ expected[1] = 'A';
+ expected[2] = 'X';
+ expected[3] = 'I';
+ expected[4] = SCI_MSG_VERSION;
+ expected[5] = SCI_MSG_TYPE_FUNCTION_CALL;
+ expected[6] = test_length >> 24;
+ expected[7] = test_length >> 16;
+ expected[8] = test_length >> 8;
+ expected[9] = test_length;
+ expected[10] = static_cast <uint16_t> (test_staid) >> 8;
+ expected[11] = static_cast <uint16_t> (test_staid);
+ expected[12] = expected_msg_id >> 8;
+ expected[13] = expected_msg_id;
+ expected[14] = time_base >> 56;
+ expected[15] = time_base >> 48;
+ expected[16] = time_base >> 40;
+ expected[17] = time_base >> 32;
+ expected[18] = time_base >> 24;
+ expected[19] = time_base >> 16;
+ expected[20] = time_base >> 8;
+ expected[21] = time_base;
+ /* functioncall Header from here. */
+ expected[26] = FUNCTION_CALL_VERSION;
+ expected[27] = static_cast <uint8_t> (test_type);
+ expected[28] = static_cast <uint16_t> (test_msg_id) >> 8;
+ expected[29] = static_cast <uint16_t> (test_msg_id);
+}
+
+void
+TestFunctionCall::test_encode ()
+{
+ std::cout << "TestFunctionCall_encode" << std::endl;
+ const unsigned char *serial_msg;
+ const size_t msg_data_size = 0;
+
+ Sci_Msg_Station_Id staid = 30;
+ Function_Call_Type type = FUNCTION_CALL_TYPE_REQ;
+ Function_Call_Msg_Id msg_id = 0x17;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Function_Call_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ ++expected_msg_id;
+ __build_functioncall_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type,
+ msg_id);
+
+ FunctionSciMsg msg (msg_data_size);
+ msg.set_sci_stationid (staid);
+ msg.set_fc_msg_id (msg_id);
+
+ msg.setup_and_send (*fake_server);
+ serial_msg = msg.get_sci_alloc_addr ();
+ CPPUNIT_ASSERT (serial_msg);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size ()
+ != (msg_data_size + sizeof (Function_Call_Header)));
+
+ for (uint i = 0; i < msg_size; i++)
+ {
+ if (expected[i] != serial_msg[i])
+ {
+ std::ostringstream oss;
+ oss << "expected[" << i << "] = "
+ << (uint) expected[i]
+ << " != "
+ << (uint) serial_msg[i]
+ << " = serial_msg[" << i << "]";
+ CPPUNIT_FAIL (oss.str ().c_str ());
+ }
+ }
+ delete [] expected;
+}
+
+void
+TestFunctionCall::test_decode ()
+{
+ std::cout << "TestFunctionCall_decode" << std::endl;
+ const size_t msg_data_size = 15;
+
+ Sci_Msg_Station_Id staid = 42;
+ Function_Call_Type type = FUNCTION_CALL_TYPE_RSP;
+ Function_Call_Msg_Id msg_id = 0x37;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Function_Call_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ __build_functioncall_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type,
+ msg_id);
+
+ FunctionSciMsg msg (*((struct Sci_Msg_Header *)expected), expected);
+
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size () == msg_size);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_addr () == expected);
+ CPPUNIT_ASSERT (msg.get_sci_data_addr () == (expected + sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_datalength () == (msg_size - sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_stationid () == staid);
+
+ CPPUNIT_ASSERT (msg.get_fc_type () == type);
+ CPPUNIT_ASSERT (msg.get_fc_msgid () == msg_id);
+}
diff --git a/cesar/maximus/sci/utest/scimsg/src/TestPhy.cpp b/cesar/maximus/sci/utest/scimsg/src/TestPhy.cpp
new file mode 100644
index 0000000000..0791d5cea4
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/src/TestPhy.cpp
@@ -0,0 +1,270 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/src/TestPhy.cpp
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
+#include "inc/TestPhy.h"
+#include "maximus/sci/inc/PhySciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+#include <sys/types.h>
+#include <string.h>
+#include <ostream>
+
+extern uint expected_msg_id;
+CPPUNIT_TEST_SUITE_REGISTRATION (TestPhy);
+
+void
+TestPhy::setUp ()
+{
+ fake_server = new SciServer (fake_sta_list);
+ fake_server->register_current_tick_addr (&time_base);
+ time_base = 0x1234567809123;
+}
+
+void
+TestPhy::tearDown ()
+{
+ delete fake_server;
+ fake_server = NULL;
+}
+
+inline void
+TestPhy::__build_phy_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ Phy_Type test_type,
+ Phy_Mpdu_Format test_mpdu_format,
+ Phy_Nb_Of_Pbs test_pb_nb,
+ Phy_Short_Ppdu test_short_ppdu,
+ Phy_Mod test_mod,
+ Phy_Fecrate test_fecrate,
+ Phy_Gil test_gil,
+ Phy_Tx_Id test_tx_id,
+ Phy_Flags test_flags,
+ uint32_t test_pb_measurement[MAC_MAX_PB_PER_MPDU],
+ uint32_t test_pb_header[MAC_MAX_PB_PER_MPDU])
+{
+ /* Build the expected buffer in network format. */
+
+ /* 1962 = sizeof (Sci_Msg_Header) + sizeof (Phy_Header). */
+ CPPUNIT_ASSERT (msg_size >= 1962);
+
+ memset (expected, 0, msg_size);
+ size_t test_length = data_size + sizeof (Phy_Header);
+
+ /* SciMsg Header from here. */
+ expected[0] = 'M';
+ expected[1] = 'A';
+ expected[2] = 'X';
+ expected[3] = 'I';
+ expected[4] = SCI_MSG_VERSION;
+ expected[5] = SCI_MSG_TYPE_PHY;
+ expected[6] = test_length >> 24;
+ expected[7] = test_length >> 16;
+ expected[8] = test_length >> 8;
+ expected[9] = test_length;
+ expected[10] = static_cast <uint16_t> (test_staid) >> 8;
+ expected[11] = static_cast <uint16_t> (test_staid);
+ expected[12] = expected_msg_id >> 8;
+ expected[13] = expected_msg_id;
+ expected[14] = time_base >> 56;
+ expected[15] = time_base >> 48;
+ expected[16] = time_base >> 40;
+ expected[17] = time_base >> 32;
+ expected[18] = time_base >> 24;
+ expected[19] = time_base >> 16;
+ expected[20] = time_base >> 8;
+ expected[21] = time_base;
+ /* phy Header from here. */
+ expected[26] = PHY_VERSION;
+ expected[27] = static_cast <uint8_t> (test_type);
+ expected[28] = static_cast <uint8_t> (test_mpdu_format);
+ expected[29] = static_cast <uint8_t> (test_pb_nb);
+ expected[30] = 1; /* msg_nb */
+ expected[31] = PHY_FC_MODE_NONE;
+ expected[32] = static_cast <uint8_t> (test_short_ppdu);
+ expected[33] = static_cast <uint8_t> (test_mod);
+ expected[34] = static_cast <uint8_t> (test_fecrate);
+ expected[35] = static_cast <uint8_t> (test_gil);
+ expected[38] = static_cast <uint16_t> (test_tx_id) >> 8;
+ expected[39] = static_cast <uint16_t> (test_tx_id);
+ expected[40] = static_cast <uint16_t> (test_flags) >> 8;
+ expected[41] = static_cast <uint16_t> (test_flags);
+
+ for (uint i = 0; i < MAC_MAX_PB_PER_MPDU; i++)
+ {
+ int index = 74 + i * sizeof (uint32_t);
+ expected[index + 0] = static_cast <uint32_t> (test_pb_measurement[i]) >> 24;
+ expected[index + 1] = static_cast <uint32_t> (test_pb_measurement[i]) >> 16;
+ expected[index + 2] = static_cast <uint32_t> (test_pb_measurement[i]) >> 8;
+ expected[index + 3] = static_cast <uint32_t> (test_pb_measurement[i]);
+ }
+ for (uint i = 0; i < MAC_MAX_PB_PER_MPDU; i++)
+ {
+ int index = 1018 + i * sizeof (uint32_t);
+ expected[index + 0] = static_cast <uint32_t> (test_pb_header[i]) >> 24;
+ expected[index + 1] = static_cast <uint32_t> (test_pb_header[i]) >> 16;
+ expected[index + 2] = static_cast <uint32_t> (test_pb_header[i]) >> 8;
+ expected[index + 3] = static_cast <uint32_t> (test_pb_header[i]);
+ }
+}
+
+void
+TestPhy::test_encode ()
+{
+ std::cout << "TestPhy_encode" << std::endl;
+ const unsigned char *serial_msg;
+ const size_t msg_data_size = 0;
+
+ Sci_Msg_Station_Id staid = 30;
+ Phy_Type type = PHY_TYPE_FC_AV_ONLY_MODE;
+ Phy_Mpdu_Format mpdu_format = PHY_MPDU_FORMAT_SOF;
+ Phy_Nb_Of_Pbs pb_nb = 20;
+ Phy_Short_Ppdu short_ppdu = true;
+ Phy_Mod mod = PHY_MOD_MINI_ROBO;
+ Phy_Fecrate fecrate = PHY_FEC_RATE_16_21;
+ Phy_Gil gil = PHY_GIL_3534;
+ Phy_Tx_Id tx_id = 0x35;
+ Phy_Flags flags = PHY_FLAG_CRC_OK;
+ uint32_t pb_measurement[MAC_MAX_PB_PER_MPDU];
+ uint32_t pb_header[MAC_MAX_PB_PER_MPDU];
+
+ memset (pb_measurement, 0xBC, sizeof (pb_measurement));
+ memset (pb_header, 0xDB, sizeof (pb_header));
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Phy_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ ++expected_msg_id;
+ __build_phy_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type,
+ mpdu_format,
+ pb_nb,
+ short_ppdu,
+ mod,
+ fecrate,
+ gil,
+ tx_id,
+ flags,
+ pb_measurement,
+ pb_header);
+
+ PhySciMsg msg (msg_data_size);
+ msg.set_sci_stationid (staid);
+ msg.set_phy_type (type);
+ msg.set_phy_MpduFormat (mpdu_format);
+ msg.set_phy_NbOfPbs (pb_nb);
+ msg.set_phy_mod (mod);
+ msg.set_phy_shortppdu (short_ppdu);
+ msg.set_phy_FecRate (fecrate);
+ msg.set_phy_gil (gil);
+ msg.set_phy_TxId (tx_id);
+ msg.set_phy_flags (flags);
+ msg.set_phy_PbMeasurement (pb_measurement);
+ msg.set_phy_PbHeaders (pb_header);
+
+ msg.setup_and_send (*fake_server, staid);
+ serial_msg = msg.get_sci_alloc_addr ();
+ CPPUNIT_ASSERT (serial_msg);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size ()
+ != (msg_data_size + sizeof (Phy_Header)));
+
+ for (uint i = 0; i < msg_size; i++)
+ {
+ if (expected[i] != serial_msg[i])
+ {
+ std::ostringstream oss;
+ oss << "expected[" << i << "] = "
+ << (uint) expected[i]
+ << " != "
+ << (uint) serial_msg[i]
+ << " = serial_msg[" << i << "]";
+ CPPUNIT_FAIL (oss.str ().c_str ());
+ }
+ }
+ delete [] expected;
+}
+
+void
+TestPhy::test_decode ()
+{
+ std::cout << "TestPhy_decode" << std::endl;
+ const size_t msg_data_size = 10;
+
+ Sci_Msg_Station_Id staid = 30;
+ Phy_Type type = PHY_TYPE_FC_AV_ONLY_MODE;
+ Phy_Mpdu_Format mpdu_format = PHY_MPDU_FORMAT_SOF;
+ Phy_Nb_Of_Pbs pb_nb = 20;
+ Phy_Short_Ppdu short_ppdu = true;
+ Phy_Mod mod = PHY_MOD_MINI_ROBO;
+ Phy_Fecrate fecrate = PHY_FEC_RATE_16_21;
+ Phy_Gil gil = PHY_GIL_3534;
+ Phy_Tx_Id tx_id = 0x35;
+ Phy_Flags flags = PHY_FLAG_CRC_OK;
+ uint32_t pb_measurement[MAC_MAX_PB_PER_MPDU];
+ uint32_t pb_header[MAC_MAX_PB_PER_MPDU];
+
+ memset (pb_measurement, 0xBC, sizeof (pb_measurement));
+ memset (pb_header, 0xDB, sizeof (pb_header));
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (Phy_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ __build_phy_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type,
+ mpdu_format,
+ pb_nb,
+ short_ppdu,
+ mod,
+ fecrate,
+ gil,
+ tx_id,
+ flags,
+ pb_measurement,
+ pb_header);
+
+ PhySciMsg msg (*((struct Sci_Msg_Header *)expected), expected);
+
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size () == msg_size);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_addr () == expected);
+ CPPUNIT_ASSERT (msg.get_sci_data_addr () == (expected + sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_datalength () == (msg_size - sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_stationid () == staid);
+
+ CPPUNIT_ASSERT (msg.get_phy_type () == type);
+ CPPUNIT_ASSERT (msg.get_phy_MpduFormat () == mpdu_format);
+ CPPUNIT_ASSERT (msg.get_phy_NbOfPbs () == pb_nb);
+ CPPUNIT_ASSERT (msg.get_phy_shortppdu () == short_ppdu);
+ CPPUNIT_ASSERT (msg.get_phy_mod () == mod);
+ CPPUNIT_ASSERT (msg.get_phy_FecRate () == fecrate);
+ CPPUNIT_ASSERT (msg.get_phy_gil () == gil);
+ CPPUNIT_ASSERT (msg.get_phy_TxId () == tx_id);
+ CPPUNIT_ASSERT (msg.get_phy_flags () == flags);
+
+ for (uint i = 0; i < MAC_MAX_PB_PER_MPDU; i++)
+ CPPUNIT_ASSERT (msg.get_phy_PbMeasurement ()[i] == pb_measurement[i]);
+
+ for (uint i = 0; i < MAC_MAX_PB_PER_MPDU; i++)
+ CPPUNIT_ASSERT (msg.get_phy_PbHeaders ()[i] == pb_header[i]);
+}
diff --git a/cesar/maximus/sci/utest/scimsg/src/TestSystem.cpp b/cesar/maximus/sci/utest/scimsg/src/TestSystem.cpp
new file mode 100644
index 0000000000..cf8b459c52
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/src/TestSystem.cpp
@@ -0,0 +1,161 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/src/TestSystem.cpp
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
+#include "inc/TestSystem.h"
+#include "maximus/sci/inc/SystemSciMsg.h"
+#include "maximus/sci/inc/SciServer.h"
+#include <sys/types.h>
+#include <string.h>
+#include <ostream>
+
+extern uint expected_msg_id;
+CPPUNIT_TEST_SUITE_REGISTRATION (TestSystem);
+
+void
+TestSystem::setUp ()
+{
+ fake_server = new SciServer (fake_sta_list);
+ fake_server->register_current_tick_addr (&time_base);
+ time_base = 0x1234567809123;
+}
+
+void
+TestSystem::tearDown ()
+{
+ delete fake_server;
+ fake_server = NULL;
+}
+
+inline void
+TestSystem::__build_system_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ System_Type test_type)
+{
+ /* Build the expected buffer in network format. */
+
+ /* 30 = sizeof (Sci_Msg_Header) + sizeof (System_Header). */
+ CPPUNIT_ASSERT (msg_size >= 30);
+
+ memset (expected, 0, msg_size);
+ size_t test_length = data_size + sizeof (System_Header);
+
+ /* SciMsg Header from here. */
+ expected[0] = 'M';
+ expected[1] = 'A';
+ expected[2] = 'X';
+ expected[3] = 'I';
+ expected[4] = SCI_MSG_VERSION;
+ expected[5] = SCI_MSG_TYPE_SYSTEM;
+ expected[6] = test_length >> 24;
+ expected[7] = test_length >> 16;
+ expected[8] = test_length >> 8;
+ expected[9] = test_length;
+ expected[10] = static_cast <uint16_t> (test_staid) >> 8;
+ expected[11] = static_cast <uint16_t> (test_staid);
+ expected[12] = expected_msg_id >> 8;
+ expected[13] = expected_msg_id;
+ expected[14] = time_base >> 56;
+ expected[15] = time_base >> 48;
+ expected[16] = time_base >> 40;
+ expected[17] = time_base >> 32;
+ expected[18] = time_base >> 24;
+ expected[19] = time_base >> 16;
+ expected[20] = time_base >> 8;
+ expected[21] = time_base;
+ /* system Header from here. */
+ expected[26] = SYSTEM_VERSION;
+ expected[27] = static_cast <uint8_t> (test_type);
+}
+
+void
+TestSystem::test_encode ()
+{
+ std::cout << "TestSystem_encode" << std::endl;
+ const unsigned char *serial_msg;
+ const size_t msg_data_size = 0;
+
+ Sci_Msg_Station_Id staid = 30;
+ System_Type type = SYSTEM_TYPE_STATION_NAME;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (System_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ ++expected_msg_id;
+ __build_system_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type);
+
+ SystemSciMsg msg (msg_data_size);
+ msg.set_sci_stationid (staid);
+ msg.set_system_type (type);
+
+ msg.setup_and_send (*fake_server);
+ serial_msg = msg.get_sci_alloc_addr ();
+ CPPUNIT_ASSERT (serial_msg);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size ()
+ != (msg_data_size + sizeof (System_Header)));
+
+ for (uint i = 0; i < msg_size; i++)
+ {
+ if (expected[i] != serial_msg[i])
+ {
+ std::ostringstream oss;
+ oss << "expected[" << i << "] = "
+ << (uint) expected[i]
+ << " != "
+ << (uint) serial_msg[i]
+ << " = serial_msg[" << i << "]";
+ CPPUNIT_FAIL (oss.str ().c_str ());
+ }
+ }
+ delete [] expected;
+}
+
+void
+TestSystem::test_decode ()
+{
+ std::cout << "TestSystem_decode" << std::endl;
+ const size_t msg_data_size = 15;
+
+ Sci_Msg_Station_Id staid = 42;
+ System_Type type = SYSTEM_TYPE_IDLE;
+
+ const size_t msg_size = msg_data_size
+ + sizeof (Sci_Msg_Header)
+ + sizeof (System_Header);
+ unsigned char *expected = new unsigned char [msg_size];
+ __build_system_msg (
+ expected,
+ msg_size,
+ msg_data_size,
+ staid,
+ type);
+
+ SystemSciMsg msg (*((struct Sci_Msg_Header *)expected), expected);
+
+ CPPUNIT_ASSERT (msg.get_sci_alloc_size () == msg_size);
+ CPPUNIT_ASSERT (msg.get_sci_alloc_addr () == expected);
+ CPPUNIT_ASSERT (msg.get_sci_data_addr () == (expected + sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_datalength () == (msg_size - sizeof (Sci_Msg_Header)));
+ CPPUNIT_ASSERT (msg.get_sci_stationid () == staid);
+
+ CPPUNIT_ASSERT (msg.get_system_type () == type);
+}
diff --git a/cesar/maximus/sci/utest/scimsg/src/fake_SciServer.cpp b/cesar/maximus/sci/utest/scimsg/src/fake_SciServer.cpp
new file mode 100644
index 0000000000..35938403af
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/src/fake_SciServer.cpp
@@ -0,0 +1,72 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/src/fake_sciserver.cpp
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include "maximus/sci/inc/SciServer.h"
+#include "maximus/utils/inc/Error.h"
+
+SciServer::SciServer (stations_list_t &ref1):
+ sta_list (ref1)
+{
+}
+
+SciServer::~SciServer ()
+{
+}
+
+void
+SciServer::process () const
+{
+}
+
+void
+SciServer::log () const
+{
+}
+
+void
+SciServer::send_SciMsg_to_Station (
+ const SciMsg &sci_msg,
+ Station &dsta) const
+{
+}
+
+void
+SciServer::sendSciMsg (
+ const SciMsg &sci_msg_to_send,
+ const Sci_Msg_Station_Id station_id) const
+{
+}
+
+bool
+SciServer::sendSciMsgToAllActiveStations (
+ SciMsg &sci_msg_to_send) const
+{
+ return false;
+}
+
+void
+SciServer::register_processor (
+ const Sci_Msg_Type sci_msg_type,
+ Processor *client)
+{
+}
+
+void
+SciServer::unregister_processor (
+ const Sci_Msg_Type sci_msg_type)
+{
+}
+
+void
+SciServer::check_if_server_ready ()
+{
+}
diff --git a/cesar/maximus/sci/utest/server/Makefile b/cesar/maximus/sci/utest/server/Makefile
new file mode 100644
index 0000000000..cd8ff168c5
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/Makefile
@@ -0,0 +1,20 @@
+BASE = ../../../..
+
+HOST_PROGRAMS = sci_server_test
+
+sci_server_test_SOURCES = TestSciServer.cpp
+sci_server_test_MODULES = lib maximus/lib/test maximus/utils maximus/sci \
+ maximus/processors
+
+# class tested
+maximus_sci_MODULE_SOURCES = SciServer.cpp SciMsg.cpp
+maximus_processors_MODULE_SOURCES = Processor.cpp
+
+# Modules stubbed for this unit test
+sci_server_test_SOURCES += fake_Station.cpp \
+ PipoSciMsg.cpp PipoProcessor.cpp
+
+EXTRA_HOST_CFLAGS := $(shell cppunit-config --cflags)
+EXTRA_HOST_LDLIBS := $(shell cppunit-config --libs)
+
+include $(BASE)/common/make/top.mk
diff --git a/cesar/maximus/sci/utest/server/inc/PipoProcessor.h b/cesar/maximus/sci/utest/server/inc/PipoProcessor.h
new file mode 100644
index 0000000000..a7a4e0e3e3
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/inc/PipoProcessor.h
@@ -0,0 +1,40 @@
+#ifndef maximus_sci_utest_server_inc_pipoprocessor_h
+#define maximus_sci_utest_server_inc_pipoprocessor_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/inc/PipoProcessor.h
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+#include "maximus/processors/inc/Processor.h"
+#include <stddef.h>
+
+class PipoProcessor : public Processor
+{
+private:
+ size_t last_length;
+ int nb_msg_rx;
+
+public:
+
+ PipoProcessor (SciServer &ref1, MaximusCallBack &ref2);
+
+ virtual ~PipoProcessor ( );
+
+ SciMsg* create_sci_msg (struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ void dispatchMsgProc (SciMsg *msg_rx);
+
+ bool is_msg_received ();
+
+ bool is_good_size (size_t size_expected);
+};
+
+#endif /* maximus_sci_utest_server_inc_pipoprocessor_h */
diff --git a/cesar/maximus/sci/utest/server/inc/PipoSciMsg.h b/cesar/maximus/sci/utest/server/inc/PipoSciMsg.h
new file mode 100644
index 0000000000..af2c8441ed
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/inc/PipoSciMsg.h
@@ -0,0 +1,40 @@
+#ifndef maximus_sci_utest_server_inc_piposcimsg_h
+#define maximus_sci_utest_server_inc_piposcimsg_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/inc/PipoSciMsg.h
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+#include "maximus/sci/inc/SciMsg.h"
+#include "maximus/common/types/sci_types.h"
+
+#define FAKE_SCI_TYPE SCI_MSG_TYPE_PHY
+
+class PipoSciMsg : public SciMsg
+{
+private:
+
+ unsigned char *p_fake_data;
+
+public:
+ PipoSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *buffer);
+
+ PipoSciMsg (size_t size_of_data);
+
+ virtual ~PipoSciMsg ();
+
+ void display_specialized_header () const;
+
+ void setup_and_send (SciServer &SciServer);
+
+};
+
+#endif /* maximus_sci_utest_server_inc_piposcimsg_h */
diff --git a/cesar/maximus/sci/utest/server/inc/TestSciServer.h b/cesar/maximus/sci/utest/server/inc/TestSciServer.h
new file mode 100644
index 0000000000..913f446524
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/inc/TestSciServer.h
@@ -0,0 +1,40 @@
+#ifndef maximus_sci_utest_server_inc_testsciserver_h
+#define maximus_sci_utest_server_inc_testsciserver_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/inc/TestSciServer.h
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "maximus/sci/sci_msg.h"
+#include "maximus/interface/station/station.h"
+
+class TestSciServer : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestSciServer);
+ CPPUNIT_TEST (test_pipe_bidir);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+ stations_list_t sta_list;
+ SciServer *server;
+ Maximus *max;
+
+ void test_pipe_bidir ();
+};
+
+#endif /* maximus_sci_utest_server_inc_testsciserver_h */
diff --git a/cesar/maximus/sci/utest/server/inc/fake_Maximus.h b/cesar/maximus/sci/utest/server/inc/fake_Maximus.h
new file mode 100644
index 0000000000..7fac7b355b
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/inc/fake_Maximus.h
@@ -0,0 +1,36 @@
+#ifndef maximus_sci_utest_server_inc_fake_maximus_h
+#define maximus_sci_utest_server_inc_fake_maximus_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/inc/fake_Maximus.h
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+#include "maximus/interface/inc/MaximusCallBack.h"
+
+class Maximus : public MaximusCallBack
+{
+public:
+ Maximus () {}
+
+ virtual ~Maximus () {}
+
+ void recv_ether_cb (
+ char *pdata,
+ int data_length,
+ Ethernet_Type type,
+ Sci_Msg_Station_Id sta_id) {}
+
+ void recv_phy_mpdu_cb (
+ unsigned long fc_10,
+ unsigned long *fc_av,
+ PhySciMsg &msg) {}
+};
+
+#endif /* maximus_sci_utest_server_inc_fake_maximus_h */
diff --git a/cesar/maximus/sci/utest/server/src/PipoProcessor.cpp b/cesar/maximus/sci/utest/server/src/PipoProcessor.cpp
new file mode 100644
index 0000000000..6b796cd94a
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/src/PipoProcessor.cpp
@@ -0,0 +1,69 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/src/PipoProcessor.cpp
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+
+#include "inc/PipoProcessor.h"
+#include "inc/PipoSciMsg.h"
+#include "maximus/sci/inc/SciMsg.h"
+#include <ostream>
+#include <iostream>
+
+PipoProcessor::PipoProcessor (SciServer &ref1,
+ MaximusCallBack &ref2):
+ Processor (ref1, ref2, FAKE_SCI_TYPE)
+{
+ nb_msg_rx = 0;
+}
+
+PipoProcessor::~PipoProcessor ()
+{
+}
+
+SciMsg*
+PipoProcessor::create_sci_msg (
+ struct Sci_Msg_Header &header,
+ unsigned char *buffer)
+{
+ return new PipoSciMsg (header, buffer);
+}
+
+void
+PipoProcessor::dispatchMsgProc (
+ SciMsg *msg_rx)
+{
+ PipoSciMsg *msg =
+ static_cast <PipoSciMsg*> (msg_rx);
+
+ last_length = msg->get_sci_datalength ();
+ nb_msg_rx ++;
+ delete msg;
+}
+
+
+bool
+PipoProcessor::is_msg_received ()
+{
+ if (nb_msg_rx)
+ return true;
+ return false;
+}
+
+bool
+PipoProcessor::is_good_size (size_t size_expected)
+{
+ int check = nb_msg_rx;
+ nb_msg_rx = 0;
+
+ if (size_expected == last_length && check == 1)
+ return true;
+ return false;
+}
diff --git a/cesar/maximus/sci/utest/server/src/PipoSciMsg.cpp b/cesar/maximus/sci/utest/server/src/PipoSciMsg.cpp
new file mode 100644
index 0000000000..61fd0c8cac
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/src/PipoSciMsg.cpp
@@ -0,0 +1,44 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/src/PipoSciMsg.c
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+
+#include "inc/PipoSciMsg.h"
+#include <cstring>
+
+PipoSciMsg::PipoSciMsg (struct Sci_Msg_Header &header,
+ unsigned char *buffer):
+ SciMsg (header, buffer)
+{
+}
+
+PipoSciMsg::PipoSciMsg (size_t size_of_data):
+ SciMsg (size_of_data, FAKE_SCI_TYPE)
+{
+ if (size_of_data)
+ memset (get_sci_data_addr (), 0, size_of_data);
+}
+
+PipoSciMsg::~PipoSciMsg ()
+{
+}
+
+void
+PipoSciMsg::display_specialized_header () const
+{
+}
+
+void
+PipoSciMsg::setup_and_send (SciServer &SciServer)
+{
+ SciMsg::setup_and_send (SciServer);
+}
+
diff --git a/cesar/maximus/sci/utest/server/src/TestSciServer.cpp b/cesar/maximus/sci/utest/server/src/TestSciServer.cpp
new file mode 100644
index 0000000000..7d76ccf1f6
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/src/TestSciServer.cpp
@@ -0,0 +1,103 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/src/TestSciServer.cpp
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/sci/inc/SciServer.h"
+#include "maximus/utils/inc/Error.h"
+
+#include "inc/TestSciServer.h"
+#include "inc/fake_Maximus.h"
+#include "inc/PipoProcessor.h"
+#include "inc/PipoSciMsg.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestSciServer);
+
+void
+TestSciServer::setUp ()
+{
+ server = new SciServer (sta_list);
+ max = new Maximus ();
+}
+
+void
+TestSciServer::tearDown ()
+{
+ delete server;
+ delete max;
+ max = NULL;
+ server = NULL;
+}
+
+void
+TestSciServer::test_pipe_bidir ()
+{
+ std::cout << __func__ << ": 0% .." << std::flush;
+ Network_Clock_Tick time = 0;
+
+ static const size_t progress[3] = {
+ /* 25% */
+ SCI_MSG_MAX_SIZE / 4,
+ /* 50% */
+ SCI_MSG_MAX_SIZE / 2,
+ /* 75% */
+ (3 * SCI_MSG_MAX_SIZE) / 4,
+ };
+
+ try
+ {
+ PipoProcessor *pipo_proc = new PipoProcessor (*server, *max);
+ server->register_current_tick_addr (&time);
+
+ Station *fake_sta = new Station (*max,
+ "noexec", 0, SCI_MSG_MAX_SIZE);
+ sta_list.push_back (fake_sta);
+
+ PipoSciMsg *msg = NULL;
+ for (size_t i = 0; i < SCI_MSG_MAX_SIZE; i++)
+ {
+ if (i == progress[0])
+ std::cout << "25% .." << std::flush;
+ if (i == progress[1])
+ std::cout << "50% .." << std::flush;
+ if (i == progress[2])
+ std::cout << "75% .." << std::flush;
+
+ msg = new PipoSciMsg (i);
+ msg->set_sci_stationid (fake_sta->getStationId ());
+
+ msg->setup_and_send (*server);
+ delete msg;
+ msg = NULL;
+
+ do
+ {
+ server->process ();
+ } while (!pipo_proc->is_msg_received ());
+
+
+ /* Is the message have been drive to pipo_proc. */
+ CPPUNIT_ASSERT (pipo_proc->is_good_size (i));
+ }
+ std::cout << "100%" << std::endl;
+
+ sta_list.clear ();
+ delete fake_sta;
+ delete pipo_proc;
+ }
+ catch (Error &e)
+ {
+ e.display ();
+ CPPUNIT_FAIL ("Error catched !");
+ }
+}
diff --git a/cesar/maximus/sci/utest/server/src/fake_Station.cpp b/cesar/maximus/sci/utest/server/src/fake_Station.cpp
new file mode 100644
index 0000000000..64d76b6578
--- /dev/null
+++ b/cesar/maximus/sci/utest/server/src/fake_Station.cpp
@@ -0,0 +1,173 @@
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/server/src/fake_station.cpp
+ * \ingroup maximus_sci_utest_server
+ *
+ */
+#include "maximus/interface/station/inc/Station.h"
+#include "maximus/utils/inc/Error.h"
+#include "maximus/sci/inc/SciServer.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string>
+#include <string.h>
+#include <sstream>
+#include <stdio.h>
+#include <cstdlib>
+#include <netinet/in.h>
+#include <assert.h>
+
+Station::Station (
+ Maximus &ref1,
+ const std::string & station_executable,
+ const Network_Clock_Tick current_tick_value,
+ uint32_t seed):
+ interface (ref1),
+ fd_sta2max (-1),
+ fd_max2sta (-1),
+ fd_log (-1),
+ mStationStatus (MAXIMUS_STATION_STATUS_IDLE),
+ mStationIdleCounter (0)
+{
+ std::ostringstream pipe_max2sta, pipe_sta2max;
+
+ pipe_max2sta << STATION_PIPE_PATH;
+ pipe_max2sta << "/" ;
+ pipe_max2sta << STATION_PIPE_PREFIX;
+ pipe_sta2max << pipe_max2sta.str ();
+
+ pipe_sta2max << "_sta2max_";
+ pipe_max2sta << "_max2sta_";
+
+ mPid = fork ();
+
+ if (mPid == 0)
+ {
+ /* child process. */
+ mPid = getpid ();
+ pipe_sta2max << std::dec << mPid;
+ pipe_max2sta << std::dec << mPid;
+
+ mknod (pipe_max2sta.str ().c_str (), 0770 | S_IFIFO, 0);
+ mknod (pipe_sta2max.str ().c_str (), 0770 | S_IFIFO, 0);
+
+ /* output pipe for a sta. */
+ fd_sta2max = open (pipe_sta2max.str ().c_str (),
+ O_WRONLY);
+ if (fd_sta2max < 0)
+ exit (EXIT_FAILURE);
+
+ /* Input pipe for a sta. */
+ fd_max2sta = open (pipe_max2sta.str ().c_str (),
+ O_RDONLY | O_CLOEXEC);;
+ if (fd_max2sta < 0)
+ exit (EXIT_FAILURE);
+
+ try
+ {
+ const int header_size = sizeof (struct Sci_Msg_Header);
+ char alloc[SCI_MSG_MAX_SIZE];
+ struct Sci_Msg_Header *header = (Sci_Msg_Header *) alloc;
+ int msg_size;
+ int ret;
+ size_t nb_message;
+
+ for (nb_message = 0;
+ nb_message < seed;
+ nb_message++)
+ {
+ ret = read (fd_max2sta, alloc, header_size);
+ assert (ret == header_size);
+
+ msg_size = ntohl (header->length);
+
+ if (msg_size != 0)
+ {
+ ret = read (fd_max2sta, alloc + header_size, msg_size);
+ assert (ret == msg_size);
+ }
+
+ ret = write (fd_sta2max, alloc, msg_size + header_size);
+ assert (ret == msg_size + header_size);
+ }
+ }
+ catch (Error &e)
+ {
+ e.display ();
+ exit (EXIT_FAILURE);
+ }
+
+ /* Wait the SIGKILL. */
+ pause ();
+ }
+
+ assert (mPid >= 0);
+
+ pipe_sta2max << std::dec << mPid;
+ pipe_max2sta << std::dec << mPid;
+
+ mknod (pipe_max2sta.str ().c_str (), 0770 | S_IFIFO, 0);
+ mknod (pipe_sta2max.str ().c_str (), 0770 | S_IFIFO, 0);
+
+ fd_sta2max = open (pipe_sta2max.str ().c_str (),
+ O_RDONLY | O_CLOEXEC);;
+ assert (fd_sta2max >= 0);
+
+ fd_max2sta = open (pipe_max2sta.str ().c_str (),
+ O_WRONLY);
+ assert (fd_sta2max >= 0);
+}
+
+Station::~Station ()
+{
+ std::ostringstream pipe_max2sta, pipe_sta2max;
+
+ pipe_max2sta << STATION_PIPE_PATH;
+ pipe_max2sta << "/" ;
+ pipe_max2sta << STATION_PIPE_PREFIX;
+ pipe_sta2max << pipe_max2sta.str ();
+
+ pipe_sta2max << "_sta2max_";
+ pipe_max2sta << "_max2sta_";
+
+ pipe_sta2max << std::dec << mPid;
+ pipe_max2sta << std::dec << mPid;
+
+ if (fd_max2sta >= 0)
+ {
+ close (fd_max2sta);
+ fd_max2sta = 0;
+ }
+
+ if (fd_sta2max >= 0)
+ {
+ close (fd_sta2max);
+ fd_sta2max = 0;
+ }
+
+ remove (pipe_sta2max.str ().c_str ());
+ remove (pipe_max2sta.str ().c_str ());
+
+ kill (mPid, SIGKILL);
+}
+
+void
+Station::decrementStationIdleCounter ()
+{
+}
+
+bool
+Station::hideStation (
+ Sci_Msg_Station_Id station_id, bool hidden)
+{
+ return true;
+}
diff --git a/cesar/maximus/stationtest/Config b/cesar/maximus/stationtest/Config
deleted file mode 100644
index 20950daa9a..0000000000
--- a/cesar/maximus/stationtest/Config
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_DEBUG = y
-CONFIG_DEBUG_FATAL_CATCH = y \ No newline at end of file
diff --git a/cesar/maximus/system/Module b/cesar/maximus/system/Module
deleted file mode 100644
index e911dbaf21..0000000000
--- a/cesar/maximus/system/Module
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES := Station.cpp StationConfiguration.cpp SystemManager.cpp SystemSciMsg.cpp
-ifdef UNITTEST
-SOURCES += SystemManagerTest.cpp StationTest.cpp StationConfigurationTest.cpp SystemSciMsgTest.cpp
-endif
-HOST_INCLUDES += maximus/system/inc
diff --git a/cesar/maximus/system/inc/ISystem.h b/cesar/maximus/system/inc/ISystem.h
deleted file mode 100644
index 21bfd68341..0000000000
--- a/cesar/maximus/system/inc/ISystem.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/************************************************************************
- ISystem.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/common/interfaces/ISystem.h
-**************************************************************************/
-
-#ifndef ISYSTEM_H
-#define ISYSTEM_H
-
-#include "sci_types.h"
-#include "system_types.h"
-
-#include <list>
-#include <string> // string
-
-class Station;
-class INetworkClock;
-class SystemSciMsg;
-
-typedef std::list<Station*> StationsList;
-
-
-/**
- * class ISystem
- */
-
-class ISystem
-{
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Empty Constructor
- */
- ISystem ( ) { }
-
- /**
- * Empty Destructor
- */
- virtual ~ISystem ( ) { }
-
- // public methods
- //
-
- /**
- * Indicate the default station executable to run when creating a station
- * @return bool
- * @param default_station_executable the new value of mDefaultStationExecutable
- * @param debugger the new value of mDebugger
- */
- virtual bool init ( const std::string & default_station_executable, const std::string & debugger ) = 0;
-
- /**
- * @return Sci_Msg_Station_Id
- */
- virtual Sci_Msg_Station_Id createStation ( const std::string & station_executable, uint32_t seed = 0 ) = 0;
-
- /**
- * @return bool
- * @param system_sci_msg
- */
- virtual bool receiveIdleMsg ( const SystemSciMsg & system_sci_msg ) const = 0;
-
- /**
- * @return bool
- * @param station_id
- */
- virtual bool removeStation ( Sci_Msg_Station_Id station_id ) = 0;
-
- /**
- * @return bool
- * @param station_id
- */
- virtual bool deactivateStation ( Sci_Msg_Station_Id station_id ) = 0;
-
- /**
- * @return bool
- * @param station_id
- */
- virtual bool activateStation ( Sci_Msg_Station_Id station_id ) = 0;
-
- /**
- * @return bool
- * @param station_id
- */
- virtual bool debugStation ( const Sci_Msg_Station_Id station_id ) = 0;
-
- /**
- * @return bool
- */
- virtual bool isStationIdle ( Sci_Msg_Station_Id station_id ) const = 0;
-
- /**
- * @return bool
- * @param station_id
- * @param new_status
- */
- virtual bool updateStationStatus ( const Sci_Msg_Station_Id station_id, const Station_Status new_status ) = 0;
-
- /**
- * Get the value of mListOfStations
- * @return the value of mListOfStations
- */
- virtual StationsList * getListOfStations ( ) = 0;
-
- /**
- * @return bool
- */
- virtual bool areAllActiveStationsIdle ( ) const = 0;
-
- /**
- * @return bool
- * @param p_network_clock the new value of mpNetworkClock
- */
- virtual bool setNetworkClock ( INetworkClock * p_network_clock ) = 0;
-
- /**
- * @return mDefaultStationExecutable
- */
- virtual const std::string & getDefaultStationExecutable ( ) const = 0;
-
- /**
- * @return bool
- * @param station_id the station ID
- * @param station_name the new value of the station name
- */
- virtual bool setStationName ( const Sci_Msg_Station_Id station_id, const std::string & station_name ) = 0;
-
- /**
- * @return bool
- * @param station_id1 ID of one of the concerned stations (order has no importance)
- * @param station_id2 ID of the second station
- * @param hidden indicates if the stations have to be hidden or visible from each other
- */
- virtual bool hideStation (Sci_Msg_Station_Id station_id1,
- Sci_Msg_Station_Id station_id2,
- bool hidden) = 0;
-
-};
-
-
-#endif // ISYSTEM_H
diff --git a/cesar/maximus/system/inc/Station.h b/cesar/maximus/system/inc/Station.h
deleted file mode 100644
index 14b5ea8cf9..0000000000
--- a/cesar/maximus/system/inc/Station.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/************************************************************************
- Station.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/inc/Station.h
-**************************************************************************/
-
-#ifndef STATION_H
-#define STATION_H
-
-#include "system_types.h"
-#include "sci_types.h"
-#include "networkclock_types.h" // for 'Network_Clock_Tick'
-
-#include <exception>
-#include <string>
-#include <iostream> // for 'cout', 'cerr', 'clog' and 'pid_t'
-#include <set>
-
-#define STATION_PIPE_PATH "/tmp"
-#define STATION_PIPE_PREFIX "station"
-#define STATION_SOCK_PATH STATION_PIPE_PATH
-#define STATION_SOCK_PREFIX STATION_PIPE_PREFIX
-#define STATION_WAIT_LOOP_NB 10
-#define STATION_WAIT_TIMEOUT_MS 100
-#define STATION_MAX_SOCK_BUFFER_SIZE (256*1024)
-
-class StationConfiguration;
-
-typedef std::set<Sci_Msg_Station_Id> HiddenStationsList;
-
-
-/**
- * class Station
- */
-
-class Station
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- File_Descriptor mInputFileDescriptor, mOutputFileDescriptor;
- File_Descriptor mLogPipe;
- pid_t mPid;
- Station_Status mStationStatus;
- unsigned short int mStationIdleCounter;
- StationConfiguration * mpStationConfiguration;
- HiddenStationsList mHiddenStationsList;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- Station ( const std::string & station_executable, const Network_Clock_Tick current_tick_value, uint32_t seed = 0 );
-
- /**
- * Empty Destructor
- */
- virtual ~Station ( );
-
- // public methods
- //
-
- bool operator== ( const Station & station ) const;
-
- Station & operator= ( const Station & station );
-
- /**
- * @return void
- */
- void displayStation ( ) const;
-
- bool launchDebugger ( const std::string & command_line ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return Sci_Station_Id
- */
- Sci_Msg_Station_Id getStationId ( ) const;
-
- /**
- * @return pid_t
- */
- pid_t getPid ( ) const;
-
- /**
- * @return bool
- * @param input_file_descriptor
- */
- bool setInputFileDescriptor ( const File_Descriptor input_file_descriptor );
-
- /**
- * @return bool
- * @param output_file_descriptor
- */
- bool setOutputFileDescriptor ( const File_Descriptor output_file_descriptor );
-
- /**
- * @return bool
- * @param log_file_descriptor
- */
- bool setLogFileDescriptor ( const File_Descriptor log_file_descriptor );
-
- /**
- * @return File_Descriptor
- */
- File_Descriptor getInputFileDescriptor ( ) const;
-
- /**
- * @return File_Descriptor
- */
- File_Descriptor getOutputFileDescriptor ( ) const;
-
- /**
- * @return File_Descriptor
- */
- File_Descriptor getLogFileDescriptor ( ) const;
-
- /**
- * @return Station_Status
- */
- Station_Status getStationStatus ( ) const;
-
- /**
- * @return bool
- * @param status
- */
- bool setStationStatus ( const Station_Status status );
-
- /**
- * @return mStationIdleCounter
- */
- unsigned short int getStationIdleCounter ( ) const;
-
- /**
- * @return bool
- */
- bool incrementStationIdleCounter ( );
-
- /**
- * @return bool
- */
- bool decrementStationIdleCounter ( );
-
- /**
- * @return bool
- * @param p_station_configuration
- */
- bool setStationConfiguration ( StationConfiguration * p_station_configuration );
-
- /**
- * @return StationConfiguration
- */
- StationConfiguration * getStationConfiguration ( ) const;
-
- /**
- * @return bool
- * @param station_name the new value of mpStationConfiguration->mStationName
- */
- bool setStationName ( const std::string & station_name );
-
- /**
- * @return reference to mHiddenStations
- */
- inline const HiddenStationsList & getHiddenStationsList ( ) const { return mHiddenStationsList; }
-
- /**
- * @param hidden_stations_list to set into mHiddenStations
- */
- bool setHiddenStationsList (const HiddenStationsList & hidden_stations_list);
-
- /**
- * @return bool
- * @param station_id the ID of the station to hide or to make visible
- * @param hidden indicates if the station has to be hidden or visible
- */
- bool hideStation (Sci_Msg_Station_Id station_id, bool hidden);
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- /**
- * @return void
- */
- void startProcess ( const Network_Clock_Tick current_tick_value, uint32_t seed = 0 );
-
- /**
- * @return void
- */
- void stopProcess ( );
-
- void initAttributes ( );
-
- void displayStationStatus ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // STATION_H
diff --git a/cesar/maximus/system/inc/StationConfiguration.h b/cesar/maximus/system/inc/StationConfiguration.h
deleted file mode 100644
index 2525ec116f..0000000000
--- a/cesar/maximus/system/inc/StationConfiguration.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/************************************************************************
- StationConfiguration.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/inc/StationConfiguration.h
-**************************************************************************/
-
-#ifndef STATIONCONFIGURATION_H
-#define STATIONCONFIGURATION_H
-
-#include "system_types.h"
-
-#include <string>
-
-
-/**
- * class StationConfiguration
- */
-
-class StationConfiguration
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- std::string mStationExecutable;
- std::string mStationName;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- StationConfiguration ( std::string & station_executable, std::string station_name = std::string("station") );
-
- /**
- * Empty Destructor
- */
- virtual ~StationConfiguration ( );
-
- // public methods
- //
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Set the station executable.
- * @param station_executable the new value of mStationExecutable
- */
- bool setStationExecutable ( const std::string & station_executable );
-
- /**
- * Get the station executable.
- * @return mStationExecutable
- */
- const std::string & getStationExecutable ( ) const;
-
- /**
- * Set the station name.
- * @param station_name the new vale of mStationName
- */
- bool setStationName ( const std::string & station_name );
-
- /**
- * Get the station name.
- * @return mStationName
- */
- const std::string & getStationName ( ) const;
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( );
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // STATIONCONFIGURATION_H
diff --git a/cesar/maximus/system/inc/StationConfigurationTest.h b/cesar/maximus/system/inc/StationConfigurationTest.h
deleted file mode 100644
index 958857ffce..0000000000
--- a/cesar/maximus/system/inc/StationConfigurationTest.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef STATIONCONFIGURATIONTEST_H
-#define STATIONCONFIGURATIONTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class StationConfiguration;
-
-
-class StationConfigurationTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (StationConfigurationTest);
- CPPUNIT_TEST (setStationNameTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void setStationNameTest (void);
-
-private:
-
- StationConfiguration * mpStationConfiguration;
-
-};
-
-
-#endif // STATIONCONFIGURATIONTEST_H
diff --git a/cesar/maximus/system/inc/StationTest.h b/cesar/maximus/system/inc/StationTest.h
deleted file mode 100644
index 43b465e11f..0000000000
--- a/cesar/maximus/system/inc/StationTest.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#ifndef STATIONTEST_H
-#define STATIONTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class Station;
-
-
-class StationTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (StationTest);
- CPPUNIT_TEST (setStationNameTest);
- CPPUNIT_TEST (setHiddenStationsListTest);
- CPPUNIT_TEST (hideStationTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void setStationNameTest (void);
- void setHiddenStationsListTest (void);
- void hideStationTest (void);
-
-private:
-
- Station * mpStation;
-
-};
-
-
-#endif // STATIONCONFIGURATIONTEST_H
diff --git a/cesar/maximus/system/inc/SystemManager.h b/cesar/maximus/system/inc/SystemManager.h
deleted file mode 100644
index c939f6ecc8..0000000000
--- a/cesar/maximus/system/inc/SystemManager.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/************************************************************************
- SystemManager.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/inc/SystemManager.h
-**************************************************************************/
-
-#ifndef SYSTEMMANAGER_H
-#define SYSTEMMANAGER_H
-
-#include "ISystem.h"
-
-#include "sci_types.h"
-#include "system_types.h"
-
-#include <string>
-
-class Station;
-class ISci;
-class SystemSciMsg;
-class INetworkClock;
-
-
-/**
- * class SystemManager
- */
-
-class SystemManager : public ISystem
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- StationsList mListOfStations;
- ISci * mpSciServer;
- std::string mDefaultStationExecutable;
- std::string mDebugger;
-
- INetworkClock * mpNetworkClock;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- SystemManager ( ISci * p_sci_server );
-
- /**
- * Empty Destructor
- */
- virtual ~SystemManager ( );
-
- // public methods
- //
-
- /**
- * Indicate the default station executable to run when creating a station
- * @return bool
- * @param default_station_executable the new value of mDefaultStationExecutable
- * @param debugger the new value of mDebugger
- */
- bool init ( const std::string & default_station_executable, const std::string & debugger );
-
- /**
- * @return Sci_Msg_Station_Id
- */
- Sci_Msg_Station_Id createStation ( const std::string & station_executable, uint32_t seed = 0 );
-
- /**
- * @return bool
- * @param system_sci_msg
- */
- bool receiveIdleMsg ( const SystemSciMsg & system_sci_msg ) const;
-
- /**
- * @return bool
- * @param station_id
- */
- bool removeStation ( const Sci_Msg_Station_Id station_id );
-
- /**
- * @return bool
- */
- bool removeAllStations ( );
-
- /**
- * @return bool
- * @param station_id
- */
- bool deactivateStation ( const Sci_Msg_Station_Id station_id );
-
- /**
- * @return bool
- * @param station_id
- */
- bool activateStation ( const Sci_Msg_Station_Id station_id );
-
- /**
- * @return bool
- * @param station_id
- */
- bool debugStation ( const Sci_Msg_Station_Id station_id );
-
- /**
- * @return bool
- */
- bool isStationIdle ( Sci_Msg_Station_Id station_id ) const;
-
- /**
- * @return bool
- */
- bool areAllActiveStationsIdle ( ) const;
-
- /**
- * @return Station_Status
- * @param station_id
- */
- Station_Status getStationStatus ( const Sci_Msg_Station_Id station_id ) const;
-
- /**
- * @return bool
- * @param station_id
- * @param new_status
- */
- bool updateStationStatus ( const Sci_Msg_Station_Id station_id, const Station_Status new_status );
-
- /**
- * @return bool
- * @param p_network_clock the new value of mpNetworkClock
- */
- bool setNetworkClock ( INetworkClock * p_network_clock );
-
- /**
- * @return mDefaultStationExecutable
- */
- const std::string & getDefaultStationExecutable ( ) const;
-
- /**
- * @return bool
- * @param station_id the station ID
- * @param station_name the new value of the station name
- */
- bool setStationName ( const Sci_Msg_Station_Id station_id, const std::string & station_name );
-
- /**
- * @return bool
- * @param station_id1 ID of one of the concerned stations (order has no importance)
- * @param station_id2 ID of the second station
- * @param hidden indicates if the stations have to be hidden or visible from each other
- */
- bool hideStation (Sci_Msg_Station_Id station_id1,
- Sci_Msg_Station_Id station_id2,
- bool hidden);
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * Get the value of mListOfStations
- * @return the value of mListOfStations
- */
- StationsList * getListOfStations ( );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void displayListOfStations ( ) const;
-
- void initAttributes ( ) ;
-
- void registerSystemSciMsg ( );
-
- Station * findStation ( const Sci_Msg_Station_Id station_id ) const;
-
- /**
- * @return mDebugger
- */
- const std::string getDebugger ( ) const;
-
- /**
- * @return a pointer to Network Clock Processor
- */
- INetworkClock * getNetworkClock ( ) const;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // SYSTEMMANAGER_H
diff --git a/cesar/maximus/system/inc/SystemManagerTest.h b/cesar/maximus/system/inc/SystemManagerTest.h
deleted file mode 100644
index 6e0a0f5788..0000000000
--- a/cesar/maximus/system/inc/SystemManagerTest.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-#ifndef SYSTEMMANAGERTEST_H
-#define SYSTEMMANAGERTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class SystemManager;
-class SciServer;
-class IFunctionCall;
-class IPhy;
-class IEthernet;
-class INetworkClock;
-
-
-class SystemManagerTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (SystemManagerTest);
- CPPUNIT_TEST (createStationTest);
- CPPUNIT_TEST (removeStationTest);
- CPPUNIT_TEST (areAllActiveStationsIdleTest);
- CPPUNIT_TEST (setNetworkClockTest);
- CPPUNIT_TEST (setStationNameTest);
- CPPUNIT_TEST (hideStationTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void createStationTest (void);
- void removeStationTest (void);
- void areAllActiveStationsIdleTest (void);
- void setNetworkClockTest (void);
- void setStationNameTest (void);
- void hideStationTest (void);
-
- private:
-
- SystemManager * mpSystemManager;
- SciServer * mpSciServer;
- IFunctionCall * mpFunctionCall;
- IPhy * mpPhy;
- IEthernet * mpEthernet;
- INetworkClock * mpNetworkClock;
-
-};
-
-
-#endif // SYSTEMMANAGERTEST_H
diff --git a/cesar/maximus/system/inc/SystemSciMsg.h b/cesar/maximus/system/inc/SystemSciMsg.h
deleted file mode 100644
index c525c12896..0000000000
--- a/cesar/maximus/system/inc/SystemSciMsg.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/************************************************************************
- SystemSciMsg.h - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.h
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/inc/SystemSciMsg.h
-**************************************************************************/
-
-#ifndef SYSTEMSCIMSG_H
-#define SYSTEMSCIMSG_H
-
-#include "SciMsg.h"
-
-#include "system_types.h"
-
-class ISystem;
-
-
-/**
- * class SystemSciMsg
- */
-
-class SystemSciMsg : public SciMsg
-{
-
-public:
-
- // public attributes
- //
-
-private:
-
- // private attributes
- //
-
- // For specialized SCI msg header
- //
- System_Type mSpecializedSciMsgType;
-
- // Specialized SCI msg header
- //
- System_Header mSpecializedSciMsgHeader;
-
- ISystem * mpSystemManager;
-
-protected:
-
- // protected attributes
- //
-
-public:
-
- // Constructors/Destructors
- //
-
- /**
- * Constructor
- */
- SystemSciMsg ( ISystem * p_system_manager );
-
- /**
- * Empty Destructor
- */
- virtual ~SystemSciMsg ( );
-
- // public methods
- //
-
- /**
- * @return SciMsg *
- */
- SciMsg * create ( ) const;
-
- /**
- * @return bool
- */
- bool dispatchMsg ( );
-
- /**
- * @return bool
- */
- bool identifySpecializedSciMsgHeader ( );
-
- /**
- * @return bool
- */
- bool checkCompatibility ( ) const;
-
- void displaySpecializedSciMsgHeader ( ) const;
-
- /**
- * Display the specialized SCI message type.
- */
- void displaySpecializedSciMsgType ( int log_level ) const;
-
- // public attribute accessor methods
- //
-
- // private attribute accessor methods
- //
-
- /**
- * @return mSpecializedSciMsgType
- */
- System_Type getSpecializedSciMsgType ( ) const;
-
- /**
- * @return bool
- * @param type the new value of mSpecializedSciMsgType
- */
- bool setSpecializedSciMsgType ( const System_Type type );
-
- /**
- * Get the value of mSpecializedSciMsgHeader
- * @return the value of mSpecializedSciMsgHeader into a void pointer
- */
- void * returnSpecializedSciMsgHeader ( ) const;
-
- /**
- * @return mSpecializedSciMsgHeader
- */
- const System_Header & getSpecializedSciMsgHeader ( ) const;
-
- /**
- * @return bool
- * @param specialized_sci_msg_header the new value of mSpecializedSciMsgHeader
- */
- bool setSpecializedSciMsgHeader ( const System_Header & specialized_sci_msg_header );
-
- // protected attribute accessor methods
- //
-
-private:
-
- // private methods
- //
-
- void initAttributes ( ) ;
-
-protected:
-
- // protected methods
- //
-
-};
-
-
-#endif // SYSTEMSCIMSG_H
diff --git a/cesar/maximus/system/inc/SystemSciMsgTest.h b/cesar/maximus/system/inc/SystemSciMsgTest.h
deleted file mode 100644
index 0a94179f3a..0000000000
--- a/cesar/maximus/system/inc/SystemSciMsgTest.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#ifndef SYSTEMSCIMSGTEST_H
-#define SYSTEMSCIMSGTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class SystemSciMsg;
-class SystemManager;
-class SciServer;
-
-
-class SystemSciMsgTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (SystemSciMsgTest);
- CPPUNIT_TEST (dispatchMsgTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void dispatchMsgTest (void);
-
-private:
-
- SystemSciMsg * mpSystemSciMsg;
- SystemManager * mpSystemManager;
- SciServer * mpSciServer;
-
-};
-
-
-#endif // SYSTEMSCIMSGTEST_H
diff --git a/cesar/maximus/system/src/Station.cpp b/cesar/maximus/system/src/Station.cpp
deleted file mode 100644
index d547c41ced..0000000000
--- a/cesar/maximus/system/src/Station.cpp
+++ /dev/null
@@ -1,628 +0,0 @@
-/************************************************************************
- Station.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/src/Station.cpp
-**************************************************************************/
-
-#include "Station.h"
-
-#include "StationConfiguration.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include "host/sci/maximus/inc/socket.h" // for 'STATION_SOCK'
-
-#include <sys/types.h> // for 'waitpid()'
-#include <sys/wait.h> // for 'waitpid()'
-#include <fcntl.h>
-#include <unistd.h> // for 'exec()' and 'system()'
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <errno.h>
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <cstdlib> // system
-using namespace std;
-
-extern bool UNITTEST;
-extern string stationTest;
-
-
-// Constructors/Destructors
-//
-
-
-Station::Station ( const string & station_executable, const Network_Clock_Tick current_tick_value, uint32_t seed ):
-mInputFileDescriptor(-1),
-mOutputFileDescriptor(-1),
-mLogPipe(-1),
-mPid(0),
-mStationStatus(MAXIMUS_STATION_STATUS_NONE),
-mStationIdleCounter(1), // once a station has been launched, Maximus has to wait for a system IDLE message
-mpStationConfiguration(NULL)
-{
- logFunction();
- string stationExecutable = station_executable;
-
- if (UNITTEST)
- {
- stationExecutable = stationTest;
- }
-
- mpStationConfiguration = new StationConfiguration (stationExecutable);
- if (NULL == mpStationConfiguration)
- {
- throw Error(__PRETTY_FUNCTION__ , "Station configuration pointer is NULL");
- }
-
- initAttributes();
-
- startProcess(current_tick_value, seed);
-}
-
-
-void Station::initAttributes ( )
-{
- logFunction();
-}
-
-
-Station::~Station ( )
-{
- logFunction();
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "delete station " \
- << getStationId() << " (0x" << setfill('0') << setw(4) << uppercase << hex << getStationId() << ")" << dec << endl;
-#endif /* CONFIG_LOG */
-
- stopProcess();
- if (NULL != mpStationConfiguration)
- {
- delete (mpStationConfiguration);
- mpStationConfiguration = NULL;
- }
- mHiddenStationsList.clear ();
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool Station::operator== ( const Station & station ) const
-{
- logFunction();
- bool bOperator = false;
-
- if ( (getStationStatus() == station.getStationStatus())
- && (getStationConfiguration() == station.getStationConfiguration())
- && (getInputFileDescriptor() == station.getInputFileDescriptor())
- && (getOutputFileDescriptor() == station.getOutputFileDescriptor())
- && (getLogFileDescriptor() == station.getLogFileDescriptor())
- && (getStationId () == station.getStationId ())
- && (getHiddenStationsList () == station.getHiddenStationsList ()))
- {
- bOperator = true;
- }
-
- return bOperator;
-}
-
-
-Station & Station::operator= ( const Station & station )
-{
- logFunction();
-
- if ( (!setInputFileDescriptor (station.getInputFileDescriptor()))
- || (!setOutputFileDescriptor (station.getOutputFileDescriptor()))
- || (!setLogFileDescriptor (station.getLogFileDescriptor()))
- || (!setStationStatus (station.getStationStatus()))
- || (!setStationConfiguration (station.getStationConfiguration ()))
- || (!setHiddenStationsList (station.getHiddenStationsList ())))
- {
- throw Error(__PRETTY_FUNCTION__ , "Error when setting attributes");
- }
-
- return *this;
-}
-
-
-void Station::displayStation ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "\t[input file descriptor = " << dec << getInputFileDescriptor() \
- << ", output file descriptor = " << getOutputFileDescriptor() \
- << ", log file descriptor = " << getLogFileDescriptor() \
- << ", process id = " << getStationId() << " (0x" << setfill('0') << setw(4) << uppercase << hex << getStationId() << ")" \
- << ", executable = " << getStationConfiguration()->getStationExecutable() \
- << ", name = " << getStationConfiguration ()->getStationName () << dec \
- << ", number of hidden stations = " << getHiddenStationsList ().size () << "]" << endl;
-#endif /* CONFIG_LOG */
-}
-
-
-bool Station::launchDebugger ( const string & command_line ) const
-{
- logFunction();
- bool bLaunch = false;
-
- string commandLine(command_line);
- size_t found = 0;
-
- do
- {
- found = commandLine.find("%n", found, 2);
- if (string::npos != found)
- {
- commandLine.replace(found, 2, getStationConfiguration()->getStationName());
- }
- }
- while (found != string::npos);
-
- found = 0;
- do
- {
- found = commandLine.find("%e", found, 2);
- if (string::npos != found)
- {
- commandLine.replace(found, 2, getStationConfiguration()->getStationExecutable());
- }
- }
- while (found != string::npos);
-
- found = 0;
- do
- {
- found = commandLine.find("%p", found, 2);
- if (string::npos != found)
- {
- char processId[6];
- sprintf(processId, "%d", getPid());
- commandLine.replace(found, 2, processId);
- }
- }
- while (found != string::npos);
-
-#if CONFIG_LOG
- clog << logger(LOG_INFO) << "debugger command line = " << commandLine << endl;
-#endif /* CONFIG_LOG */
-
- system(commandLine.c_str());
-
- return bLaunch;
-}
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-Sci_Msg_Station_Id Station::getStationId ( ) const
-{
- return static_cast<Sci_Msg_Station_Id>(mPid);
-}
-
-
-pid_t Station::getPid ( ) const
-{
- return mPid;
-}
-
-
-bool Station::setInputFileDescriptor ( const File_Descriptor input_file_descriptor )
-{
- mInputFileDescriptor = input_file_descriptor;
-
- return true;
-}
-
-
-bool Station::setOutputFileDescriptor ( const File_Descriptor output_file_descriptor )
-{
- mOutputFileDescriptor = output_file_descriptor;
-
- return true;
-}
-
-
-bool Station::setLogFileDescriptor ( const File_Descriptor log_file_descriptor )
-{
- mLogPipe = log_file_descriptor;
-
- return true;
-}
-
-
-File_Descriptor Station::getInputFileDescriptor ( ) const
-{
- return mInputFileDescriptor;
-}
-
-
-File_Descriptor Station::getOutputFileDescriptor ( ) const
-{
- return mOutputFileDescriptor;
-}
-
-
-File_Descriptor Station::getLogFileDescriptor ( ) const
-{
- return mLogPipe;
-}
-
-
-Station_Status Station::getStationStatus ( ) const
-{
- return mStationStatus;
-}
-
-
-bool Station::setStationStatus ( const Station_Status status )
-{
- mStationStatus = status;
-
- return true;
-}
-
-
-unsigned short int Station::getStationIdleCounter ( ) const
-{
- return mStationIdleCounter;
-}
-
-
-bool Station::incrementStationIdleCounter ( )
-{
- mStationIdleCounter++;
-
- return true;
-}
-
-
-bool Station::decrementStationIdleCounter ( )
-{
- logFunction();
- bool bDecrement = false;
-
- if (0 < mStationIdleCounter)
- {
- mStationIdleCounter--;
- bDecrement = true;
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_WARNING) << "station with id " << dec << getStationId() \
- << " (0x" << setfill('0') << setw(4) << uppercase << hex << getStationId() \
- << ") is already IDLE" << dec << endl;
-#endif /* CONFIG_LOG */
- }
-
- return bDecrement;
-}
-
-
-bool Station::setStationConfiguration ( StationConfiguration * p_station_configuration )
-{
- logFunction();
- bool bSetConfig = false;
-
- if (NULL != p_station_configuration)
- {
- mpStationConfiguration = p_station_configuration;
- bSetConfig = true;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__ , "Station configuration pointer is NULL", errno);
- }
-
- return bSetConfig;
-}
-
-
-StationConfiguration * Station::getStationConfiguration ( ) const
-{
- if (NULL == mpStationConfiguration)
- {
- throw Error(__PRETTY_FUNCTION__ , "Station configuration pointer is NULL");
- }
-
- return mpStationConfiguration;
-}
-
-
-bool Station::setStationName ( const std::string & station_name )
-{
- return getStationConfiguration()->setStationName(station_name);
-}
-
-
-bool Station::setHiddenStationsList (const HiddenStationsList & hidden_stations_list)
-{
- mHiddenStationsList = hidden_stations_list;
- return true;
-}
-
-
-bool Station::hideStation (Sci_Msg_Station_Id station_id, bool hidden)
-{
- logFunction ();
-
- if (hidden)
- {
- if (mHiddenStationsList.max_size () > mHiddenStationsList.size ())
- {
-#if CONFIG_LOG
- clog << logger (LOG_INFO) << "Station " << station_id << " hidden from station " << getStationId () << endl;
-#endif /* CONFIG_LOG */
- mHiddenStationsList.insert (station_id);
- }
- else
- return false;
- }
- else
- {
- mHiddenStationsList.erase (station_id);
-#if CONFIG_LOG
- clog << logger (LOG_INFO) << "Station " << station_id << " visible from station " << getStationId () << endl;
-#endif /* CONFIG_LOG */
- }
-
- return true;
-}
-
-
-// private methods
-//
-
-
-void Station::startProcess ( const Network_Clock_Tick current_tick_value, uint32_t seed )
-{
- logFunction();
-
- // Start the station process
- //
- if(getStationConfiguration()->getStationExecutable().empty())
- {
- throw Error(__PRETTY_FUNCTION__, "Executable not set", errno);
- }
- if(0 == (mPid = fork()))
- {
- char stationExecutable[getStationConfiguration()->getStationExecutable().size()+1];
- size_t stringLength = getStationConfiguration()->getStationExecutable().copy(stationExecutable, getStationConfiguration()->getStationExecutable().size());
- stationExecutable[stringLength] = '\0';
-
- char currentTickValue[32];
- sprintf(currentTickValue, "%llu", current_tick_value);
-
- // optional argument
- char * pSeed = NULL;
- if (0 != seed)
- {
- pSeed = new char[16];
- sprintf(pSeed, "%u", seed);
- }
-
- int ret = execlp(stationExecutable, stationExecutable, currentTickValue, pSeed, NULL);
-
- // if seed has been set, delete it
- if (NULL != pSeed)
- {
- delete [] pSeed;
- pSeed = NULL;
- }
-
- // handle errors of 'execlp()'
- if (-1 == ret)
- {
- Error(__PRETTY_FUNCTION__, "Cannot launch station executable", errno).display();
- }
-
- exit(127);
- }
- if (mPid == -1)
- {
- throw Error(__PRETTY_FUNCTION__, "Cannot fork", errno);
- }
-
- // Loop until pipe creation: max = STATION_WAIT_LOOP_NB * STATION_WAIT_TIMEOUT_MS ms
- //
- int loop;
- int fd_status;
- char nameBuffer[256];
-
- #ifdef STATION_SOCK
-
- struct sockaddr_un sockaddr;
- int bufsize = STATION_MAX_SOCK_BUFFER_SIZE;
- sprintf(nameBuffer, "%s/%s_sock_%d", STATION_SOCK_PATH, STATION_SOCK_PREFIX, getPid());
- // open the socket
- if((mInputFileDescriptor = socket (PF_UNIX, SOCK_STREAM, 0)) < 0)
- {
- throw Error(__FUNCTION__ , "Cannot create socket", errno);
- }
-
- // avoid other stations to inherit the socket
- fd_status = fcntl(mInputFileDescriptor, F_GETFD);
- fcntl(mInputFileDescriptor, F_SETFD, fd_status | FD_CLOEXEC);
-
- // extend send buffer size
- if(setsockopt (mInputFileDescriptor, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize)) < 0)
- {
- throw Error(__FUNCTION__ , "Cannot increase buffer size", errno);
- }
- sockaddr.sun_family = AF_UNIX;
- strcpy (sockaddr.sun_path, nameBuffer);
-
- for(loop = 0; loop < STATION_WAIT_LOOP_NB; loop++)
- {
- // Connect to server
- //
- if((connect(mInputFileDescriptor, (struct sockaddr *)&sockaddr, sizeof(sockaddr))) >= 0)
- {
- break;
- }
- usleep(STATION_WAIT_TIMEOUT_MS * 1000);
- }
-
- if(loop >= STATION_WAIT_LOOP_NB)
- {
- stopProcess();
- throw Error(__FUNCTION__ , "Cannot connect to station", errno);
- }
- else
- {
- setOutputFileDescriptor(mInputFileDescriptor);
- }
-
- #else /* !STATION_SOCK */
-
- // Open input pipe
- sprintf(nameBuffer, "%s/%s_out_%d", STATION_PIPE_PATH, STATION_PIPE_PREFIX, getPid());
- for(loop = 0; loop < STATION_WAIT_LOOP_NB; loop++)
- {
- // Connect to server
- //
- if((mInputFileDescriptor = open(nameBuffer, O_RDONLY | O_NONBLOCK)) >= 0)
- {
- break;
- }
- usleep(STATION_WAIT_TIMEOUT_MS * 1000);
- }
- if(loop >= STATION_WAIT_LOOP_NB)
- {
- stopProcess();
- throw Error(__FUNCTION__ , "Cannot connect to station", errno);
- }
-
- // avoid other stations to inherit the pipe
- fd_status = fcntl(mInputFileDescriptor, F_GETFD);
- fcntl(mInputFileDescriptor, F_SETFD, fd_status | FD_CLOEXEC);
-
- // Open output pipe
- sprintf(nameBuffer, "%s/%s_in_%d", STATION_PIPE_PATH, STATION_PIPE_PREFIX, getPid());
- if((mOutputFileDescriptor = open(nameBuffer, O_WRONLY | O_NONBLOCK)) < 0)
- {
- stopProcess();
- throw Error(__PRETTY_FUNCTION__, "Cannot open output pipe", errno);
- }
- // avoid other stations to inherit the pipe
- fd_status = fcntl(mOutputFileDescriptor, F_GETFD);
- fcntl(mOutputFileDescriptor, F_SETFD, fd_status | FD_CLOEXEC);
-
- #endif /* STATION_SOCK */
-
- // Open log pipe
- //
- sprintf(nameBuffer, "%s/%s_log_%d", STATION_PIPE_PATH, STATION_PIPE_PREFIX, getPid());
- if((mLogPipe = open(nameBuffer, O_RDONLY | O_NONBLOCK)) < 0)
- {
- stopProcess();
- throw Error(__PRETTY_FUNCTION__, "Cannot open log pipe", errno);
- }
-
- // avoid other stations to inherit the pipe
- fd_status = fcntl(mLogPipe, F_GETFD);
- fcntl(mLogPipe, F_SETFD, fd_status | FD_CLOEXEC);
-}
-
-
-void Station::stopProcess ( )
-{
- logFunction();
- if(mInputFileDescriptor >= 0)
- {
- close(mInputFileDescriptor);
- }
- if(mOutputFileDescriptor >= 0)
- {
- close(mOutputFileDescriptor);
- }
- if(mLogPipe >= 0)
- {
- close(mLogPipe);
- }
- if(mPid > 0)
- {
- kill(mPid, SIGTERM);
- waitpid(mPid, NULL, 0);
- }
-}
-
-
-void Station::displayStationStatus ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- switch (getStationStatus())
- {
- case 0:
- clog << logger(LOG_INFO) << "MAXIMUS_STATION_STATUS_NONE" << endl;
- break;
- case 1:
- clog << logger(LOG_INFO) << "MAXIMUS_STATION_STATUS_IDLE" << endl;
- break;
- case 2:
- clog << logger(LOG_INFO) << "MAXIMUS_STATION_STATUS_BUSY" << endl;
- break;
- case 3:
- clog << logger(LOG_INFO) << "MAXIMUS_STATION_STATUS_DEACTIVATED" << endl;
- break;
- default:
- clog << logger(LOG_INFO) << "unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// protected methods
-//
-
diff --git a/cesar/maximus/system/src/StationConfiguration.cpp b/cesar/maximus/system/src/StationConfiguration.cpp
deleted file mode 100644
index 27d907dc15..0000000000
--- a/cesar/maximus/system/src/StationConfiguration.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/************************************************************************
- StationConfiguration.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/src/StationConfiguration.cpp
-**************************************************************************/
-
-#include "StationConfiguration.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-StationConfiguration::StationConfiguration ( string & station_executable, string station_name )
-{
- logFunction();
-
- if ( !setStationExecutable(station_executable) || !setStationName(station_name) )
- {
- throw Error(__PRETTY_FUNCTION__, "Error during initialization");
- }
- initAttributes();
-}
-
-
-void StationConfiguration::initAttributes ( )
-{
- logFunction();
-}
-
-
-StationConfiguration::~StationConfiguration ( )
-{
- logFunction();
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-bool StationConfiguration::setStationExecutable ( const string & station_executable )
-{
- if (station_executable.empty())
- {
- throw Error(__PRETTY_FUNCTION__, "Station executable is an empty string");
- }
- else
- {
- mStationExecutable = station_executable;
- }
-
- return true;
-}
-
-
-const string & StationConfiguration::getStationExecutable ( ) const
-{
- if (mStationExecutable.empty())
- {
- throw Error(__PRETTY_FUNCTION__, "Station executable is an empty string");
- }
- return mStationExecutable;
-}
-
-
-bool StationConfiguration::setStationName ( const string & station_name )
-{
- mStationName = station_name;
-
- return true;
-}
-
-
-const string & StationConfiguration::getStationName ( ) const
-{
- return mStationName;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/system/src/StationConfigurationTest.cpp b/cesar/maximus/system/src/StationConfigurationTest.cpp
deleted file mode 100644
index 00c982d20e..0000000000
--- a/cesar/maximus/system/src/StationConfigurationTest.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-
-#include "StationConfigurationTest.h"
-
-#include "StationConfiguration.h"
-
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (StationConfigurationTest);
-
-
-void StationConfigurationTest::setUp (void)
-{
- logTest();
-
- string station_executable = "../stationtest/obj/stationtest.elf";
- mpStationConfiguration = new StationConfiguration (station_executable);
-}
-
-
-void StationConfigurationTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpStationConfiguration)
- {
- delete mpStationConfiguration;
- mpStationConfiguration = NULL;
- }
-}
-
-
-void StationConfigurationTest::setStationNameTest (void)
-{
- logTest();
-
- if (NULL == mpStationConfiguration)
- {
- CPPUNIT_FAIL ( "The initialized StationConfiguration pointer is NULL" );
- }
- else
- {
- string stationName = "This is my station name";
-
- CPPUNIT_ASSERT_MESSAGE ( "setStationName failed",
- mpStationConfiguration->setStationName(stationName) );
- }
-}
-
diff --git a/cesar/maximus/system/src/StationTest.cpp b/cesar/maximus/system/src/StationTest.cpp
deleted file mode 100644
index cfa5234ec6..0000000000
--- a/cesar/maximus/system/src/StationTest.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-
-#include "StationTest.h"
-
-#include "Station.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-#include <string>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (StationTest);
-
-
-void StationTest::setUp (void)
-{
- logTest();
-
- try
- {
- mpStation = NULL;
- string stationExecutable;
- mpStation = new Station(stationExecutable, 0);
- }
- catch ( Error &e )
- {
- e.display();
- }
-}
-
-
-void StationTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpStation)
- {
- delete (mpStation);
- mpStation = NULL;
- }
-}
-
-
-void StationTest::setStationNameTest (void)
-{
- logTest();
-
- if (NULL == mpStation)
- {
- CPPUNIT_FAIL ( "The initialized Station pointer is NULL" );
- }
- else
- {
- string stationName = "This is my station name";
-
- CPPUNIT_ASSERT_MESSAGE ( "setStationName failed",
- mpStation->setStationName(stationName) );
- }
-}
-
-
-void StationTest::setHiddenStationsListTest (void)
-{
- logTest ();
-
- HiddenStationsList hiddenStationsList;
- /* set some initial values: 10 20 30 40 50 */
- for (int i = 1; i <= 5; i++)
- hiddenStationsList.insert (i*10);
-
- CPPUNIT_ASSERT_MESSAGE ("setHiddenStationsList failed",
- mpStation->setHiddenStationsList (hiddenStationsList));
- CPPUNIT_ASSERT_MESSAGE ("getHiddenStationsList failed",
- hiddenStationsList == mpStation->getHiddenStationsList ());
-}
-
-
-void StationTest::hideStationTest (void)
-{
- logTest ();
-
- /* hide a station */
- Sci_Msg_Station_Id stationId = 111;
- CPPUNIT_ASSERT_MESSAGE ("hideStation TRUE failed",
- mpStation->hideStation (stationId, true));
- set<Sci_Msg_Station_Id>::iterator it = mpStation->getHiddenStationsList ().find (stationId);
- CPPUNIT_ASSERT_MESSAGE ("hideStation failed", *it == stationId);
-
- /* make the station visible */
- CPPUNIT_ASSERT_MESSAGE ("hideStation FALSE failed",
- mpStation->hideStation (stationId, false)
- && mpStation->getHiddenStationsList ().empty ());
-}
-
diff --git a/cesar/maximus/system/src/SystemManager.cpp b/cesar/maximus/system/src/SystemManager.cpp
deleted file mode 100644
index b69180adfb..0000000000
--- a/cesar/maximus/system/src/SystemManager.cpp
+++ /dev/null
@@ -1,575 +0,0 @@
-/************************************************************************
- SystemManager.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/src/SystemManager.cpp
-**************************************************************************/
-
-#include "SystemManager.h"
-
-#include "Station.h"
-#include "ISci.h"
-#include "SystemSciMsg.h"
-#include "INetworkClock.h"
-
-#include "sci_types.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-SystemManager::SystemManager ( ISci * p_sci_server ):
-mpSciServer(NULL),
-mpNetworkClock(NULL)
-{
- logFunction();
-
- if (NULL != p_sci_server)
- {
- mpSciServer = p_sci_server;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL", errno);
- }
- initAttributes();
-}
-
-
-void SystemManager::initAttributes ( )
-{
- logFunction();
-
- if (NULL != mpSciServer)
- {
- if ( (!mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_SYSTEM, new SystemSciMsg(this)))
- || (!mpSciServer->setStationsList(&mListOfStations)) )
- {
- throw Error(__PRETTY_FUNCTION__, "Error when initializing SCI server");
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
-}
-
-
-SystemManager::~SystemManager ( )
-{
- logFunction();
-
- removeAllStations();
- if (NULL != mpSciServer)
- {
- mpSciServer = NULL;
- }
- if (NULL != mpNetworkClock)
- {
- mpNetworkClock = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-bool SystemManager::init ( const string & station_executable, const string & debugger )
-{
- logFunction();
-
- mDefaultStationExecutable = station_executable;
- mDebugger = debugger;
-
- return true;
-}
-
-
-Sci_Msg_Station_Id SystemManager::createStation ( const string & station_executable, uint32_t seed )
-{
- logFunction();
- Sci_Msg_Station_Id stationId = 0;
-
- Station * createdStation = new Station(station_executable, getNetworkClock()->getCurrentTickValue(), seed);
-
- if (NULL != createdStation)
- {
- mListOfStations.push_back(createdStation);
- stationId = createdStation->getStationId();
- createdStation = NULL;
- }
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "create station " \
- << stationId << " (0x" << setfill('0') << setw(4) << uppercase << hex << stationId << ")" << dec << endl;
-#endif /* CONFIG_LOG */
-
- displayListOfStations();
-
- return stationId;
-}
-
-
-bool SystemManager::receiveIdleMsg ( const SystemSciMsg & system_sci_msg ) const
-{
- bool bReceive = false;
-
- Station * pStation = findStation(system_sci_msg.getSciMsgStationId());
- if (NULL != pStation)
- {
- pStation->decrementStationIdleCounter();
- if ( (0 == pStation->getStationIdleCounter())
- && (MAXIMUS_STATION_STATUS_DEACTIVATED != pStation->getStationStatus()) )
- {
- pStation->setStationStatus(MAXIMUS_STATION_STATUS_IDLE);
- }
- bReceive = true;
- }
- pStation = NULL;
-
- return bReceive;
-}
-
-
-bool SystemManager::removeStation ( const Sci_Msg_Station_Id station_id )
-{
- logFunction();
- bool bRemove = false;
-
- if (!mListOfStations.empty())
- {
- for (StationsList::iterator it = mListOfStations.begin(); it != mListOfStations.end(); ++it)
- {
- StationsList::iterator pos = it;
- Station * pStation = *pos;
- if ( (NULL != pStation) && (station_id == pStation->getStationId()) )
- {
- delete(pStation);
- mListOfStations.erase(pos);
- bRemove = true;
- break;
- }
- }
- }
- displayListOfStations();
-
- // Remove events that should be sent to the removed station
- getNetworkClock()->removeEvts(station_id);
-
- return bRemove;
-}
-
-
-bool SystemManager::isStationIdle ( Sci_Msg_Station_Id station_id ) const
-{
- logFunction();
- bool bIdle = false;
-
- Station * pStation = findStation(station_id);
- if ( (NULL != pStation) && (MAXIMUS_STATION_STATUS_IDLE == pStation->getStationStatus()) )
- {
- bIdle = true;
- }
- pStation = NULL;
-
- return bIdle;
-}
-
-
-bool SystemManager::areAllActiveStationsIdle ( ) const
-{
- logFunction();
- bool bIdle = true;
-
- if (!mListOfStations.empty())
- {
- for (StationsList::const_iterator it = mListOfStations.begin(); it != mListOfStations.end(); ++it)
- {
- if (NULL != *it)
- {
- if ( (MAXIMUS_STATION_STATUS_DEACTIVATED != (*it)->getStationStatus())
- && (MAXIMUS_STATION_STATUS_IDLE != (*it)->getStationStatus()) )
- {
- bIdle = false;
- it = mListOfStations.end();
- --it;
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "Station pointer is NULL");
- }
- }
- }
-
- return bIdle;
-}
-
-
-bool SystemManager::deactivateStation ( const Sci_Msg_Station_Id station_id )
-{
- logFunction();
- bool bDeactivate = false;
-
- Station * pStation = findStation(station_id);
- if (NULL != pStation)
- {
- bDeactivate = pStation->setStationStatus(MAXIMUS_STATION_STATUS_DEACTIVATED);
- }
- pStation = NULL;
-
- return bDeactivate;
-}
-
-
-bool SystemManager::activateStation ( const Sci_Msg_Station_Id station_id )
-{
- logFunction();
- bool bActivate = false;
-
- Station * pStation = findStation(station_id);
- if (NULL != pStation)
- {
- bActivate = pStation->setStationStatus(MAXIMUS_STATION_STATUS_IDLE);
- }
- pStation = NULL;
-
- return bActivate;
-}
-
-
-bool SystemManager::debugStation ( const Sci_Msg_Station_Id station_id )
-{
- logFunction();
- bool bDebug = false;
-
- Station * pStation = findStation(station_id);
- if (NULL != pStation)
- {
- bDebug = pStation->launchDebugger(getDebugger());
- }
- pStation = NULL;
-
- return bDebug;
-}
-
-
-Station_Status SystemManager::getStationStatus ( const Sci_Msg_Station_Id station_id ) const
-{
- logFunction();
- Station_Status status = MAXIMUS_STATION_STATUS_NONE;
-
- Station * pStation = findStation(station_id);
- if (NULL != pStation)
- {
- status = pStation->getStationStatus();
- }
-
- return status;
-}
-
-
-bool SystemManager::updateStationStatus ( const Sci_Msg_Station_Id station_id, const Station_Status new_status )
-{
- logFunction();
- bool bSetIdle = false;
-
- Station * pStation = findStation(station_id);
- if (NULL != pStation)
- {
- bSetIdle = pStation->setStationStatus(new_status);
- }
-
- return bSetIdle;
-}
-
-
-bool SystemManager::removeAllStations ( )
-{
- logFunction();
- bool bRemove = false;
- unsigned short int nbOfStations = 0;
-
- if (!mListOfStations.empty())
- {
- for (StationsList::const_iterator it = mListOfStations.begin(); it != mListOfStations.end(); ++it)
- {
- if (NULL != *it)
- {
- delete (*it);
- nbOfStations++;
- }
- }
- mListOfStations.clear();
- }
- if (mListOfStations.empty())
- {
- bRemove = true;
-#if CONFIG_LOG
- clog << logger(LOG_COM) << "delete " << nbOfStations << " station(s)" << endl;
-#endif /* CONFIG_LOG */
- }
-
- return bRemove;
-}
-
-
-bool SystemManager::setNetworkClock ( INetworkClock * p_network_clock )
-{
- if (NULL == p_network_clock)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Network Clock pointer is NULL", errno);
- }
- mpNetworkClock = p_network_clock;
-
- return true;
-}
-
-
-const string & SystemManager::getDefaultStationExecutable ( ) const
-{
- return mDefaultStationExecutable;
-}
-
-
-bool SystemManager::setStationName ( const Sci_Msg_Station_Id station_id, const std::string & station_name )
-{
- logFunction();
- bool bSetName = false;
-
- Station * pStation = findStation(station_id);
- if (NULL != pStation)
- {
- bSetName = pStation->setStationName(station_name);
- }
-
- /* Send a System SCI message to the station to configure its name. */
-
- SystemSciMsg systemSciMsg(this);
-
- // Fill specialized SCI msg data length and specialized SCI msg data
- //
- bSetName &= systemSciMsg.setSpecializedSciMsgDataLength(station_name.length() + 1);
- bSetName &= systemSciMsg.setSpecializedSciMsgData((unsigned char *)station_name.c_str());
-
- // Fill specialized SCI msg header
- //
- struct System_Header header = { SYSTEM_VERSION,
- SYSTEM_TYPE_STATION_NAME,
- 0x0000 }; // flags
-
- // Set specialized SCI msg header
- //
- bSetName &= systemSciMsg.setSpecializedSciMsgHeader(header);
-
- // Fill specialized SCI msg attributes:
- // - header size
- //
- bSetName &= systemSciMsg.setSpecializedSciMsgHeaderSize(sizeof(struct System_Header));
-
- // Fill SCI msg attributes:
- // - type
- // - station ID
- //
- bSetName &= systemSciMsg.setSciMsgType(SCI_MSG_TYPE_SYSTEM);
- bSetName &= systemSciMsg.setSciMsgStationId(station_id);
-
- if (bSetName)
- {
- if (NULL != mpSciServer)
- {
- bSetName = mpSciServer->fillSciMsg(systemSciMsg);
- bSetName &= mpSciServer->sendSciMsg(systemSciMsg);
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "system SCI message cannot be sent because it is not correctly filled in!" << endl;
-#endif /* CONFIG_LOG */
- }
-
- return bSetName;
-}
-
-
-bool SystemManager::hideStation (Sci_Msg_Station_Id station_id1,
- Sci_Msg_Station_Id station_id2,
- bool hidden)
-{
- logFunction ();
- bool bHide = false;
-
- Station *pStation1 = findStation (station_id1);
- Station *pStation2 = findStation (station_id2);
- if ((NULL != pStation1) && (NULL != pStation2))
- {
- bHide = pStation1->hideStation (station_id2, hidden);
- bHide &= pStation2->hideStation (station_id1, hidden);
- }
-
- return bHide;
-}
-
-
-// private methods
-//
-
-
-void SystemManager::displayListOfStations ( ) const
-{
-#if CONFIG_LOG
- logFunction();
- clog << logger(LOG_INFO) << "list of stations = " << endl;
-
- if (!mListOfStations.empty())
- {
- for (StationsList::const_iterator it = mListOfStations.begin(); it != mListOfStations.end(); ++it)
- {
- if (NULL != *it)
- {
- const_cast<Station *>(*it)->displayStation();
- }
- }
- }
- else
- {
- clog << logger(LOG_INFO) << "\tempty!" << endl;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-void SystemManager::registerSystemSciMsg ( )
-{
- logFunction();
-
- if (NULL != mpSciServer)
- {
- mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_SYSTEM, new SystemSciMsg(this));
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI server pointer is NULL");
- }
-}
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-StationsList * SystemManager::getListOfStations ( )
-{
- return &mListOfStations;
-}
-
-
-Station * SystemManager::findStation ( const Sci_Msg_Station_Id station_id ) const
-{
- logFunction();
- Station * pStation = NULL;
-
- if (!mListOfStations.empty())
- {
- for (StationsList::const_iterator it = mListOfStations.begin(); it != mListOfStations.end(); ++it)
- {
- if ( (NULL != *it) && (station_id == (*it)->getStationId()) )
- {
- pStation = *it;
- it = mListOfStations.end();
- --it;
- }
- }
- }
- if (NULL == pStation)
- {
-#if CONFIG_LOG
- clog << logger(LOG_FATAL) << "station with id " << dec << station_id << " (0x" << setfill('0') << setw(4) << uppercase << hex << station_id << ") does not exist" << dec << endl;
-#endif /* CONFIG_LOG */
- errno = ENONET;
- throw Error(__PRETTY_FUNCTION__, "Station does not exist", errno);
- }
-
- return pStation;
-}
-
-
-const string SystemManager::getDebugger ( ) const
-{
- return mDebugger;
-}
-
-
-INetworkClock * SystemManager::getNetworkClock ( ) const
-{
- if (NULL == mpNetworkClock)
- {
- throw Error(__PRETTY_FUNCTION__, "Network Clock pointer is NULL");
- }
-
- return mpNetworkClock;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/system/src/SystemManagerTest.cpp b/cesar/maximus/system/src/SystemManagerTest.cpp
deleted file mode 100644
index 70fe94b206..0000000000
--- a/cesar/maximus/system/src/SystemManagerTest.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-
-#include "SystemManagerTest.h"
-
-#include "SystemManager.h"
-#include "SciServer.h"
-#include "PhyProcessor.h"
-#include "NetworkClockProcessor.h"
-#include "FunctionCallManager.h"
-#include "EthernetProcessor.h"
-#include "Station.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (SystemManagerTest);
-
-
-void SystemManagerTest::setUp (void)
-{
- logTest();
-
- mpSciServer = new SciServer ();
- mpSystemManager = new SystemManager (mpSciServer);
-
- mpFunctionCall = new FunctionCallManager (mpSciServer);
- mpPhy = new PhyProcessor (mpSciServer);
- mpEthernet = new EthernetProcessor (mpSciServer);
- mpNetworkClock = new NetworkClockProcessor (mpSciServer, mpSystemManager, mpFunctionCall, mpPhy, mpEthernet);
- mpSystemManager->setNetworkClock(mpNetworkClock);
-}
-
-
-void SystemManagerTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpSystemManager)
- {
- delete mpSystemManager;
- mpSystemManager = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete mpSciServer;
- mpSciServer = NULL;
- }
- if (NULL != mpFunctionCall)
- {
- delete mpFunctionCall;
- mpFunctionCall = NULL;
- }
- if (NULL != mpPhy)
- {
- delete mpPhy;
- mpPhy = NULL;
- }
- if (NULL != mpEthernet)
- {
- delete mpEthernet;
- mpEthernet = NULL;
- }
- if (NULL != mpNetworkClock)
- {
- delete mpNetworkClock;
- mpNetworkClock = NULL;
- }
-}
-
-
-void SystemManagerTest::createStationTest (void)
-{
- logTest();
-
- try
- {
- Sci_Msg_Station_Id stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable()); // will be deleted in 'tearDown()'
- CPPUNIT_ASSERT_MESSAGE ( "createStation failed",
- 0 != stationId );
-
- // Test to launch a station with a seed
- stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable(), 10); // will be deleted in 'tearDown()'
- CPPUNIT_ASSERT_MESSAGE ( "createStation failed",
- 0 != stationId );
- }
- catch ( Error &e )
- {
- e.display();
- }
-}
-
-
-void SystemManagerTest::removeStationTest (void)
-{
- logTest();
-
- try
- {
- // Create Station 1
- //
- Sci_Msg_Station_Id stationId1 = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- // Create Station 2
- //
- Sci_Msg_Station_Id stationId2 = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- // Create Station 3
- //
- Sci_Msg_Station_Id stationId3 = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- INetworkClock * pNetworkClock = new NetworkClockProcessor();
- mpSystemManager->setNetworkClock(pNetworkClock);
-
- CPPUNIT_ASSERT_MESSAGE ( "removeStation failed",
- mpSystemManager->removeStation (stationId2) );
-
- CPPUNIT_ASSERT_MESSAGE ( "removeStation failed",
- mpSystemManager->removeStation (stationId1) );
-
- CPPUNIT_ASSERT_MESSAGE ( "removeStation failed",
- mpSystemManager->removeStation (stationId3) );
-
- if (NULL != pNetworkClock)
- {
- delete (pNetworkClock);
- pNetworkClock = NULL;
- }
- }
- catch ( Error &e )
- {
- e.display();
- }
-}
-
-
-void SystemManagerTest::areAllActiveStationsIdleTest (void)
-{
- logTest();
-
- try
- {
- // Create Station 1
- //
- mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- // Create Station 2
- //
- mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- // Create Station 3
- //
- mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- CPPUNIT_ASSERT_MESSAGE ( "areAllActiveStationsIdle failed",
- !mpSystemManager->areAllActiveStationsIdle() );
-
- CPPUNIT_ASSERT_MESSAGE ( "removeAllStations failed",
- mpSystemManager->removeAllStations() );
- }
- catch ( Error &e )
- {
- e.display();
- }
-}
-
-
-void SystemManagerTest::setNetworkClockTest (void)
-{
- logTest();
-
- INetworkClock * pNetworkClock = new NetworkClockProcessor();
-
- CPPUNIT_ASSERT_MESSAGE ( "setNetworkClock failed",
- mpSystemManager->setNetworkClock(pNetworkClock) );
-
- if (NULL != pNetworkClock)
- {
- delete (pNetworkClock);
- pNetworkClock = NULL;
- }
-}
-
-
-void SystemManagerTest::setStationNameTest (void)
-{
- logTest();
-
- if (NULL == mpSystemManager)
- {
- CPPUNIT_FAIL ( "The initialized System Manager pointer is NULL" );
- }
- else
- {
- string stationName = "This is my station name";
-
- Sci_Msg_Station_Id stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
- mpSystemManager->updateStationStatus(stationId, MAXIMUS_STATION_STATUS_IDLE);
- NetworkClockProcessor networkClock;
- mpSystemManager->setNetworkClock((INetworkClock *)&networkClock);
-
- CPPUNIT_ASSERT_MESSAGE ( "setStationName failed",
- mpSystemManager->setStationName(stationId, stationName) );
-
- mpSystemManager->removeStation(stationId);
- }
-}
-
-
-void SystemManagerTest::hideStationTest (void)
-{
- logTest ();
-
- try
- {
- /* create 3 stations */
- Sci_Msg_Station_Id stationId1 = mpSystemManager->createStation \
- (mpSystemManager->getDefaultStationExecutable ());
- Sci_Msg_Station_Id stationId2 = mpSystemManager->createStation \
- (mpSystemManager->getDefaultStationExecutable ());
- Sci_Msg_Station_Id stationId3 = mpSystemManager->createStation \
- (mpSystemManager->getDefaultStationExecutable ());
-
- /* hide station 1 from stations 2 and 3 and vice versa */
- CPPUNIT_ASSERT_MESSAGE ("hideStation failed",
- mpSystemManager->hideStation \
- (stationId1, stationId2, true)
- && mpSystemManager->hideStation \
- (stationId1, stationId3, true));
-
- /* retrieve stations 1, 2, 3 */
- Station *pStation1 = NULL, *pStation2 = NULL, *pStation3 = NULL;
- for (StationsList::const_iterator it = mpSystemManager->getListOfStations ()->begin ();
- it != mpSystemManager->getListOfStations ()->end (); ++it)
- {
- if (NULL != *it)
- {
- Sci_Msg_Station_Id id = (*it)->getStationId ();
- if (stationId1 == id)
- pStation1 = *it;
- else if (stationId2 == id)
- pStation2 = *it;
- else if (stationId3 == id)
- pStation3 = *it;
- }
- }
- CPPUNIT_ASSERT_MESSAGE ("Cannot retrieve stations",
- (pStation1 != NULL)
- && (pStation2 != NULL)
- && (pStation3 != NULL));
-
- set<Sci_Msg_Station_Id>::iterator it1, it2, it3;
- /* check that stations 2 and 3 are hidden from station 1 */
- it2 = pStation1->getHiddenStationsList ().find (stationId2);
- it3 = pStation1->getHiddenStationsList ().find (stationId3);
- CPPUNIT_ASSERT_MESSAGE ("hideStation 2 from 1 failed", *it2 == stationId2);
- CPPUNIT_ASSERT_MESSAGE ("hideStation 3 from 1 failed", *it3 == stationId3);
- /* check that station 1 is hidden from station 2 */
- it1 = pStation2->getHiddenStationsList ().find (stationId1);
- CPPUNIT_ASSERT_MESSAGE ("hideStation 1 from 2 failed", *it1 == stationId1);
- /* check that station 1 is hidden from station 3 */
- it1 = pStation3->getHiddenStationsList ().find (stationId1);
- CPPUNIT_ASSERT_MESSAGE ("hideStation 1 from 3 failed", *it1 == stationId1);
-
- /* clean */
- mpSystemManager->removeAllStations ();
- }
- catch (Error &e)
- {
- e.display ();
- }
-}
-
diff --git a/cesar/maximus/system/src/SystemSciMsg.cpp b/cesar/maximus/system/src/SystemSciMsg.cpp
deleted file mode 100644
index b2c5181c9a..0000000000
--- a/cesar/maximus/system/src/SystemSciMsg.cpp
+++ /dev/null
@@ -1,291 +0,0 @@
-/************************************************************************
- SystemSciMsg.cpp - Copyright buret
-
-Here you can write a license for your code, some comments or any other
-information you want to have in your generated code. To to this simply
-configure the "headings" directory in uml to point to a directory
-where you have your heading files.
-
-or you can just replace the contents of this file with your own.
-If you want to do this, this file is located at
-
-/usr/share/apps/umbrello/headings/heading.cpp
-
--->Code Generators searches for heading files based on the file extension
- i.e. it will look for a file name ending in ".h" to include in C++ header
- files, and for a file name ending in ".java" to include in all generated
- java code.
- If you name the file "heading.<extension>", Code Generator will always
- choose this file even if there are other files with the same extension in the
- directory. If you name the file something else, it must be the only one with that
- extension in the directory to guarantee that Code Generator will choose it.
-
-you can use variables in your heading files which are replaced at generation
-time. possible variables are : author, date, time, filename and filepath.
-just write %variable_name%
-
-This file was generated on %date% at %time%
-The original location of this file is /home/buret/eclipse/maximus/system/src/SystemSciMsg.cpp
-**************************************************************************/
-
-#include "SystemSciMsg.h"
-
-#include "ISystem.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iomanip> // for 'setfill()' and 'setw()'
-#include <netinet/in.h> // for 'ntohl()' and 'ntohs()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-
-// Constructors/Destructors
-//
-
-
-SystemSciMsg::SystemSciMsg ( ISystem * p_system_manager ):
-mSpecializedSciMsgType(SYSTEM_TYPE_NONE),
-mpSystemManager(NULL)
-{
- logFunction();
-
- initAttributes ();
- if (NULL != p_system_manager)
- {
- mpSystemManager = p_system_manager;
- }
- else
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "System manager pointer is NULL", errno);
- }
-}
-
-
-void SystemSciMsg::initAttributes ( )
-{
- logFunction();
-
- mSpecializedSciMsgHeader.version = 0x00;
- mSpecializedSciMsgHeader.type = 0x00;
- mSpecializedSciMsgHeader.flags = 0x0000;
-}
-
-
-SystemSciMsg::~SystemSciMsg ( )
-{
- logFunction();
-
- if (NULL != mpSystemManager)
- {
- mpSystemManager = NULL;
- }
-}
-
-
-//
-// Methods
-//
-
-
-// Other methods
-//
-
-
-// public methods
-//
-
-
-SciMsg * SystemSciMsg::create ( ) const
-{
- logFunction();
-
- return new SystemSciMsg (mpSystemManager);
-}
-
-
-bool SystemSciMsg::dispatchMsg ( )
-{
- logFunction();
- bool bDispatch = false;
-
- if (NULL != mpSystemManager)
- {
- if ( SYSTEM_TYPE_IDLE == getSpecializedSciMsgType() )
- {
- bDispatch = mpSystemManager->receiveIdleMsg(*this);
- }
- else
- {
-#if CONFIG_LOG
- clog << logger(LOG_ERROR) << "type is not SYSTEM_TYPE_IDLE!" << endl;
-#endif /* CONFIG_LOG */
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "System manager pointer is NULL");
- }
-
- return bDispatch;
-}
-
-
-// When receiving a SCI msg, specialized SCI msg header has to be extracted from received SCI msg data
-//
-bool SystemSciMsg::identifySpecializedSciMsgHeader ( )
-{
- logFunction();
- bool bIdentifyHeader = false;
-
- if (NULL != SciMsg::getSciMsgData())
- {
- // Set specialized SCI msg header size
- //
- SciMsg::setSpecializedSciMsgHeaderSize(static_cast<unsigned long>(sizeof(struct System_Header)));
-
- // Get specialized SCI message header contents
- //
- if (SciMsg::getSciMsgDataLength() >= SciMsg::getSpecializedSciMsgHeaderSize()) // check that there are enough data to get the specialized SCI message header
- {
- mSpecializedSciMsgHeader = *((System_Header*)SciMsg::getSciMsgData());
- mSpecializedSciMsgHeader.flags = ntohs(getSpecializedSciMsgHeader().flags);
-
- bIdentifyHeader = setSpecializedSciMsgType (static_cast<System_Type>(getSpecializedSciMsgHeader().type));
-
- displaySpecializedSciMsgHeader();
- }
- else
- {
- errno = ENODATA;
- throw Error(__PRETTY_FUNCTION__, "Not enough data to get the system SCI message header", errno);
- }
- }
- else
- {
- throw Error(__PRETTY_FUNCTION__, "SCI message data pointer is NULL");
- }
-
- return bIdentifyHeader;
-}
-
-
-// Check specialized SCI msg compatibility (check specialized SCI msg version)
-//
-bool SystemSciMsg::checkCompatibility ( ) const
-{
- logFunction();
- bool bCheck = false;
-
- if (SYSTEM_VERSION == getSpecializedSciMsgHeader().version)
- {
- bCheck = SciMsg::checkCompatibility();
- }
-
- return bCheck;
-}
-
-
-void SystemSciMsg::displaySpecializedSciMsgHeader ( ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- clog << logger(LOG_INFO) << "system SCI msg header = " << endl;
- clog << logger(LOG_INFO) << "\tversion = 0x" << setfill('0') << setw(2) << uppercase << hex << static_cast<unsigned short int>(getSpecializedSciMsgHeader().version) << endl;
- displaySpecializedSciMsgType(LOG_INFO);
- clog << logger(LOG_INFO) << "\tflags = 0x" << setfill('0') << setw(4) << uppercase << hex << getSpecializedSciMsgHeader().flags << dec << endl;
-#endif /* CONFIG_LOG */
-}
-
-
-void SystemSciMsg::displaySpecializedSciMsgType ( int log_level ) const
-{
-#if CONFIG_LOG
- logFunction();
-
- switch (getSpecializedSciMsgType())
- {
- case 0:
- clog << logger(log_level) << "\ttype = SYSTEM_TYPE_NONE" << endl;
- break;
- case 1:
- clog << logger(log_level) << "\ttype = SYSTEM_TYPE_IDLE" << endl;
- break;
- case 2:
- clog << logger(log_level) << "\ttype = SYSTEM_TYPE_STATION_NAME" << endl;
- break;
- default:
- clog << logger(log_level) << "\ttype = unknown!" << endl;
- break;
- }
-#endif /* CONFIG_LOG */
-}
-
-
-// private methods
-//
-
-
-// protected methods
-//
-
-
-// Accessor methods
-//
-
-
-// public attribute accessor methods
-//
-
-
-// private attribute accessor methods
-//
-
-
-System_Type SystemSciMsg::getSpecializedSciMsgType ( ) const
-{
- return mSpecializedSciMsgType;
-}
-
-
-bool SystemSciMsg::setSpecializedSciMsgType ( const System_Type type )
-{
- mSpecializedSciMsgType = type;
-
- return true;
-}
-
-
-void * SystemSciMsg::returnSpecializedSciMsgHeader ( ) const
-{
- return (void*)&mSpecializedSciMsgHeader;
-}
-
-
-const System_Header & SystemSciMsg::getSpecializedSciMsgHeader ( ) const
-{
- return mSpecializedSciMsgHeader;
-}
-
-
-bool SystemSciMsg::setSpecializedSciMsgHeader ( const System_Header & specialized_sci_msg_header )
-{
- logFunction();
- bool bSetHeader = false;
-
- mSpecializedSciMsgHeader = specialized_sci_msg_header;
-
- bSetHeader = setSpecializedSciMsgType (static_cast<System_Type>(getSpecializedSciMsgHeader().type));
-
- displaySpecializedSciMsgHeader();
-
- return bSetHeader;
-}
-
-
-// protected attribute accessor methods
-//
-
diff --git a/cesar/maximus/system/src/SystemSciMsgTest.cpp b/cesar/maximus/system/src/SystemSciMsgTest.cpp
deleted file mode 100644
index b8015ffee7..0000000000
--- a/cesar/maximus/system/src/SystemSciMsgTest.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-
-#include "SystemSciMsgTest.h"
-
-#include "SystemSciMsg.h"
-#include "SciServer.h"
-#include "SystemManager.h"
-#include "PhyProcessor.h"
-#include "NetworkClockProcessor.h"
-#include "FunctionCallManager.h"
-#include "EthernetProcessor.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-#include <iostream>
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (SystemSciMsgTest);
-
-
-void SystemSciMsgTest::setUp (void)
-{
- logTest();
-
- mpSciServer = new SciServer();
- mpSystemManager = new SystemManager (mpSciServer);
- mpSystemSciMsg = new SystemSciMsg (mpSystemManager);
-}
-
-
-void SystemSciMsgTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpSystemSciMsg)
- {
- delete mpSystemSciMsg;
- mpSystemSciMsg = NULL;
- }
- if (NULL != mpSystemManager)
- {
- delete (mpSystemManager);
- mpSystemManager = NULL;
- }
- if (NULL != mpSciServer)
- {
- delete (mpSciServer);
- mpSciServer = NULL;
- }
-}
-
-
-void SystemSciMsgTest::dispatchMsgTest (void)
-{
- logTest();
-
- if (NULL != mpSystemSciMsg)
- {
- try
- {
- CPPUNIT_ASSERT_MESSAGE ( "setSpecializedSciMsgType failed",
- mpSystemSciMsg->setSpecializedSciMsgType(SYSTEM_TYPE_IDLE) );
-
- IFunctionCall * pFunctionCall = new FunctionCallManager (mpSciServer);
- IPhy * pPhy = new PhyProcessor (mpSciServer);
- IEthernet * pEthernet = new EthernetProcessor (mpSciServer);
- INetworkClock * pNetworkClock = new NetworkClockProcessor (mpSciServer, mpSystemManager, pFunctionCall, pPhy, pEthernet);
- mpSystemManager->setNetworkClock(pNetworkClock);
- Sci_Msg_Station_Id stationId = mpSystemManager->createStation(mpSystemManager->getDefaultStationExecutable());
-
- CPPUNIT_ASSERT_MESSAGE ( "setSciMsgStationId failed",
- mpSystemSciMsg->setSciMsgStationId(stationId) );
-
- CPPUNIT_ASSERT_MESSAGE ( "dispatchMsg failed",
- mpSystemSciMsg->dispatchMsg() );
-
- if (NULL != pFunctionCall)
- {
- delete (pFunctionCall);
- pFunctionCall = NULL;
- }
- if (NULL != pPhy)
- {
- delete (pPhy);
- pPhy = NULL;
- }
- if (NULL != pEthernet)
- {
- delete (pEthernet);
- pEthernet = NULL;
- }
- if (NULL != pNetworkClock)
- {
- delete (pNetworkClock);
- pNetworkClock = NULL;
- }
- }
- catch ( Error &e )
- {
- e.display();
- }
- }
- else
- {
- CPPUNIT_FAIL ( "Initialized SystemSciMsg pointer is NULL" );
- }
-}
-
diff --git a/cesar/maximus/test/test.sh b/cesar/maximus/test/test.sh
deleted file mode 100755
index 4486875528..0000000000
--- a/cesar/maximus/test/test.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/bash
-
-WORKSPACE='/home/buret/spidcom/workspace/eoc'
-
-cd $WORKSPACE/cesar/hal/ipmbox/maximus/test
-make clean; make
-./obj/test_maximus_hal > /dev/null
-
-cd $WORKSPACE/cesar/hal/leon/maximus/test
-make clean; make
-./obj/test_maximus_timer > /dev/null
-
-cd $WORKSPACE/cesar/hal/phy/maximus/test
-make clean; make
-./obj/test_phy_maximus > /dev/null
-
-cd $WORKSPACE/cesar/hal/phy/maximus/dur/test
-make clean; make
-./obj/test_dur
-
-cd $WORKSPACE/cesar/host/test
-make clean; make
-./obj/test_host
-
-cd $WORKSPACE/cesar/host/sci/cesar/test
-make clean; make
-./obj/test_sci_cesar
-
-cd $WORKSPACE/cesar/interface/fcall/test
-make clean; make
-./obj/test_interface_fcall > /dev/null
-
-cd $WORKSPACE/cesar/maximus/prototest/fcall
-make clean; make
-
-cd $WORKSPACE/cesar/maximus/prototest/integration
-make clean; make
-
-cd $WORKSPACE/cesar/maximus/stationtest
-make clean; make
-
-cd $WORKSPACE/cesar/maximus/unittest
-make clean; make
-./obj/unittest -e ../stationtest/obj/stationtest.elf > /dev/null
-
-cd $WORKSPACE/cesar/maximus/usertest
-make clean; make
-./obj/usertest -e ../stationtest/obj/stationtest.elf -d false -t 2500000000 > /dev/null
-
-cd $WORKSPACE/cesar/maximus/test
-./test_python.sh
diff --git a/cesar/maximus/test/test_python.sh b/cesar/maximus/test/test_python.sh
deleted file mode 100755
index cab314c83f..0000000000
--- a/cesar/maximus/test/test_python.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/bash
-
-WORKSPACE='/home/buret/spidcom/workspace/eoc'
-
-cd $WORKSPACE/cesar/maximus/prototest/fcall
-make
-
-cd $WORKSPACE/cesar/maximus/prototest/integration
-make
-
-cd $WORKSPACE/cesar/maximus/stationtest
-make
-
-cd $WORKSPACE/cesar/maximus/python
-make clean; make
-
-python test/test_channel.py -e ../stationtest/obj/test_station.elf -d false -t 2500000000
-python test/test_cli.py
-python test/test_ethernet.py -e ../stationtest/obj/test_ether.elf -d false -t 2500000000 > /dev/null
-python test/test_fsm.py > /dev/null
-python test/test_interface.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000 > /dev/null
-python test/test_lib_cesar.py -e ../stationtest/obj/test_lib_cesar.elf -d false -t 2500000000
-python test/test_lib_proto.py -u -e ../prototest/fcall/obj/test_fcall.elf -d false -t 2500000000 > /dev/null
-python test/test_macframe.py -e ../stationtest/obj/test_send.elf -d false -t 2500000000 > /dev/null
-python test/test_mme.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000
-python test/test_result.py
-python test/test_simu.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000 > /dev/null
-python test/test_station.py -e ../stationtest/obj/test_station.elf -d false -t 2500000000 > /dev/null
-python test/test_utils.py > /dev/null
-python py/script_example.py -e ../stationtest/obj/stationtest.elf -d false -t 2500000000 > /dev/null
-python py/test_cb.py -e ../stationtest/obj/test_cb.elf -d false -t 2500000000 > /dev/null
-python py/test_ether.py -e ../stationtest/obj/test_ether.elf -d false -t 2500000000 > /dev/null
-python py/test_false_alarm.py -e ../stationtest/obj/test_false_alarm.elf -d false -t 2500000000 > /dev/null
-python py/test_send_mpdu.py -e ../stationtest/obj/test_send.elf -d false -t 2500000000 > /dev/null
-python py/test_send_noise.py -e ../stationtest/obj/test_send.elf -d false -t 2500000000 > /dev/null
-python py/test_tx_rx.py -e ../stationtest/obj/test_tx_rx.elf -d false -t 2500000000 > /dev/null
-python py/test_log.py -e ../stationtest/obj/test_log.elf -d false -t 2500000000 > /dev/null
diff --git a/cesar/maximus/unittest/Makefile b/cesar/maximus/unittest/Makefile
deleted file mode 100644
index 1f35a1a498..0000000000
--- a/cesar/maximus/unittest/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-BASE = ../..
-
-UNITTEST = y
-
-HOST_PROGRAMS = unittest
-unittest_SOURCES = main.cpp
-unittest_MODULES = maximus lib
-
-EXTRA_HOST_CFLAGS := $(shell cppunit-config --cflags)
-EXTRA_HOST_LDLIBS := $(shell cppunit-config --libs)
-
-include $(BASE)/common/make/top.mk
diff --git a/cesar/maximus/unittest/src/main.cpp b/cesar/maximus/unittest/src/main.cpp
deleted file mode 100644
index 3a3a01f582..0000000000
--- a/cesar/maximus/unittest/src/main.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/TestResult.h>
-#include <cppunit/TestResultCollector.h>
-#include <cppunit/TestRunner.h>
-
-#include "Error.h"
-
-#include <string>
-#include <getopt.h> // for 'getopt()'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-#include <fstream> // for 'ofstream'
-using namespace std;
-
-extern bool UNITTEST;
-extern string stationTest;
-
-
-int main (int argc, char * argv[])
-{
- UNITTEST = true;
- int returnValue = -1;
-
- try
- {
- // Create a file for logging
- //
- ofstream logFile("unittest_log");
- if (logFile)
- {
- clog.rdbuf(logFile.rdbuf());
- }
- else
- {
- cerr << "Error while opening log file" << endl;
- clog.rdbuf(cout.rdbuf());
- }
-
- cout << endl << "*** Welcome to Fulminata Maximus simulator unitary tests ***" << endl;
-
- bool isStationExecutableSet = false;
- int optionChar = 0;
- while (EOF != optionChar)
- {
- optionChar = getopt(argc, argv, "e:");
-
- switch (optionChar)
- {
- case 'e':
- cout << "station executable = " << optarg << endl;
- stationTest = optarg;
- isStationExecutableSet = true;
- break;
- case '?':
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Usage: -e station_executable", errno);
- break;
- }
- }
- if (!isStationExecutableSet)
- {
- errno = EINVAL;
- throw Error(__PRETTY_FUNCTION__, "Usage: -e station_executable", errno);
- }
-
- cout << "\ttestresult" << endl;
- CPPUNIT_NS :: TestResult testresult;
-
- cout << "\tcollectedresults" << endl;
- CPPUNIT_NS :: TestResultCollector collectedresults;
- testresult.addListener (&collectedresults);
-
- cout << "\ttestrunner" << endl;
- CPPUNIT_NS :: TestRunner testrunner;
- testrunner.addTest (CPPUNIT_NS :: TestFactoryRegistry :: getRegistry ().makeTest ());
- testrunner.run (testresult);
-
- cout << "\tcompileroutputter" << endl;
- CPPUNIT_NS :: CompilerOutputter compileroutputter (&collectedresults, std::cerr);
- compileroutputter.write ();
-
- returnValue = collectedresults.wasSuccessful () ? 0 : 1;
-
- cout << endl << "*** END ***" << endl;
-
- // Close the created file for logging
- //
- logFile.flush();
- logFile.close();
- }
- catch ( Error &e )
- {
- e.display();
- }
-
- return returnValue;
-}
-
diff --git a/cesar/maximus/usertest/Makefile b/cesar/maximus/usertest/Makefile
deleted file mode 100644
index b20cb789db..0000000000
--- a/cesar/maximus/usertest/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-BASE = ../..
-
-HOST_PROGRAMS = usertest
-usertest_SOURCES = main_example.cpp
-usertest_MODULES = maximus lib
-
-include $(BASE)/common/make/top.mk
diff --git a/cesar/maximus/usertest/src/main_example.cpp b/cesar/maximus/usertest/src/main_example.cpp
deleted file mode 100644
index 90e2ba570e..0000000000
--- a/cesar/maximus/usertest/src/main_example.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-
-#include "Maximus.h"
-#include "Sta.h"
-#include "Msg.h"
-
-#include <signal.h> // for 'raise()' and 'SIGTERM'
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
-typedef struct my_struct
-{
- int i1;
- int i2;
- bool b;
-} my_struct_t;
-
-typedef long long my_type_t;
-
-bool receive_fc1_rsp;
-
-void
-my_cb (Msg & msg)
-{
- cout << __PRETTY_FUNCTION__ << endl;
-
- unsigned long length = sizeof(my_type_t);
- my_type_t result2;
- my_type_t * p_result2 = &result2;
- if (NULL != msg.bind_param("result_2", length, (unsigned char *)p_result2))
- {
- cout << "result 2 = " << result2 << endl;
- }
- receive_fc1_rsp = true;
-
- p_result2 = NULL;
-}
-
-int
-main ( int argc, char * argv[] )
-{
- try
- {
- /* Instantiate a Maximus object and initialize it. */
- Maximus maximus;
- maximus.init(argc, argv);
-
- /* Create three stations. */
- Sta stationA = maximus.create_sta();
- Sta stationB = maximus.create_sta();
- Sta stationC = maximus.create_sta();
-
- /* Launch a debugger attached to station B. */
- stationB.debug();
-
- /* Send an asynchronous function message to station A. */
-
- /** Create a function message and set the name of the function to call of station A. **/
- Msg fc1 = maximus.create_fc("function_1");
-
- /** Add a first parameter to the created message. **/
- my_struct_t param1 = { 1, 2, true };
- fc1.add_param("param_1", sizeof(my_struct_t), (unsigned char *)&param1);
-
- /** Add a second parameter to the created message. **/
- int param2[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
- fc1.add_param("param_2", 10*sizeof(int), (unsigned char *)param2);
-
- /** Add a third parameter to the created message. **/
- string param3("hello");
- fc1.add_param("param_3", param3);
-
- /** Add a fourth parameter to the created message. **/
- my_type_t param4 = 123;
- fc1.add_param("param_4", sizeof(my_type_t), (unsigned char *)&param4);
-
- /** Register a callback function which will be called at message response reception. **/
- fc1.set_cb(&my_cb);
-
- /** Set destination station of message 1. **/
- fc1.set_sta(stationA);
-
- /** Send the configured message in an asynchronous mode. **/
- receive_fc1_rsp = false;
- fc1.send_async();
-
- /* Send a synchronous function message to station B. */
-
- /** Create a function message and set the name of the function to call into station B. **/
- Msg fc2 = maximus.create_fc("function_2");
-
- /** Add a first parameter to the created message. **/
- fc2.add_param("param_5", true);
-
- /** Send the configured message to station B in a synchronous mode. **/
- fc2.send(stationB);
-
- /** Get the function result. **/
- char result1[FUNCTION_CALL_PARAM_MAX_SIZE];
- unsigned long length = FUNCTION_CALL_PARAM_MAX_SIZE*sizeof(char);
- fc2.bind_param("result_1", length, (unsigned char *)result1);
- cout << "result1 = " << result1 << endl;
-
- /* Set a parameter value of station B. */
- Msg probe1 = maximus.create_probe();
- unsigned int param6 = 789;
- probe1.add_param("param_6", param6);
- probe1.send(stationB);
-
- /* Get a parameter value from station B. */
- Msg probe2 = maximus.create_probe()
- .add_param("param_7")
- .send(stationB);
- unsigned int param7 = probe2.bind_param<unsigned int>("param_7");
- cout << "param 7 = " << param7 << endl;
-
- /* Get the same parameter value from station C, re-using existing message. */
- probe2.send(stationC);
-
- /* Send asynchronous function message(s) to station B. */
- if (456 == param7)
- {
- Msg fc3 = maximus.create_fc("function_3");
- fc3.send_async(stationC);
- }
- Msg fc4 = maximus.create_fc("function_4");
- fc4.send_async(stationC);
-
- /* Wait for station A response. */
- while(!receive_fc1_rsp)
- {
- maximus.process();
- }
-
- /* Send an asynchronous function message to station C. */
- Msg fc5 = maximus.create_fc("function_5");
- fc5.send_async(stationC);
-
- /* Wait for responses to all sent messages in asynchronous mode. */
- maximus.wait();
-
- /* Get list of all registered parameters of stations C. */
- Msg probe3 = maximus.create_probe();
- probe3.send(stationC);
- if (probe3.is_param("param_8"))
- {
- /* Get parameter 8 value and set parameter 9 value of station C. */
- Msg probe4 = maximus.create_probe();
- probe4.add_param("param_8");
- probe4.add_param("param_9", false);
- probe4.send(stationC);
- bool param8 = probe4.bind_param<bool>("param_8");
- cout << "param 8 = " << param8 << endl;
- }
-
- /* Wait during 10000 ticks before terminating the program. */
- maximus.wait(10000);
- }
- catch (...)
- {
- cerr << "Catch an exception" << endl;
- raise(SIGTERM);
- }
-
- cout << endl << "*** END ***" << endl;
- return 0;
-}
diff --git a/cesar/maximus/utils/Config b/cesar/maximus/utils/Config
new file mode 100644
index 0000000000..5accfa5fd7
--- /dev/null
+++ b/cesar/maximus/utils/Config
@@ -0,0 +1 @@
+CONFIG_LOG = n
diff --git a/cesar/maximus/utils/Module b/cesar/maximus/utils/Module
index 1a70f6d551..a0feb8a640 100644
--- a/cesar/maximus/utils/Module
+++ b/cesar/maximus/utils/Module
@@ -1,5 +1 @@
SOURCES := Error.cpp Logger.cpp
-ifdef UNITTEST
-SOURCES += ErrorTest.cpp LoggerTest.cpp
-endif
-HOST_INCLUDES += maximus/utils/inc
diff --git a/cesar/maximus/utils/inc/Error.h b/cesar/maximus/utils/inc/Error.h
index 3754f88d93..dc36ebd403 100644
--- a/cesar/maximus/utils/inc/Error.h
+++ b/cesar/maximus/utils/inc/Error.h
@@ -1,36 +1,53 @@
-
-#ifndef ERROR_H
-#define ERROR_H
-
-#include <iostream>
+#ifndef maximus_utils_inc_error_h
+#define maximus_utils_inc_error_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/utils/inc/Error.h
+ * \ingroup maximus_utils
+ *
+ */
#include <stdexcept>
#include <errno.h>
-using namespace std;
-
+#include <string>
-class Error : public runtime_error
+class Error : public std::runtime_error
{
-
public:
- Error ( const string & function, const string & msg, const error_t error = ENOTRECOVERABLE );
-
- virtual ~Error ( ) throw ( );
-
- inline string getFunction ( ) const { return mFunction; }
-
- inline error_t getErrno ( ) const { return mErrorId; }
-
- inline string getMessage ( ) const { return what(); }
-
- void display ( ) const;
-
+ Error (const std::string &function,
+ const std::string &msg,
+ const error_t error = ENOTRECOVERABLE);
+
+ virtual ~Error () throw ();
+
+ inline std::string getFunction () const
+ {
+ return mFunction;
+ }
+
+ inline error_t getErrno () const
+ {
+ return mErrorId;
+ }
+
+ inline std::string getMessage () const
+ {
+ return what ();
+ }
+
+ void display () const;
+
private:
- error_t mErrorId;
- string mFunction;
-
+ error_t mErrorId;
+ std::string mFunction;
};
-#endif // ERROR_H
+#endif // maximus_utils_inc_error_h
diff --git a/cesar/maximus/utils/inc/ErrorTest.h b/cesar/maximus/utils/inc/ErrorTest.h
deleted file mode 100644
index 048cbd3ed2..0000000000
--- a/cesar/maximus/utils/inc/ErrorTest.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef ERRORTEST_H
-#define ERRORTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class Error;
-
-
-class ErrorTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (ErrorTest);
- CPPUNIT_TEST (simpleTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void simpleTest (void);
-
-private:
-
- Error * mpError;
-
-};
-
-
-#endif // ERRORTEST_H
diff --git a/cesar/maximus/utils/inc/Logger.h b/cesar/maximus/utils/inc/Logger.h
index d8bdc84fd2..74d21ebf3e 100644
--- a/cesar/maximus/utils/inc/Logger.h
+++ b/cesar/maximus/utils/inc/Logger.h
@@ -1,13 +1,23 @@
-
-#ifndef LOGGER_H
-#define LOGGER_H
-
-#include "networkclock_types.h" // for 'Network_Clock_Tick'
-#include "LoggerStream.h"
-
+#ifndef maximus_utils_inc_logger_h
+#define maximus_utils_inc_logger_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/utils/inc/Logger.h
+ * \ingroup maximus_utils
+ *
+ */
+
+#include "maximus/common/types/networkclock_types.h"
+#include "maximus/utils/inc/LoggerStream.h"
#include "config/log.h"
-
-#include <fstream> // for 'std::ostream' and 'std::ofstream'
+#include <fstream>
+#include <iostream>
// Constants defining the six different importance levels of the log messages
#define LOG_DEBUG 0
@@ -19,109 +29,117 @@
#define LOG_NONE 6
#if CONFIG_LOG
-#define logFunction() clog << logger(LOG_DEBUG) << __PRETTY_FUNCTION__ << endl
-#define logTest() clog << endl << "---" << endl << __PRETTY_FUNCTION__ << endl
+#define maximus_log(lvl,msg) std::clog << logger(lvl) << msg << std::endl
+#define logFunction() std::clog << logger(LOG_DEBUG) \
+ << __PRETTY_FUNCTION__ << std::endl
+#define logTest() std::clog << std::endl \
+ << "---" << std::endl \
+ << __PRETTY_FUNCTION__ << std::endl
#else /* !CONFIG_LOG */
-#define logFunction()
-#define logTest()
+#define maximus_log(lvl,msg) while (0)
+#define logFunction() while (0)
+#define logTest() while (0)
#endif /* CONFIG_LOG */
+#define DEPRECATED_FCT(msg) std::cout << "deprecated: " \
+ << __PRETTY_FUNCTION__ << ", " \
+ << msg << std::endl;
class Logger
{
- public:
-
- // Constructors:
-
- /**
- * Empty Constructor
- * Logs to cout, log level LOG_DEBUG
- */
- Logger ( );
-
- /**
- * Constructor
- * Logs to cout, log level specified
- */
- Logger ( int log_level );
-
- /**
- * Constructor
- * Logs to a specified stream, log level specified
- */
- Logger ( std::ofstream & log_file, int log_level );
-
- /**
- * Empty Destructor
- */
- virtual ~Logger ( );
-
- /**
- * Operator to set the level of a message
- */
- Logger & operator() ( int msg_level )
- {
- setMsgLevel(msg_level);
- return *this;
- }
-
- /**
- * Test log level to shortcut execution
- */
- bool is ( int msg_level )
- { return msg_level >= getLogLevel (); }
-
- /**
- * Operator to pass the message to the stream
- */
- friend LoggerStream operator<< ( std::ostream & os, const Logger & logger );
-
- /**
- * Function to set the stream
- */
- void setLogFile ( std::ofstream & log_file );
-
- /**
- * Functions to get and set the log level
- */
- int getLogLevel ( ) const { return mLogLevel; }
- void setLogLevel ( int log_level );
-
- /**
- * Functions to get and set the msg level
- */
- int getMsgLevel ( ) const { return mMsgLevel; }
- void setMsgLevel ( int msg_level )
- {
- if ( (LOG_DEBUG <= msg_level) && (LOG_NONE >= msg_level) )
- mMsgLevel = msg_level;
- }
-
- /**
- * @return Network_Clock_Tick
- */
- Network_Clock_Tick getCurrentTickValue ( ) const
- { return mCurrentTickValue; }
-
- /**
- * @return bool
- * @param current_tick_value
- */
- bool updateTickValue ( const Network_Clock_Tick current_tick_value );
+public:
+
+ // Constructors:
+
+ /**
+ * Empty Constructor
+ * Logs to cout, log level LOG_DEBUG
+ */
+ Logger ( );
+
+ /**
+ * Constructor
+ * Logs to cout, log level specified
+ */
+ Logger ( int log_level );
+
+ /**
+ * Constructor
+ * Logs to a specified stream, log level specified
+ */
+ Logger ( std::ofstream & log_file, int log_level );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~Logger ( );
+
+ /**
+ * Operator to set the level of a message
+ */
+ Logger & operator() ( int msg_level )
+ {
+ setMsgLevel(msg_level);
+ return *this;
+ }
+
+ /**
+ * Test log level to shortcut execution
+ */
+ bool is ( int msg_level )
+ { return msg_level >= getLogLevel (); }
+
+ /**
+ * Operator to pass the message to the stream
+ */
+ friend LoggerStream operator<< ( std::ostream & os, const Logger & logger );
+
+ /**
+ * Function to set the stream
+ */
+ void setLogFile ( std::ofstream & log_file );
+
+ /**
+ * Functions to get and set the log level
+ */
+ int getLogLevel ( ) const { return mLogLevel; }
+ void setLogLevel ( int log_level );
+
+ /**
+ * Functions to get and set the msg level
+ */
+ int getMsgLevel ( ) const { return mMsgLevel; }
+ void setMsgLevel ( int msg_level )
+ {
+ if ( (LOG_DEBUG <= msg_level) && (LOG_NONE >= msg_level) )
+ mMsgLevel = msg_level;
+ }
+
+ /**
+ * @return Network_Clock_Tick
+ */
+ Network_Clock_Tick getCurrentTickValue ( ) const
+ { return mCurrentTickValue; }
+
+ /**
+ * @return bool
+ * @param current_tick_value
+ */
+ bool updateTickValue ( const Network_Clock_Tick current_tick_value );
private:
-
- // Current log level
- int mLogLevel;
- // Level of message (as set by operator)
- int mMsgLevel;
-
- Network_Clock_Tick mCurrentTickValue;
-
+
+ // Current log level
+ int mLogLevel;
+ // Level of message (as set by operator)
+ int mMsgLevel;
+
+ Network_Clock_Tick mCurrentTickValue;
+
};
extern Logger logger;
LoggerStream operator<< ( std::ostream & os, const Logger & logger );
-#endif // LOGGER_H
+#endif // maximus_utils_inc_logger_h
diff --git a/cesar/maximus/utils/inc/LoggerStream.h b/cesar/maximus/utils/inc/LoggerStream.h
index 30da85f876..f47c6e5f5f 100644
--- a/cesar/maximus/utils/inc/LoggerStream.h
+++ b/cesar/maximus/utils/inc/LoggerStream.h
@@ -1,13 +1,17 @@
#ifndef maximus_utils_inc_LoggerStream_h
#define maximus_utils_inc_LoggerStream_h
-/* Cesar project {{{
+/* Maximus project {{{
*
- * Copyright (C) 2008 Spidcom
+ * Copyright (C) 2012 MStar Semiconductor
*
* <<<Licence>>>
*
* }}} */
-
+/**
+ * \file maximus/utils/inc/LoggerStream.h
+ * \ingroup maximus_utils
+ *
+ */
#include <iostream>
class LoggerStream
diff --git a/cesar/maximus/utils/inc/LoggerTest.h b/cesar/maximus/utils/inc/LoggerTest.h
deleted file mode 100644
index 13353a9259..0000000000
--- a/cesar/maximus/utils/inc/LoggerTest.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef LOGGERTEST_H
-#define LOGGERTEST_H
-
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
-
-class Logger;
-
-
-class LoggerTest : public CPPUNIT_NS::TestFixture
-{
-
- CPPUNIT_TEST_SUITE (LoggerTest);
- CPPUNIT_TEST (simpleTest);
- CPPUNIT_TEST_SUITE_END ();
-
-public:
-
- void setUp (void);
- void tearDown (void);
-
-protected:
-
- void simpleTest (void);
-
-private:
-
- Logger * mpLogger;
-
-};
-
-
-#endif // LOGGERTEST_H
diff --git a/cesar/maximus/utils/src/Error.cpp b/cesar/maximus/utils/src/Error.cpp
index cdf6ca4f9c..16a803292f 100644
--- a/cesar/maximus/utils/src/Error.cpp
+++ b/cesar/maximus/utils/src/Error.cpp
@@ -1,30 +1,49 @@
-
-#include "Error.h"
-
-#include "Logger.h"
-
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-#include <cstring> // strerror
-
-
-Error::Error ( const string & my_function, const string & msg, const error_t my_errno ) : runtime_error(msg)
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/utils/src/Error.cpp
+ * \ingroup maximus_utils
+ *
+ */
+#include "maximus/utils/inc/Error.h"
+#include "maximus/utils/inc/Logger.h"
+#include <iostream>
+#include <cstring>
+
+
+Error::Error (
+ const std::string &my_function,
+ const std::string &msg,
+ const error_t my_errno ):
+ runtime_error(msg)
{
- mErrorId = my_errno;
- mFunction = my_function;
+ mErrorId = my_errno;
+ mFunction = my_function;
}
-
-void Error::display ( ) const
+void
+Error::display () const
{
- cerr << endl << "*** Error in " << mFunction << endl << "\t" << what() << " (" << strerror(mErrorId) << ") ***" << endl;
-#if CONFIG_LOG
- clog << endl << logger(LOG_FATAL) << "*** Error in " << mFunction << endl << "\t" << what() << " (" << strerror(mErrorId) << ") ***" << endl;
-#endif /* CONFIG_LOG */
+ std::cerr << std::endl;
+ std::cerr << " ..." << std::endl;
+ std::cerr << " ( oo)" << std::endl;
+ std::cerr << "ooO--(_)--Ooo-" << std::endl;
+ std::cerr << std::endl;
+ std::cerr << " Error in : " << mFunction << std::endl;
+ std::cerr << " ==> " << what () << " (" << strerror (mErrorId) << ")" << std::endl;
+ std::cerr << std::endl;
+
+ maximus_log (LOG_FATAL,
+ std::endl << "*** Error in " << mFunction << std::endl
+ << "\t" << what () << " (" << strerror (mErrorId) << ") ***");
}
-
Error::~Error ( ) throw()
{
-
}
diff --git a/cesar/maximus/utils/src/ErrorTest.cpp b/cesar/maximus/utils/src/ErrorTest.cpp
deleted file mode 100644
index 93cf0e3ea0..0000000000
--- a/cesar/maximus/utils/src/ErrorTest.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-
-#include "ErrorTest.h"
-
-#include "Error.h"
-#include "Logger.h"
-
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (ErrorTest);
-
-
-void ErrorTest::setUp (void)
-{
- logTest();
-
- mpError = new Error ("test", "test");
-}
-
-
-void ErrorTest::tearDown (void)
-{
- logTest();
-
- if (NULL != mpError)
- {
- delete (mpError);
- mpError = NULL;
- }
-}
-
-
-void ErrorTest::simpleTest (void)
-{
- logTest();
-
- if (NULL != mpError)
- {
- // ...
- }
- else
- {
- CPPUNIT_FAIL ("Error pointer is NULL");
- }
-}
-
diff --git a/cesar/maximus/utils/src/Logger.cpp b/cesar/maximus/utils/src/Logger.cpp
index c8b793a144..52ed46f58a 100644
--- a/cesar/maximus/utils/src/Logger.cpp
+++ b/cesar/maximus/utils/src/Logger.cpp
@@ -1,93 +1,100 @@
-
-#include "Logger.h"
-
-#include <iostream> // for 'cout', 'cerr' and 'clog'
-using namespace std;
-
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/utils/src/Logger.cpp
+ * \ingroup maximus_utils
+ *
+ */
+#include "maximus/utils/inc/Logger.h"
+#include <iostream>
Logger::Logger ( ):
-mLogLevel(LOG_DEBUG),
-mMsgLevel(LOG_DEBUG)
+ mLogLevel(LOG_DEBUG),
+ mMsgLevel(LOG_DEBUG)
{
- clog.rdbuf(cout.rdbuf());
+ std::clog.rdbuf(std::cout.rdbuf());
}
Logger::Logger ( int log_level ):
-mLogLevel(LOG_DEBUG),
-mMsgLevel(LOG_DEBUG)
+ mLogLevel(LOG_DEBUG),
+ mMsgLevel(LOG_DEBUG)
{
- clog.rdbuf(cout.rdbuf());
- setLogLevel(log_level);
+ std::clog.rdbuf(std::cout.rdbuf());
+ setLogLevel(log_level);
}
-Logger::Logger ( ofstream & log_file, int log_level ):
-mLogLevel(LOG_DEBUG),
-mMsgLevel(LOG_DEBUG)
+Logger::Logger ( std::ofstream & log_file, int log_level ):
+ mLogLevel(LOG_DEBUG),
+ mMsgLevel(LOG_DEBUG)
{
- if (log_file)
- {
- clog.rdbuf(log_file.rdbuf());
- }
- else
- {
- clog.rdbuf(cout.rdbuf());
- }
- setLogLevel(log_level);
+ if (log_file)
+ {
+ std::clog.rdbuf(log_file.rdbuf());
+ }
+ else
+ {
+ std::clog.rdbuf(std::cout.rdbuf());
+ }
+ setLogLevel(log_level);
}
Logger::~Logger ( )
{
- clog.rdbuf(cout.rdbuf());
+ std::clog.rdbuf(std::cout.rdbuf());
}
-LoggerStream operator<< ( ostream & os, const Logger & logger )
+LoggerStream operator<< ( std::ostream & os, const Logger & logger )
{
- if (logger.getMsgLevel() >= logger.getLogLevel())
- {
- os << "Maximus(" << dec << logger.getCurrentTickValue() << "): ";
- if (LOG_WARNING ==logger.getMsgLevel())
+ if (logger.getMsgLevel() >= logger.getLogLevel())
{
- os << "WARNING ";
+ os << "tick(0x" << std::hex << logger.getCurrentTickValue() << "): ";
+ if (LOG_WARNING ==logger.getMsgLevel())
+ {
+ os << "WARNING ";
+ }
+ else if (LOG_ERROR ==logger.getMsgLevel())
+ {
+ os << "ERROR ";
+ }
+ return LoggerStream (os);
}
- else if (LOG_ERROR ==logger.getMsgLevel())
+ else
{
- os << "ERROR ";
+ return LoggerStream ();
}
- return LoggerStream (os);
- }
- else
- {
- return LoggerStream ();
- }
}
-void Logger::setLogFile ( ofstream & log_file )
+void Logger::setLogFile ( std::ofstream & log_file )
{
- if (log_file)
- {
- clog.rdbuf(log_file.rdbuf());
- }
+ if (log_file)
+ {
+ std::clog.rdbuf(log_file.rdbuf());
+ }
}
void Logger::setLogLevel ( int log_level )
{
- if ( (LOG_DEBUG <= log_level) && (LOG_NONE >= log_level) )
- {
- mLogLevel = log_level;
- }
+ if ( (LOG_DEBUG <= log_level) && (LOG_NONE >= log_level) )
+ {
+ mLogLevel = log_level;
+ }
}
bool Logger::updateTickValue ( const Network_Clock_Tick current_tick_value )
{
- mCurrentTickValue = current_tick_value;
+ mCurrentTickValue = current_tick_value;
- return true;
+ return true;
}
-
diff --git a/cesar/maximus/utils/src/LoggerTest.cpp b/cesar/maximus/utils/src/LoggerTest.cpp
deleted file mode 100644
index 9fcb839560..0000000000
--- a/cesar/maximus/utils/src/LoggerTest.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#include "LoggerTest.h"
-
-#include "Logger.h"
-
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION (LoggerTest);
-
-
-void LoggerTest::setUp (void)
-{
- mpLogger = new Logger ();
-}
-
-
-void LoggerTest::tearDown (void)
-{
- if (NULL != mpLogger)
- {
- delete (mpLogger);
- mpLogger = NULL;
- }
-}
-
-
-void LoggerTest::simpleTest (void)
-{
- if (NULL != mpLogger)
- {
- // ...
- }
- else
- {
- CPPUNIT_FAIL ("Logger pointer is NULL");
- }
-}
-