[BACK]Return to ox.k CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / lib / ox

Annotation of OpenXM/src/k097/lib/ox/ox.k, Revision 1.2

1.2     ! takayama    1: /* $OpenXM: OpenXM/src/k097/lib/ox/ox.k,v 1.1 2000/12/06 11:37:34 takayama Exp $  */
1.1       takayama    2:
1.2     ! takayama    3: class OXcontrol extends Object {
        !             4:   local control;
        !             5:   def new0(c) {
        !             6:      if (Tag(c) != 0) {
        !             7:        control = c;
        !             8:        return(this);
        !             9:      }else{
        !            10:        return(start());
        !            11:      }
        !            12:   }
        !            13:   def start() {
1.1       takayama   14:     local c,e, pass, peer, data, s, stmp;
                     15:     this = new(super.new0());
                     16:     sm1(" [(oxGenPass)] extension /pass set ");
                     17:     sm1(" [(oxGetPort1) (localhost)] extension /peer set ");
                     18:     sm1(" /data peer 1 get toString def ");
                     19:     s = AddString(
                     20:       ["/home/nobuki/OpenXM/src/oxc/oxc",
                     21:        " -c ", pass, " -h "," localhost ", " -p ", data, " -x ",
                     22:        " & "]);
                     23:     sm1(" [ (/bin/csh -c \") s (\") ] cat /stmp set ");
                     24:     sm1(" stmp message ");
                     25:     sm1(" stmp system  ");
                     26:     sm1(" [(oxCreateControl_RFC_101) peer 0 pass] extension /c set ");
1.2     ! takayama   27:     control = c;
1.1       takayama   28:     return(this);
1.2     ! takayama   29:   }
        !            30:
1.1       takayama   31: }
                     32:
                     33:
1.2     ! takayama   34: class OXengine extends OXcontrol {
        !            35:   local engine;
        !            36:   def start(control,name) {
        !            37:     local c,e, pass, peer, data, s, stmp, engineID;
        !            38:     this = super.new0(control);
        !            39:     control = this.control;
        !            40:     sm1(" [(oxGetPort1) (localhost)] extension /peer set ");
        !            41:     sm1(" /data peer 1 get def ");
        !            42:     control.pushCMO(data);
        !            43:     control.pushCMO(name);
        !            44:     control.pushCMD(SM_control_spawn_server);
        !            45:     engineID = control.popCMO();
        !            46:     sm1(" [(oxCreateEngine_RFC_101) peer 0 (Empty) engineID] extension /c set ");
        !            47:     engine = c;
        !            48:     return(this);
        !            49: }
        !            50:
        !            51: }
1.1       takayama   52:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>