aboutsummaryrefslogtreecommitdiff
path: root/vo/votest/tests/samp.tests/req_2.2.cl
blob: e42fa0aacc93b8fe13b645ce5017f984aac3a4bf (plain) (blame)
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
#
#  Demonstrate ability to execute remote IRAF cmds via SAMP

# Set the test description string.
votest.descr = "Demonstrate ability to execute remote IRAF cmds via SAMP"

print ("------------------------------------------------------------------")
print ("Req  2.2:  Users shall be able to execute IRAF tasks and set or")
print ("           retrieve information in/from the IRAF environment via")
print ("           SAMP messaging from clients that implement the required")
print ("           message types.")
print ("------------------------------------------------------------------")


string  res

# Execute the test commands.
print ("")
print ("")
print ("")


###########################################
#  Broadcast to all clients.
###########################################

# Remote command execution
res = sampCmdExec ("imstat dev$pix")

# Environment Set/Get
res = sampEnvSet ("foo", "bar")
res = sampEnvGet ("foo")
print ("Result = " // res)

# Task Parameter Set/Get
res = sampParamSet ("imstat.images", "dev$pix")
res = sampParamGet ("imstat.images")
print ("Parameter = " // res)



###########################################
#  Targeted message to specific client.
###########################################


# Remote command execution
res = sampCmdExec ("imstat dev$pix", 		"iraf2")

# Environment Set/Get
res = sampEnvSet ("foo", "bar", 		"iraf2")
res = sampEnvGet ("foo", 			"iraf2")
print ("Result = " // res)

# Task Parameter Set/Get
res = sampParamSet ("imstat.images", "dev$pix", "iraf2")
res = sampParamGet ("imstat.images", 		"iraf2")
print ("Parameter = " // res)