Changeset 10647


Ignore:
Timestamp:
May 10, 2011, 2:10:02 PM (9 years ago)
Author:
tbretz
Message:
Initialize DIM's environment variables through Dim::Setup; made command line switches in a way they give reasonable defaults.
File:
1 edited

Legend:

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

    r10637 r10647  
    1010#include <boost/asio/deadline_timer.hpp>
    1111
     12#include "Dim.h"
    1213#include "Event.h"
    1314#include "Shell.h"
     
    15461547        SetEndpoint(conf.Get<string>("addr"));
    15471548
    1548         fFTM.SetVerbose(conf.Get<bool>("verbose"));
     1549        fFTM.SetVerbose(!conf.Get<bool>("quiet"));
    15491550        fFTM.SetHexOutput(conf.Get<bool>("hex-out"));
    15501551        fFTM.SetDynamicOut(conf.Get<bool>("dynamic-out"));
     
    16551656    control.add_options()
    16561657        ("addr,a",      var<string>("localhost:5000"),  "Network address of FTM")
    1657         ("verbose,v",   po_switch(),  "Enable printing contents of all received messages (except dynamic data) in clear text.")
    1658         ("hex-out",     po_switch(),  "Enable printing contents of all printed messages also as hex data.")
    1659         ("dynamic-out", po_switch(),  "Enable printing received dynamic data.")
     1658        ("quiet,q",     po_switch(), "Disable printing contents of all received messages (except dynamic data) in clear text.")
     1659        ("hex-out",     po_switch(), "Enable printing contents of all printed messages also as hex data.")
     1660        ("dynamic-out", po_switch(), "Enable printing received dynamic data.")
    16601661        ;
    16611662
     
    18141815    }
    18151816
    1816     // To allow overwriting of DIM_DNS_NODE set 0 to 1
    1817     setenv("DIM_DNS_NODE", conf.Get<string>("dns").c_str(), 1);
    1818     //setenv("DIM_HOST_NODE", GetLocalIp().c_str(), 1);
     1817    Dim::Setup(conf.Get<string>("dns"));
    18191818
    18201819    //try
Note: See TracChangeset for help on using the changeset viewer.