version 1.7, 2000/12/14 10:04:57 |
version 1.10, 2001/01/13 12:40:57 |
|
|
/* $OpenXM: OpenXM/src/k097/lib/ox/ox.k,v 1.6 2000/12/14 04:35:16 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/lib/ox/ox.k,v 1.9 2000/12/27 10:16:12 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 72 class OXcontrol extends Object { |
|
Line 72 class OXcontrol extends Object { |
|
} |
} |
def start() { |
def start() { |
local c,e, pass, peer, data, s, stmp; |
local c,e, pass, peer, data, s, stmp; |
this = new(super.new0()); |
this = new(Object.new0()); |
sm1(" [(oxGenPass)] extension /pass set "); |
sm1(" [(oxGenPass)] extension /pass set "); |
sm1(" [(oxGetPort1) (localhost)] extension /peer set "); |
sm1(" [(oxGetPort1) (localhost)] extension /peer set "); |
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 125 class OX extends OXcontrol { |
|
Line 125 class OX extends OXcontrol { |
|
if (Length(Arglist) == 1) { |
if (Length(Arglist) == 1) { |
control = null; |
control = null; |
} |
} |
this = new(super.generate(control)); |
this = new(OXcontrol.generate(control)); |
control = super.getControl(); |
control = this.getControl(); |
sm1(" [(oxGetPort1) (localhost)] extension /peer set "); |
sm1(" [(oxGetPort1) (localhost)] extension /peer set "); |
sm1(" /data peer 1 get def "); |
sm1(" /data peer 1 get def "); |
/* BUG: control.pushCMO(data) does not work. |
/* BUG: control.pushCMO(data) does not work. |
Line 156 class OX extends OXcontrol { |
|
Line 156 class OX extends OXcontrol { |
|
return(engine.channel.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 184 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) { |
def executeString(s) { |
this.pushCMO(s); |
this.pushCMO(s); |
this.pushCMD(SM_executeStringByLocalParser); |
this.pushCMD(SM_executeStringByLocalParser); |
Line 212 def startAsir() { |
|
Line 222 def startAsir() { |
|
return(a); |
return(a); |
} |
} |
|
|
|
class Asir extends OX { |
|
local ; |
|
def generate() { |
|
local asirpeer,a; |
|
this = new(OX.generate("ox_asir",null)); |
|
a = this; |
|
asirpeer = (a.getEngine()).getChannel(); |
|
Println(asirpeer); |
|
sm1(" [asirpeer oxasirpath.asirlib] loadAsirFile "); |
|
return(this); |
|
} |
|
} |