version 1.6, 2000/12/14 04:35:16 |
version 1.9, 2000/12/27 10:16:12 |
|
|
/* $OpenXM: OpenXM/src/k097/lib/ox/ox.k,v 1.5 2000/12/12 13:58:21 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/lib/ox/ox.k,v 1.8 2000/12/21 09:25:23 takayama Exp $ */ |
|
|
/* Load_sm1(["ox.sm1",AddString([GetEnv("OpenXM_HOME"),"/lib/sm1/ox.sm1"])], |
/* Load_sm1(["ox.sm1",AddString([GetEnv("OpenXM_HOME"),"/lib/sm1/ox.sm1"])], |
"ox.sm1.loaded"); */ |
"ox.sm1.loaded"); */ |
Line 47 class OXchannel extends Object { |
|
Line 47 class OXchannel extends Object { |
|
return(r); |
return(r); |
} |
} |
|
|
|
def popString() { |
|
local cc,r; |
|
cc = channel; |
|
sm1(" cc oxpopstring /r set "); |
|
return(r); |
|
} |
|
|
|
|
} |
} |
|
|
class OXcontrol extends Object { |
class OXcontrol extends Object { |
Line 70 class OXcontrol extends Object { |
|
Line 78 class OXcontrol extends Object { |
|
sm1(" /data peer 1 get toString def "); |
sm1(" /data peer 1 get toString def "); |
s = AddString( |
s = AddString( |
[GetEnv("OpenXM_HOME"), |
[GetEnv("OpenXM_HOME"), |
"/src/oxc/oxc", |
"/bin/oxc", |
" -c ", pass, " -h "," localhost ", " -p ", data, " -x ", |
" -c ", pass, " -h "," localhost ", " -p ", data, " -x ", |
" & "]); |
" & "]); |
sm1(" [ (/bin/csh -c \") s (\") ] cat /stmp set "); |
sm1(" [ (/bin/csh -c \") s (\") ] cat /stmp set "); |
Line 89 class OXcontrol extends Object { |
|
Line 97 class OXcontrol extends Object { |
|
def popCMO() { |
def popCMO() { |
return(control.channel.popCMO()); |
return(control.channel.popCMO()); |
} |
} |
|
def popString() { |
|
return(control.channel.popString()); |
|
} |
|
|
} |
} |
|
|
Line 141 class OX extends OXcontrol { |
|
Line 152 class OX extends OXcontrol { |
|
def popCMO() { |
def popCMO() { |
return(engine.channel.popCMO()); |
return(engine.channel.popCMO()); |
} |
} |
|
def popString() { |
|
return(engine.channel.popString()); |
|
} |
|
|
def rpc(func,ar) { |
def rpc_submit(func,ar) { |
local n,i,one,comm; |
local n,i,one,comm; |
if (! IsString(func)) { |
if (! IsString(func)) { |
Error("The first argument of rpc must be a string."); |
Error("The first argument of rpc must be a string."); |
Line 170 class OX extends OXcontrol { |
|
Line 184 class OX extends OXcontrol { |
|
this.pushCMO(func); |
this.pushCMO(func); |
this.pushCMD(SM_executeFunction); |
this.pushCMD(SM_executeFunction); |
|
|
|
} |
|
|
|
def rpc(func,ar) { |
|
local one; |
|
sm1(" /one 1 def "); |
|
rpc_submit(func,ar); |
this.pushCMO(one); |
this.pushCMO(one); |
this.pushCMO("ox_ptod"); |
this.pushCMO("ox_ptod"); |
this.pushCMD(SM_executeFunction); |
this.pushCMD(SM_executeFunction); |
return(this.popCMO()); |
return(this.popCMO()); |
|
} |
|
|
|
def rpc_str(func,ar) { |
|
rpc_submit(func,ar); |
|
return(this.popString()); |
|
} |
|
def executeString(s) { |
|
this.pushCMO(s); |
|
this.pushCMD(SM_executeStringByLocalParser); |
} |
} |
|
|
} |
} |