version 1.2, 2000/12/06 23:45:32 |
version 1.3, 2000/12/10 11:07:45 |
|
|
/* $OpenXM: OpenXM/src/k097/lib/ox/ox.k,v 1.1 2000/12/06 11:37:34 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/lib/ox/ox.k,v 1.2 2000/12/06 23:45:32 takayama Exp $ */ |
|
|
|
Load_sm1(["ox.sm1",AddString([GetEnv("OpenXM_HOME"),"/lib/sm1/ox.sm1"])], |
|
"ox.sm1.loaded"); |
|
def void Error(s) { |
|
sm1(" s error "); |
|
} |
|
|
|
class OXchannel extends Object { |
|
local channel; |
|
/* Just add a tag. */ |
|
def generate(c) { |
|
this = new(); |
|
if (IsArray(c)) { |
|
if (c[0] != "client") { |
|
Error("OXchannel.generate(c) : c is not client object."); |
|
} |
|
}else{ |
|
Error("OXchannel.generate(c) : c is not client object."); |
|
} |
|
channel = c; |
|
return(this); |
|
} |
|
|
|
def pushCMO(ob) { |
|
local cc; |
|
cc = channel; |
|
sm1(" cc ob oxpushcmo "); |
|
} |
|
|
|
def pushCMD(ob) { |
|
local cc; |
|
cc = channel; |
|
if (IsInteger(ob)) { |
|
ob = IntegerToSm1Integer(ob); |
|
} |
|
sm1(" cc ob oxpushcmd "); |
|
} |
|
} |
|
|
class OXcontrol extends Object { |
class OXcontrol extends Object { |
local control; |
local control; |
def new0(c) { |
def generate(c) { |
if (Tag(c) != 0) { |
if (Tag(c) != 0) { |
control = c; |
control = c; |
return(this); |
return(this); |
Line 24 class OXcontrol extends Object { |
|
Line 62 class OXcontrol extends Object { |
|
sm1(" stmp message "); |
sm1(" stmp message "); |
sm1(" stmp system "); |
sm1(" stmp system "); |
sm1(" [(oxCreateControl_RFC_101) peer 0 pass] extension /c set "); |
sm1(" [(oxCreateControl_RFC_101) peer 0 pass] extension /c set "); |
control = c; |
control = OXchannel.generate(c); |
return(this); |
return(this); |
} |
} |
|
def pushCMO(a) { |
|
control.channel.pushCMO(a); |
|
} |
|
def pushCMD(a) { |
|
control.channel.pushCMD(a); |
|
} |
|
|
} |
} |
|
|
|
|
class OXengine extends OXcontrol { |
class OX extends OXcontrol { |
local engine; |
local engine; |
def start(control,name) { |
/* OX.generate(null,"ox_sm1"); */ |
|
def generate(control,name) { |
local c,e, pass, peer, data, s, stmp, engineID; |
local c,e, pass, peer, data, s, stmp, engineID; |
this = super.new0(control); |
this = new(super.generate(control)); |
control = this.control; |
control = this.control; |
sm1(" [(oxGetPort1) (localhost)] extension /peer set "); |
sm1(" [(oxGetPort1) (localhost)] extension /peer set "); |
sm1(" /data peer 1 get def "); |
sm1(" /data peer 1 get def "); |
Line 44 class OXengine extends OXcontrol { |
|
Line 89 class OXengine extends OXcontrol { |
|
control.pushCMD(SM_control_spawn_server); |
control.pushCMD(SM_control_spawn_server); |
engineID = control.popCMO(); |
engineID = control.popCMO(); |
sm1(" [(oxCreateEngine_RFC_101) peer 0 (Empty) engineID] extension /c set "); |
sm1(" [(oxCreateEngine_RFC_101) peer 0 (Empty) engineID] extension /c set "); |
engine = c; |
engine = OXchannel.generate(c); |
return(this); |
return(this); |
} |
} |
|
|
} |
} |
|
|