Ignore:
Timestamp:
10/19/12 14:10:34 (12 years ago)
Author:
tbretz
Message:
Added some basic infrastructure to send alarms e.g. to smartfact.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/InterpreterV8.cc

    r14185 r14497  
    257257        if (*str)
    258258            JsPrint(*str);
     259    }
     260    return Undefined();
     261}
     262
     263Handle<Value> InterpreterV8::FuncAlarm(const Arguments& args)
     264{
     265    for (int i=0; i<args.Length(); i++)
     266    {
     267        const HandleScope handle_scope;
     268
     269        const String::Utf8Value str(args[i]);
     270        if (*str)
     271            JsAlarm(*str);
    259272    }
    260273    return Undefined();
     
    683696    Handle<ObjectTemplate> dim = ObjectTemplate::New();
    684697    dim->Set(String::New("print"),    FunctionTemplate::New(WrapPrint),    ReadOnly);
     698    dim->Set(String::New("alarm"),    FunctionTemplate::New(WrapAlarm),    ReadOnly);
    685699    dim->Set(String::New("out"),      FunctionTemplate::New(WrapOut),      ReadOnly);
    686700    dim->Set(String::New("wait"),     FunctionTemplate::New(WrapWait),     ReadOnly);
Note: See TracChangeset for help on using the changeset viewer.