[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Octave as a client in a server-client configuration
From: |
cblou |
Subject: |
Octave as a client in a server-client configuration |
Date: |
Fri, 28 Feb 2014 10:51:40 -0800 (PST) |
Hi,
I am using a motion tracking software ( TIY <https://code.google.com/p/tiy/>
) to obtain the position of a robot. I need to use octave to control the
robot. The tracking software works as a server/client over a network and it
sends a string containing the information position I need.
The following code is the information I have on the server configuration,
from an XML file
<multicast_port>30000</multicast_port>
<multicast_adress>"239.255.0.1"</multicast_adress>
<listen_address>"0.0.0.0"</listen_address>
<client_update_intervall_ms>1</client_update_intervall_ms> // Link to
the
code
<https://code.google.com/p/tiy/source/browse/trunk/src/config_run_parameters.xml>
I also have an example server written in C++ that outputs the information to
a console. Here is the relevant code of the client:
// Start Client
boost::asio::io_service io_service;
tiy::MulticastClient multicast_client(io_service,
boost::asio::ip::address::from_string(listen_address),
boost::asio::ip::address::from_string(multicast_adress),
multicast_port_short,
do_debugging);
// Run Update Loop
std::string data_string;
for(int i = 0; true; i++)
{
if (multicast_client.getReceivedString(data_string))
{
//////////////// DO WHAT YOU WANT ////////////////
std::cout << "Received: " << data_string << std::endl;
}
boost::this_thread::sleep(boost::posix_time::milliseconds(client_update_intervall_ms));
} // Complete code available at here
<https://code.google.com/p/tiy/source/browse/trunk/src/client.cpp> .
I want to implement the client in Octave but I have little experience with
networks. I have been looking at MPI and octave-daemon for quite a while but
I cannot find an example similar to what I need.
Thank you very much,
Charles
--
View this message in context:
http://octave.1599824.n4.nabble.com/Octave-as-a-client-in-a-server-client-configuration-tp4662516.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Octave as a client in a server-client configuration,
cblou <=