directories utils->lib and tools->tool renamed; ebusd_send changed to fit with all commands.
This commit is contained in:
@@ -4,6 +4,7 @@ ebusd - ChangeLog
|
||||
2014-06-03 Roland Jax <roland.jax@liwest.at>
|
||||
* ebusd_send added.
|
||||
* class Appl: program arguments parsing improved.
|
||||
* directories utils->lib and tools->tool renamed.
|
||||
* Version changed from 0.2.0 to 0.2.1
|
||||
|
||||
2014-05-11 Roland Jax <roland.jax@liwest.at>
|
||||
|
||||
+11
-11
@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
AM_CXXFLAGS = $(LIBEBUS_CFLAGS) -I$(top_srcdir)/utils -fpic -Wall -Wextra
|
||||
AM_CXXFLAGS = $(LIBEBUS_CFLAGS) -I$(top_srcdir)/lib -fpic -Wall -Wextra
|
||||
|
||||
bin_PROGRAMS = ebusd \
|
||||
ebusd_feed \
|
||||
@@ -13,22 +13,22 @@ ebusd_SOURCES = src/main.cpp \
|
||||
src/ebusloop.cpp \
|
||||
src/cycdata.cpp \
|
||||
src/network.cpp \
|
||||
utils/thread.cpp \
|
||||
utils/logger.cpp \
|
||||
utils/tcpsocket.cpp \
|
||||
utils/daemon.cpp \
|
||||
utils/appl.cpp
|
||||
lib/thread.cpp \
|
||||
lib/logger.cpp \
|
||||
lib/tcpsocket.cpp \
|
||||
lib/daemon.cpp \
|
||||
lib/appl.cpp
|
||||
|
||||
ebusd_LDADD = $(LIBEBUS_LIBS) \
|
||||
-lpthread
|
||||
|
||||
dist_noinst_SCRIPTS = autogen.sh
|
||||
|
||||
ebusd_feed_SOURCES = tools/ebusd_feed.cpp \
|
||||
utils/appl.cpp
|
||||
ebusd_feed_SOURCES = tool/ebusd_feed.cpp \
|
||||
lib/appl.cpp
|
||||
|
||||
ebusd_feed_LDADD = $(LIBEBUS_LIBS)
|
||||
|
||||
ebusd_send_SOURCES = tools/ebusd_send.cpp \
|
||||
utils/appl.cpp \
|
||||
utils/tcpsocket.cpp
|
||||
ebusd_send_SOURCES = tool/ebusd_send.cpp \
|
||||
lib/appl.cpp \
|
||||
lib/tcpsocket.cpp
|
||||
|
||||
@@ -48,7 +48,7 @@ Tools
|
||||
-----
|
||||
|
||||
ebusd_feed - send dump files via virtual serial device for debugging purpose.
|
||||
ebusd_send - small client for sending commands (get, set, cyc and hex) to ebusd.
|
||||
ebusd_send - small client for sending commands to ebusd.
|
||||
|
||||
For usage and further information take a look on help page.
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@ void Appl::addItem(const char* name, Param param, const char* shortname,
|
||||
void Appl::printArgs()
|
||||
{
|
||||
std::cerr << std::endl << "Usage:" << std::endl << " "
|
||||
<< m_argv[0].substr(2) << " [Options]" ;
|
||||
<< m_argv[0].substr(2) << " [OPTIONS...]" ;
|
||||
|
||||
if (m_argTxt.size() != 0)
|
||||
std::cerr << " " << m_argTxt;
|
||||
|
||||
std::cerr << std::endl << std::endl << "Options:" << std::endl;
|
||||
std::cerr << std::endl << std::endl;
|
||||
|
||||
for (a_it = m_args.begin(); a_it < m_args.end(); a_it++) {
|
||||
const char* c = (strlen(a_it->shortname) == 1) ? a_it->shortname : " ";
|
||||
@@ -26,12 +26,8 @@ Appl& A = Appl::Instance();
|
||||
|
||||
void define_args()
|
||||
{
|
||||
A.addArgs("Arg1 Arg2 Arg3 (Arg4)\n\n"
|
||||
"Arg1-4:\n"
|
||||
" get class cmd (sub)\n"
|
||||
" set class cmd value\n"
|
||||
" cyc class cmd (sub)\n"
|
||||
" hex type value (value: ZZ PB SB NN Dx)", 3);
|
||||
A.addArgs("COMMAND {ARGS...}\n\n"
|
||||
" send 'help' for available commands", 1);
|
||||
|
||||
A.addItem("p_server", Appl::Param("localhost"), "s", "server",
|
||||
"name or ip (localhost)",
|
||||
@@ -78,7 +74,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
socket->send(message.c_str(), message.size());
|
||||
|
||||
char data[256];
|
||||
char data[1024];
|
||||
size_t datalen;
|
||||
|
||||
datalen = socket->recv(data, sizeof(data)-1);
|
||||
Reference in New Issue
Block a user