Beispiel #1
0
void CPlotXY::convergence_history( SignalArgs & args )
{
  if( is_not_null(m_data.get()) )
  {
    SignalFrame reply = args.create_reply( uri() );
    SignalFrame& options = reply.map( Protocol::Tags::key_options() );
//    std::vector<Real> data(8000);
    CTable<Real>& table = *m_data.get();
    std::vector<std::string> labels =
        list_of<std::string>("x")("y")("z")("u")("v")("w")("p")("t");

    add_multi_array_in(options.main_map, "Table", m_data->array(), ";", labels);

//    for(Uint row = 0 ; row < 1000 ; ++row)
//    {
//      for(Uint col = 0 ; col < 8 ; ++col)
//        data[ (row * 8) + col ] = table[row][col];
//    }

//    XmlNode node = options.add("Table", data, " ; ");

//    node.set_attribute("dimensions", "8");
  }
  else
    throw SetupError( FromHere(), "Data to plot not setup" );
}
Beispiel #2
0
SignalRet SignalHandler::call_signal ( const SignalID& sname, std::vector<std::string>& sinput )
{
  SignalFrame frame;
  SignalFrame& options = frame.map( Protocol::Tags::key_options() );

  options.insert( sinput );

  call_signal(sname, frame);
}
Beispiel #3
0
void CLink::change_link( SignalArgs & args )
{
  SignalOptions options( args );
  SignalFrame reply = args.create_reply();

  std::string path = options.value<std::string>("target_path");
  Component::Ptr target = m_root.lock()->access_component_ptr(path);

  link_to (target);

  reply.map("options").set_option("target_path", path);
}
Beispiel #4
0
void Link::change_link( SignalArgs & args )
{
  SignalOptions options( args );
  SignalFrame reply = args.create_reply();

  std::string path = options.value<std::string>("target_path");
  Handle<Component> target = access_component(path);

  link_to (*target);

  reply.map("options").set_option("target_path", class_name<std::string>(), path);
}