1
|
import time
|
2
|
|
3
|
proxy.loadSysDriver("SpwPlugin","SpwPlugin0")
|
4
|
SpwPlugin0.selectBridge("STAR-Dundee Spw USB Brick")
|
5
|
|
6
|
proxy.loadSysDriverToParent("dsu3plugin","SpwPlugin0")
|
7
|
proxy.loadSysDriverToParent("LFRControlPlugin","SpwPlugin0")
|
8
|
|
9
|
availableBrickCount = SpwPlugin0.StarDundeeGetAvailableBrickCount()
|
10
|
print str(availableBrickCount) + " SpaceWire brick(s) found"
|
11
|
|
12
|
SpwPlugin0.StarDundeeSelectBrick(1)
|
13
|
SpwPlugin0.StarDundeeSetBrickAsARouter(1)
|
14
|
SpwPlugin0.connectBridge()
|
15
|
|
16
|
#SpwPlugin0.TCPServerSetIP("127.0.0.1")
|
17
|
SpwPlugin0.TCPServerConnect()
|
18
|
|
19
|
# OPEN SPACEWIRE SERVER
|
20
|
#LFRControlPlugin0.SetSpwServerIP(129,104,27,164)
|
21
|
LFRControlPlugin0.TCPServerConnect()
|
22
|
|
23
|
# OPEN TM ECHO BRIDGE SERVER
|
24
|
LFRControlPlugin0.TMEchoBridgeOpenPort()
|
25
|
|
26
|
# LOAD TIMEGEN USING LINK 2
|
27
|
SpwPlugin0.StarDundeeSelectLinkNumber( 2 )
|
28
|
dsu3plugin0.openFile("/opt/LFR/TIMEGEN/0.0.0.1/timegen")
|
29
|
dsu3plugin0.loadFile()
|
30
|
dsu3plugin0.run()
|
31
|
|
32
|
# LOAD FSW USING LINK 1
|
33
|
SpwPlugin0.StarDundeeSelectLinkNumber( 1 )
|
34
|
dsu3plugin0.openFile("/opt/LFR/LFR-FSW/2.0.2.2/fsw")
|
35
|
dsu3plugin0.loadFile()
|
36
|
dsu3plugin0.run()
|
37
|
|
38
|
# START SENDING TIMECODES AT 1 Hz
|
39
|
SpwPlugin0.StarDundeeStartTimecodes( 1 )
|
40
|
|
41
|
# it is possible to change the time code frequency
|
42
|
#RMAPPlugin0.changeTimecodeFrequency(2)
|