namespace kw = senf::console::kw;
namespace fty = senf::console::factory;
- dir.add("buffersize", fty::Command(this, &DVBSectionProtocolWrapper::setBufferSize)
+ dir.add("buffersize", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
.doc("Set the size of the circular buffer used for filtered data.")
.arg("size", "in byte") );
- dir.add("start", fty::Command(this,&DVBSectionProtocolWrapper::startFiltering)
+ dir.add("start", fty::Command(&DVBSectionProtocolWrapper::startFiltering, this)
.doc("Starts filtering") );
- dir.add("stop", fty::Command(this, &DVBSectionProtocolWrapper::setBufferSize)
+ dir.add("stop", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
.doc("Stops filtering") );
dir.add("filter",
unsigned,
unsigned,
unsigned)
- >(this, &DVBSectionProtocolWrapper::setSectionFilter)
+ >(&DVBSectionProtocolWrapper::setSectionFilter, this)
.arg("pid", "pid to filter")
.arg("filter", "filter",
kw::default_value = 62,
kw::default_doc = "0x00")
.doc("Sets parameters for section filter.") );
- dir.add("stop", fty::Command(this, &DVBSectionProtocolWrapper::setBufferSize)
+ dir.add("stop", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
.doc("Stops filtering") );
}
dmx_output_t,
dmx_pes_type_t,
senf::console::FlagCollection<Flags>)
- >(this,&DVBPESProtocolWrapper::setPESFilter)
+ >(&DVBPESProtocolWrapper::setPESFilter, this)
.arg("pid", "pid to filter")
.arg("input", "input-filter: DMX_IN_FRONTEND DMX_IN_DVR ")
.arg("output", "output-filter: DMX_OUT_DECODER DMX_OUT_TAP DMX_OUT_TS_TAP ")
kw::default_doc = "(IMMEDIATE_START CHECK_CRC)")
.doc("Sets parameters for PES filter.") );
- dir.add("start", fty::Command(this, &DVBPESProtocolWrapper::startFiltering)
+ dir.add("start", fty::Command(&DVBPESProtocolWrapper::startFiltering, this)
.doc("Starts filtering") );
- dir.add("stop", fty::Command(this, &DVBPESProtocolWrapper::stopFiltering)
+ dir.add("stop", fty::Command(&DVBPESProtocolWrapper::stopFiltering, this)
.doc("Stops filtering") );
}
dir.doc("DVB Controller " + controllerNr);
++controllerNr;
- dir.add("type", fty::Command(this, &DVBSocketController::getTypeString)
+ dir.add("type", fty::Command(&DVBSocketController::getTypeString, this)
.doc("Shows actual type of card DVB-{T, S, C}") );
- dir.add("info", fty::Command(this, &DVBSocketController::getTuneInfo)
+ dir.add("info", fty::Command(&DVBSocketController::getTuneInfo, this)
.doc("Returns a string which shows actual tuning status.\n"
"'S' prints signal strength (in hex)\n"
"'s' prints singal to noise ration (in hex)\n"
"and could end in throwing an exception!")
.arg("conf", "Ssbuf", kw::default_value = "Ssbuf") );
- dir.add("tune", fty::Command(this,&DVBSocketController::tuneToCMD)
+ dir.add("tune", fty::Command(&DVBSocketController::tuneToCMD, this)
.doc("tunes to channel listet in the configfile.")
.arg("channel", "channel to tune")
.arg("mode", "mode 'sync' or 'async'", kw::default_value = "async") );
template <class Owner, class Member>
prefix_ senf::console::SimpleOverloadAttributor
senf::console::factory::
-Command(Owner * owner, Member memfn,
+Command(Member memfn, Owner * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type *,
typename boost::enable_if_c<detail::ParsedCommandTraits<Member>::is_simple>::type *)
{
template <class Owner, class Member>
prefix_ senf::console::SimpleOverloadAttributor
senf::console::factory::
-Command(Owner const * owner, Member memfn,
+Command(Member memfn, Owner const * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type *,
typename boost::enable_if_c<detail::ParsedCommandTraits<Member>::is_simple>::type *)
{
template <class Owner, class Member>
prefix_ typename senf::console::detail::ParsedCommandTraits<Member>::Attributor
senf::console::factory::
-Command(Owner * owner, Member memfn,
+Command(Member memfn, Owner * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type *)
{
return detail::addOverloadedCommandNode<Member>(senf::membind(memfn,owner));
template <class Owner, class Member>
prefix_ typename senf::console::detail::ParsedCommandTraits<Member>::Attributor
senf::console::factory::
-Command(Owner const * owner, Member memfn,
+Command(Member memfn, Owner const * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type *)
{
return detail::addOverloadedCommandNode<Member>(senf::membind(memfn,owner));
template <class CastTo, class Owner, class Member>
prefix_ typename senf::console::detail::ParsedCommandTraits<CastTo>::Attributor
senf::console::factory::
-Command(Owner * owner, Member memfn,
+Command(Member memfn, Owner * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type *)
{
return detail::addOverloadedCommandNode<CastTo>(senf::membind(memfn,owner));
template <class CastTo, class Owner, class Member>
prefix_ typename senf::console::detail::ParsedCommandTraits<CastTo>::Attributor
senf::console::factory::
-Command(Owner const * owner, Member memfn,
+Command(Member memfn, Owner const * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type *)
{
return detail::addOverloadedCommandNode<CastTo>(senf::membind(memfn,owner));
template <class Owner, class Member>
SimpleOverloadAttributor
- Command(Owner * owner, Member memfn,
+ Command(Member memfn, Owner * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type * = 0,
typename boost::enable_if_c<detail::ParsedCommandTraits<Member>::is_simple>::type * = 0);
template <class Owner, class Member>
SimpleOverloadAttributor
- Command(Owner const * owner, Member memfn,
+ Command(Member memfn, Owner const * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type * = 0,
typename boost::enable_if_c<detail::ParsedCommandTraits<Member>::is_simple>::type * = 0);
template <class Owner, class Member>
typename senf::console::detail::ParsedCommandTraits<Member>::Attributor
- Command(Owner * owner, Member memfn,
+ Command(Member memfn, Owner * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type * = 0);
template <class Owner, class Member>
typename senf::console::detail::ParsedCommandTraits<Member>::Attributor
- Command(Owner const * owner, Member memfn,
+ Command(Member memfn, Owner const * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type * = 0);
template <class CastTo, class Owner, class Member>
typename senf::console::detail::ParsedCommandTraits<CastTo>::Attributor
- Command(Owner * owner, Member memfn,
+ Command(Member memfn, Owner * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type * = 0);
template <class CastTo, class Owner, class Member>
typename senf::console::detail::ParsedCommandTraits<CastTo>::Attributor
- Command(Owner const * owner, Member memfn,
+ Command(Member memfn, Owner const * owner,
typename boost::enable_if<boost::is_member_function_pointer<Member> >::type * = 0);
senf::console::ScopedDirectory<Self> dir;
TestObject() : dir(this) {
- dir.add("member", senf::console::factory::Command(this, &Self::member));
+ dir.add("member", senf::console::factory::Command(&Self::member, this));
}
void member(std::ostream & os, senf::console::ParseCommandInfo const &) {
SENF_THROW_SYSTEM_EXCEPTION("logfile open") << ": " << filename;
consoleDir()
.add( "reopen",
- fty::Command(this, SENF_MEMFNP(void, FileTarget, reopen, ()))
+ fty::Command(SENF_MEMBINDFNP(void, FileTarget, reopen, ()))
.doc("Reopen logfile") );
consoleDir()
.add("reopen",
- fty::Command(this, SENF_MEMFNP(void, FileTarget, reopen, (std::string const &)))
+ fty::Command(SENF_MEMBINDFNP(void, FileTarget, reopen, (std::string const &)))
.arg("filename","new filename")
.overloadDoc("Reopen logfile under new name") );
consoleDir()
timeFormat("%Y-%m-%d %H:%M:%S.%f-0000");
- dir.add("showTime", fty::Command(this, &LogFormat::showTime)
+ dir.add("showTime", fty::Command(&LogFormat::showTime, this)
.arg("flag","whether to display the time in log messages",
kw::default_value = true)
.doc("Set time display in log messages. If time display is enabled, see the 'timeFormat'\n"
"command to set the time format.") );
- dir.add("showStream", fty::Command(this, &LogFormat::showStream)
+ dir.add("showStream", fty::Command(&LogFormat::showStream, this)
.arg("flag","whether to display the stream in log messages",
kw::default_value = true)
.doc("Set strean display in log messages.") );
- dir.add("showLevel", fty::Command(this, &LogFormat::showLevel)
+ dir.add("showLevel", fty::Command(&LogFormat::showLevel, this)
.arg("flag","whether to display the log level in log messages",
kw::default_value = true)
.doc("Set log level display in log messages.") );
- dir.add("showArea", fty::Command(this, &LogFormat::showArea)
+ dir.add("showArea", fty::Command(&LogFormat::showArea, this)
.arg("flag","whether to display the area in log messages",
kw::default_value = true)
.doc("Set area display in log messages.") );
- dir.add("timeFormat", fty::Command(this, &LogFormat::timeFormat)
+ dir.add("timeFormat", fty::Command(&LogFormat::timeFormat, this)
.arg("format","time format")
.doc("Set time format. The time format is specified using a format string. This format\n"
"string follows the strftime format.\n"
"As additional option, the format string may be set to the empty string. In this\n"
"case the time will be displayed as 'second.nanosecond' value. IN this case, the\n"
"time is displayed relative to the first message after changing the format.") );
- dir.add("tag", fty::Command(this, &LogFormat::tag)
+ dir.add("tag", fty::Command(&LogFormat::tag, this)
.arg("tag","log message tag prefix")
.doc("Every log message is optionally prefixed with a tag value. This value defaults to\n"
"the executable name and pid.") );
- dir.add("format", fty::Command(this, &LogFormat::consoleFormat)
+ dir.add("format", fty::Command(&LogFormat::consoleFormat, this)
.doc("Show the current log message format.") );
}
consoleDir().remove("format");
consoleDir()
- .add("format", fty::Command(this, &SyslogUDPTarget::consoleFormat)
+ .add("format", fty::Command(&SyslogUDPTarget::consoleFormat, this)
.doc("Show the current log message format.") );
consoleDir()
- .add("syslog", fty::Command(this, SENF_MEMFNP(void, SyslogUDPTarget, syslog, (bool)))
+ .add("syslog", fty::Command(SENF_MEMBINDFNP(void, SyslogUDPTarget, syslog, (bool)))
.arg("flag","new syslog format state",
kw::default_value=true)
.doc("Change the syslog format flag. By default, syslog formating is enabled. In this\n"
detail::TargetRegistry::instance().registerTarget(this, name);
consoleDir_()
- .add("list", fty::Command(this, &Target::consoleList)
+ .add("list", fty::Command(&Target::consoleList, this)
.doc("Show routing table\n"
"\n"
"Columns:\n"
" verbose, notice, message, important, critical, fatal\n"
" ACTION action to take: accept or reject") );
consoleDir_()
- .add("route", fty::Command(this, &Target::consoleRoute)
+ .add("route", fty::Command(&Target::consoleRoute, this)
.arg("index", "index at which to insert new rule")
.arg("parameters", "log parameters. The log parameters select the log stream, log area\n"
" and log level. You may specify any combination of these parameterse\n"
.arg("action", kw::default_value=ACCEPT) );
consoleDir_()
.add("unroute",
- fty::Command(this, static_cast<void (Target::*)(int)>(&Target::unroute))
+ fty::Command(static_cast<void (Target::*)(int)>(&Target::unroute), this)
.arg("index", "index of routing entry to remove")
.overloadDoc("Remove routing entry with the given index") );
consoleDir_()
- .add("unroute", fty::Command(this, &Target::consoleUnroute)
+ .add("unroute", fty::Command(&Target::consoleUnroute, this)
.arg("parameters", "log parameters. The log parameters select the log stream, log area\n"
" and log level. You may specify any combination of these parameterse\n"
" in any order. Use the '/sys/log/stream' and '/sys/log/areas' commands\n"
kw::default_value=ACCEPT)
.overloadDoc("Remove the routing entry matching the specified arguments.") );
consoleDir_()
- .add("flush", fty::Command(this, &Target::flush)
+ .add("flush", fty::Command(&Target::flush, this)
.doc("Remove all routing entries clearing the routing table. This will disable all\n"
"logging output on this target.") );
}
console::sysdir().add("log", consoleDir_());
consoleDir_()
- .add("areas", fty::Command(this, &TargetRegistry::consoleAreas)
+ .add("areas", fty::Command(&TargetRegistry::consoleAreas, this)
.doc("List all areas") );
consoleDir_()
- .add("streams", fty::Command(this, &TargetRegistry::consoleStreams)
+ .add("streams", fty::Command(&TargetRegistry::consoleStreams, this)
.doc("List all streams") );
consoleDir_()
- .add("message", fty::Command(this, &TargetRegistry::consoleWrite)
+ .add("message", fty::Command(&TargetRegistry::consoleWrite, this)
.arg("parameters", "log parameters. The log parameters select the log stream, log area\n"
" and log level. You may specify any combination of these parameterse\n"
" in any order. Use the '/sys/log/stream' and '/sys/log/areas' commands\n"
" message (FATAL) \"Program on fire\";\n"
" message (VERBOSE senf::log::Debug) \"Debug message\";") );
consoleDir_()
- .add("self", fty::Command(this, &TargetRegistry::consoleSelf)
+ .add("self", fty::Command(&TargetRegistry::consoleSelf, this)
.doc("Get the log directory of the current network client. Example usage:\n"
"\n"
"Just get the log config directory\n"
#ifndef SENF_DISABLE_CONSOLE
namespace fty = senf::console::factory;
- dir.add("list", fty::Command(this,&Statistics::consoleList)
+ dir.add("list", fty::Command(&Statistics::consoleList, this)
.doc("List statistics collection intervals and current values.\n"
"\n"
"Columns:\n"
" AVG Last entered average value.\n"
" DEV Standard deviation of average value over the collector rank.\n"
" MAX Last entered maximum value.") );
- dir.add("collect", fty::Command(this, &Statistics::consoleCollect)
+ dir.add("collect", fty::Command(&Statistics::consoleCollect, this)
.doc("Add statistics collection groups. The argument gives a sequence of collector\n"
"ranks each building on the preceding collector:\n"
"\n"
"You may call collect multiple times. Any missing collection ranks will be\n"
"added.")
.arg("ranks","chain of collector ranks") );
- dir.add("output", fty::Command(this, &Statistics::consoleOutput)
+ dir.add("output", fty::Command(&Statistics::consoleOutput, this)
.doc("Generate statistics output. This statement will add an additional output\n"
"generator. This generator will be attached to the collector specified by\n"
"the {rank} parameter. This parameter is a chain of successive rank values\n"
{
namespace fty = senf::console::factory;
- dir.add("list", fty::Command(this,&OutputEntry::consoleList)
+ dir.add("list", fty::Command(&OutputEntry::consoleList, this)
.doc("List all known connected targets. This list might not be complete.") );
}