1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#
# Demonstrate ability to send targeted or broadcast SAMP messages.
# Set the test description string.
votest.descr = "Demonstrate ability to send targeted or broadcast messages"
print ("------------------------------------------------------------------")
print ("Req 2.1: Users shall be able to send messages to specific")
print (" clients or broadcast to all available clients.")
print ("------------------------------------------------------------------")
fcache init
string res
# Execute the test commands.
print ("")
print ("")
print ("")
# Convert the data$logical to a local path.
s1 = data_url // "/usno-b.xml"
s2 = "file://" // data_path // "/usno-b.xml"
s3 = "file:///localhost" // data_path // "/usno-b.xml"
# Startup topcat as a recipient application.
if (sampAccess ("topcat") == yes) {
###########################################
# Broadcast to all clients.
###########################################
# Command mode
samp ("loadVOTable", "data$usno-b.xml")
samp ("loadVOTable", s1)
samp ("loadVOTable", s2)
samp ("loadVOTable", s3)
# Program mode
res = sampLoadVOTable ("data$usno-b.xml")
res = sampLoadVOTable (s1)
res = sampLoadVOTable (s2)
res = sampLoadVOTable (s3)
###########################################
# Targeted message to specific client.
###########################################
# Command mode
samp ("loadVOTable", "data$usno-b.xml", to="topcat")
samp ("loadVOTable", s1, to="topcat")
samp ("loadVOTable", s2, to="topcat")
samp ("loadVOTable", s3, to="topcat")
# Program mode
res = sampLoadVOTable ("data$usno-b.xml", "topcat")
res = sampLoadVOTable (s1, "topcat")
res = sampLoadVOTable (s2, "topcat")
res = sampLoadVOTable (s3, "topcat")
} else {
print ("Topcat is not running... skipping this test.")
return
}
|