git-svn-id: svn://db.shs.com.ru/pip@284 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2016-11-30 12:21:53 +00:00
parent e66e78ac16
commit 8b72323dd1
25 changed files with 254 additions and 227 deletions

View File

@@ -495,7 +495,7 @@ bool PIEthernet::listen(bool threaded) {
}
//#include <QDebug>
int PIEthernet::read(void * read_to, int max_size) {
int PIEthernet::readDevice(void * read_to, int max_size) {
//piCout << "read" << sock;
if (sock == -1) init();
if (sock == -1 || read_to == 0) return -1;
@@ -598,7 +598,7 @@ int PIEthernet::read(void * read_to, int max_size) {
}
int PIEthernet::write(const void * data, int max_size) {
int PIEthernet::writeDevice(const void * data, int max_size) {
if (sock == -1) init();
if (sock == -1 || !isWriteable()) {
//piCoutObj << "Can`t send to uninitialized socket";
@@ -740,8 +740,8 @@ void PIEthernet::propertyChanged(const PIString & name) {
}
PIString PIEthernet::constructFullPath() const {
PIString ret(fullPathPrefix() + "://");
PIString PIEthernet::constructFullPathDevice() const {
PIString ret;
ret << (type() == PIEthernet::UDP ? "UDP" : "TCP") << ":" << readIP() << ":" << readPort();
if (type() == PIEthernet::UDP) {
ret << ":" << sendIP() << ":" << sendPort();
@@ -752,7 +752,7 @@ PIString PIEthernet::constructFullPath() const {
}
void PIEthernet::configureFromFullPath(const PIString & full_path) {
void PIEthernet::configureFromFullPathDevice(const PIString & full_path) {
PIStringList pl = full_path.split(":");
bool mcast = false;
for (int i = 0; i < pl.size_s(); ++i) {