From c089318b7e9000ec09cad5639da46a3888a12588 Mon Sep 17 00:00:00 2001 From: Ake Hedman Date: Mon, 13 May 2024 14:07:33 +0200 Subject: [PATCH] Renamed client classes --- src/vscp/common/{canal_macro.h => canal-macro.h} | 0 src/vscp/common/{canal_xmlconfig.cpp => canal-xmlconfig.cpp} | 0 src/vscp/common/{canal_xmlconfig.h => canal-xmlconfig.h} | 0 .../{vscp_bootdevice_pic1.cpp => vscp-bootdevice-pic1.cpp} | 0 .../common/{vscp_bootdevice_pic1.h => vscp-bootdevice-pic1.h} | 0 .../{vscp_bootdevice_vscp.cpp => vscp-bootdevice-vscp.cpp} | 0 .../common/{vscp_bootdevice_vscp.h => vscp-bootdevice-vscp.h} | 0 src/vscp/common/{vscp_bootdevice.cpp => vscp-bootdevice.cpp} | 0 src/vscp/common/{vscp_bootdevice.h => vscp-bootdevice.h} | 0 .../common/{vscp_client_base.cpp => vscp-client-base.cpp} | 4 ++-- src/vscp/common/{vscp_client_base.h => vscp-client-base.h} | 0 .../common/{vscp_client_canal.cpp => vscp-client-canal.cpp} | 0 src/vscp/common/{vscp_client_canal.h => vscp-client-canal.h} | 0 .../common/{vscp_client_canal.md => vscp-client-canal.md} | 0 .../common/{vscp_client_level2.cpp => vscp-client-level2.cpp} | 0 .../common/{vscp_client_level2.h => vscp-client-level2.h} | 0 .../common/{vscp_client_level2.md => vscp-client-level2.md} | 0 .../common/{vscp_client_mqtt.cpp => vscp-client-mqtt.cpp} | 0 src/vscp/common/{vscp_client_mqtt.h => vscp-client-mqtt.h} | 0 src/vscp/common/{vscp_client_mqtt.md => vscp-client-mqtt.md} | 0 .../{vscp_client_multicast.cpp => vscp-client-multicast.cpp} | 0 .../{vscp_client_multicast.h => vscp-client-multicast.h} | 0 .../common/{vscp_client_rawcan.cpp => vscp-client-rawcan.cpp} | 0 .../common/{vscp_client_rawcan.h => vscp-client-rawcan.h} | 0 .../{vscp_client_rawmqtt.cpp => vscp-client-rawmqtt.cpp} | 0 .../common/{vscp_client_rawmqtt.h => vscp-client-rawmqtt.h} | 0 .../{vscp_client_socketcan.cpp => vscp-client-socketcan.cpp} | 4 ++-- .../{vscp_client_socketcan.h => vscp-client-socketcan.h} | 0 src/vscp/common/{vscp_client_tcp.cpp => vscp-client-tcp.cpp} | 0 src/vscp/common/{vscp_client_tcp.h => vscp-client-tcp.h} | 0 src/vscp/common/{vscp_client_udp.cpp => vscp-client-udp.cpp} | 0 src/vscp/common/{vscp_client_udp.h => vscp-client-udp.h} | 0 src/vscp/common/{vscp_client_ws1.cpp => vscp-client-ws1.cpp} | 0 src/vscp/common/{vscp_client_ws1.h => vscp-client-ws1.h} | 0 src/vscp/common/{vscp_client_ws2.cpp => vscp-client-ws2.cpp} | 0 src/vscp/common/{vscp_client_ws2.h => vscp-client-ws2.h} | 0 src/vscp/common/{vscp_serial.h => vscp-serial.h} | 0 src/vscp/common/{vscp_type.h => vscp-type.h} | 0 src/vscp/common/{vscpd_caps.h => vscpd-caps.h} | 0 39 files changed, 4 insertions(+), 4 deletions(-) rename src/vscp/common/{canal_macro.h => canal-macro.h} (100%) rename src/vscp/common/{canal_xmlconfig.cpp => canal-xmlconfig.cpp} (100%) rename src/vscp/common/{canal_xmlconfig.h => canal-xmlconfig.h} (100%) rename src/vscp/common/{vscp_bootdevice_pic1.cpp => vscp-bootdevice-pic1.cpp} (100%) rename src/vscp/common/{vscp_bootdevice_pic1.h => vscp-bootdevice-pic1.h} (100%) rename src/vscp/common/{vscp_bootdevice_vscp.cpp => vscp-bootdevice-vscp.cpp} (100%) rename src/vscp/common/{vscp_bootdevice_vscp.h => vscp-bootdevice-vscp.h} (100%) rename src/vscp/common/{vscp_bootdevice.cpp => vscp-bootdevice.cpp} (100%) rename src/vscp/common/{vscp_bootdevice.h => vscp-bootdevice.h} (100%) rename src/vscp/common/{vscp_client_base.cpp => vscp-client-base.cpp} (98%) rename src/vscp/common/{vscp_client_base.h => vscp-client-base.h} (100%) rename src/vscp/common/{vscp_client_canal.cpp => vscp-client-canal.cpp} (100%) rename src/vscp/common/{vscp_client_canal.h => vscp-client-canal.h} (100%) rename src/vscp/common/{vscp_client_canal.md => vscp-client-canal.md} (100%) rename src/vscp/common/{vscp_client_level2.cpp => vscp-client-level2.cpp} (100%) rename src/vscp/common/{vscp_client_level2.h => vscp-client-level2.h} (100%) rename src/vscp/common/{vscp_client_level2.md => vscp-client-level2.md} (100%) rename src/vscp/common/{vscp_client_mqtt.cpp => vscp-client-mqtt.cpp} (100%) rename src/vscp/common/{vscp_client_mqtt.h => vscp-client-mqtt.h} (100%) rename src/vscp/common/{vscp_client_mqtt.md => vscp-client-mqtt.md} (100%) rename src/vscp/common/{vscp_client_multicast.cpp => vscp-client-multicast.cpp} (100%) rename src/vscp/common/{vscp_client_multicast.h => vscp-client-multicast.h} (100%) rename src/vscp/common/{vscp_client_rawcan.cpp => vscp-client-rawcan.cpp} (100%) rename src/vscp/common/{vscp_client_rawcan.h => vscp-client-rawcan.h} (100%) rename src/vscp/common/{vscp_client_rawmqtt.cpp => vscp-client-rawmqtt.cpp} (100%) rename src/vscp/common/{vscp_client_rawmqtt.h => vscp-client-rawmqtt.h} (100%) rename src/vscp/common/{vscp_client_socketcan.cpp => vscp-client-socketcan.cpp} (99%) rename src/vscp/common/{vscp_client_socketcan.h => vscp-client-socketcan.h} (100%) rename src/vscp/common/{vscp_client_tcp.cpp => vscp-client-tcp.cpp} (100%) rename src/vscp/common/{vscp_client_tcp.h => vscp-client-tcp.h} (100%) rename src/vscp/common/{vscp_client_udp.cpp => vscp-client-udp.cpp} (100%) rename src/vscp/common/{vscp_client_udp.h => vscp-client-udp.h} (100%) rename src/vscp/common/{vscp_client_ws1.cpp => vscp-client-ws1.cpp} (100%) rename src/vscp/common/{vscp_client_ws1.h => vscp-client-ws1.h} (100%) rename src/vscp/common/{vscp_client_ws2.cpp => vscp-client-ws2.cpp} (100%) rename src/vscp/common/{vscp_client_ws2.h => vscp-client-ws2.h} (100%) rename src/vscp/common/{vscp_serial.h => vscp-serial.h} (100%) rename src/vscp/common/{vscp_type.h => vscp-type.h} (100%) rename src/vscp/common/{vscpd_caps.h => vscpd-caps.h} (100%) diff --git a/src/vscp/common/canal_macro.h b/src/vscp/common/canal-macro.h similarity index 100% rename from src/vscp/common/canal_macro.h rename to src/vscp/common/canal-macro.h diff --git a/src/vscp/common/canal_xmlconfig.cpp b/src/vscp/common/canal-xmlconfig.cpp similarity index 100% rename from src/vscp/common/canal_xmlconfig.cpp rename to src/vscp/common/canal-xmlconfig.cpp diff --git a/src/vscp/common/canal_xmlconfig.h b/src/vscp/common/canal-xmlconfig.h similarity index 100% rename from src/vscp/common/canal_xmlconfig.h rename to src/vscp/common/canal-xmlconfig.h diff --git a/src/vscp/common/vscp_bootdevice_pic1.cpp b/src/vscp/common/vscp-bootdevice-pic1.cpp similarity index 100% rename from src/vscp/common/vscp_bootdevice_pic1.cpp rename to src/vscp/common/vscp-bootdevice-pic1.cpp diff --git a/src/vscp/common/vscp_bootdevice_pic1.h b/src/vscp/common/vscp-bootdevice-pic1.h similarity index 100% rename from src/vscp/common/vscp_bootdevice_pic1.h rename to src/vscp/common/vscp-bootdevice-pic1.h diff --git a/src/vscp/common/vscp_bootdevice_vscp.cpp b/src/vscp/common/vscp-bootdevice-vscp.cpp similarity index 100% rename from src/vscp/common/vscp_bootdevice_vscp.cpp rename to src/vscp/common/vscp-bootdevice-vscp.cpp diff --git a/src/vscp/common/vscp_bootdevice_vscp.h b/src/vscp/common/vscp-bootdevice-vscp.h similarity index 100% rename from src/vscp/common/vscp_bootdevice_vscp.h rename to src/vscp/common/vscp-bootdevice-vscp.h diff --git a/src/vscp/common/vscp_bootdevice.cpp b/src/vscp/common/vscp-bootdevice.cpp similarity index 100% rename from src/vscp/common/vscp_bootdevice.cpp rename to src/vscp/common/vscp-bootdevice.cpp diff --git a/src/vscp/common/vscp_bootdevice.h b/src/vscp/common/vscp-bootdevice.h similarity index 100% rename from src/vscp/common/vscp_bootdevice.h rename to src/vscp/common/vscp-bootdevice.h diff --git a/src/vscp/common/vscp_client_base.cpp b/src/vscp/common/vscp-client-base.cpp similarity index 98% rename from src/vscp/common/vscp_client_base.cpp rename to src/vscp/common/vscp-client-base.cpp index d0b627727..94ec965ce 100644 --- a/src/vscp/common/vscp_client_base.cpp +++ b/src/vscp/common/vscp-client-base.cpp @@ -81,7 +81,7 @@ CVscpClient::setCallbackEx(std::function call { m_callbackex = callback; m_callbackObject = pData; - m_bActiveCallbackEv = true; - + m_bActiveCallbackEx = true; + return VSCP_ERROR_SUCCESS; }; \ No newline at end of file diff --git a/src/vscp/common/vscp_client_base.h b/src/vscp/common/vscp-client-base.h similarity index 100% rename from src/vscp/common/vscp_client_base.h rename to src/vscp/common/vscp-client-base.h diff --git a/src/vscp/common/vscp_client_canal.cpp b/src/vscp/common/vscp-client-canal.cpp similarity index 100% rename from src/vscp/common/vscp_client_canal.cpp rename to src/vscp/common/vscp-client-canal.cpp diff --git a/src/vscp/common/vscp_client_canal.h b/src/vscp/common/vscp-client-canal.h similarity index 100% rename from src/vscp/common/vscp_client_canal.h rename to src/vscp/common/vscp-client-canal.h diff --git a/src/vscp/common/vscp_client_canal.md b/src/vscp/common/vscp-client-canal.md similarity index 100% rename from src/vscp/common/vscp_client_canal.md rename to src/vscp/common/vscp-client-canal.md diff --git a/src/vscp/common/vscp_client_level2.cpp b/src/vscp/common/vscp-client-level2.cpp similarity index 100% rename from src/vscp/common/vscp_client_level2.cpp rename to src/vscp/common/vscp-client-level2.cpp diff --git a/src/vscp/common/vscp_client_level2.h b/src/vscp/common/vscp-client-level2.h similarity index 100% rename from src/vscp/common/vscp_client_level2.h rename to src/vscp/common/vscp-client-level2.h diff --git a/src/vscp/common/vscp_client_level2.md b/src/vscp/common/vscp-client-level2.md similarity index 100% rename from src/vscp/common/vscp_client_level2.md rename to src/vscp/common/vscp-client-level2.md diff --git a/src/vscp/common/vscp_client_mqtt.cpp b/src/vscp/common/vscp-client-mqtt.cpp similarity index 100% rename from src/vscp/common/vscp_client_mqtt.cpp rename to src/vscp/common/vscp-client-mqtt.cpp diff --git a/src/vscp/common/vscp_client_mqtt.h b/src/vscp/common/vscp-client-mqtt.h similarity index 100% rename from src/vscp/common/vscp_client_mqtt.h rename to src/vscp/common/vscp-client-mqtt.h diff --git a/src/vscp/common/vscp_client_mqtt.md b/src/vscp/common/vscp-client-mqtt.md similarity index 100% rename from src/vscp/common/vscp_client_mqtt.md rename to src/vscp/common/vscp-client-mqtt.md diff --git a/src/vscp/common/vscp_client_multicast.cpp b/src/vscp/common/vscp-client-multicast.cpp similarity index 100% rename from src/vscp/common/vscp_client_multicast.cpp rename to src/vscp/common/vscp-client-multicast.cpp diff --git a/src/vscp/common/vscp_client_multicast.h b/src/vscp/common/vscp-client-multicast.h similarity index 100% rename from src/vscp/common/vscp_client_multicast.h rename to src/vscp/common/vscp-client-multicast.h diff --git a/src/vscp/common/vscp_client_rawcan.cpp b/src/vscp/common/vscp-client-rawcan.cpp similarity index 100% rename from src/vscp/common/vscp_client_rawcan.cpp rename to src/vscp/common/vscp-client-rawcan.cpp diff --git a/src/vscp/common/vscp_client_rawcan.h b/src/vscp/common/vscp-client-rawcan.h similarity index 100% rename from src/vscp/common/vscp_client_rawcan.h rename to src/vscp/common/vscp-client-rawcan.h diff --git a/src/vscp/common/vscp_client_rawmqtt.cpp b/src/vscp/common/vscp-client-rawmqtt.cpp similarity index 100% rename from src/vscp/common/vscp_client_rawmqtt.cpp rename to src/vscp/common/vscp-client-rawmqtt.cpp diff --git a/src/vscp/common/vscp_client_rawmqtt.h b/src/vscp/common/vscp-client-rawmqtt.h similarity index 100% rename from src/vscp/common/vscp_client_rawmqtt.h rename to src/vscp/common/vscp-client-rawmqtt.h diff --git a/src/vscp/common/vscp_client_socketcan.cpp b/src/vscp/common/vscp-client-socketcan.cpp similarity index 99% rename from src/vscp/common/vscp_client_socketcan.cpp rename to src/vscp/common/vscp-client-socketcan.cpp index f0c2567be..782615371 100644 --- a/src/vscp/common/vscp_client_socketcan.cpp +++ b/src/vscp/common/vscp-client-socketcan.cpp @@ -129,7 +129,7 @@ vscpClientSocketCan::vscpClientSocketCan() m_interface = "vcan0"; m_guid.getFromString("00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"); m_flags = 0; - m_socket = -1; + m_socket = 0; m_mode = CAN_MTU; setResponseTimeout(3); // Response timeout 3 ms @@ -993,7 +993,7 @@ workerThread(void *pData) // printf("Socketcan event: %X:%X\n", pEvent->vscp_class, pEvent->vscp_type); // Add to input queue only if no callback set - if (pObj->isCallbackEvActive() && pObj->isCallbackExActive()) { + if (!pObj->isCallbackEvActive() || !pObj->isCallbackExActive()) { // std::cout << "add to receive queue" << std::endl; pthread_mutex_lock(&pObj->m_mutexReceiveQueue); pObj->m_receiveList.push_back(pEvent); diff --git a/src/vscp/common/vscp_client_socketcan.h b/src/vscp/common/vscp-client-socketcan.h similarity index 100% rename from src/vscp/common/vscp_client_socketcan.h rename to src/vscp/common/vscp-client-socketcan.h diff --git a/src/vscp/common/vscp_client_tcp.cpp b/src/vscp/common/vscp-client-tcp.cpp similarity index 100% rename from src/vscp/common/vscp_client_tcp.cpp rename to src/vscp/common/vscp-client-tcp.cpp diff --git a/src/vscp/common/vscp_client_tcp.h b/src/vscp/common/vscp-client-tcp.h similarity index 100% rename from src/vscp/common/vscp_client_tcp.h rename to src/vscp/common/vscp-client-tcp.h diff --git a/src/vscp/common/vscp_client_udp.cpp b/src/vscp/common/vscp-client-udp.cpp similarity index 100% rename from src/vscp/common/vscp_client_udp.cpp rename to src/vscp/common/vscp-client-udp.cpp diff --git a/src/vscp/common/vscp_client_udp.h b/src/vscp/common/vscp-client-udp.h similarity index 100% rename from src/vscp/common/vscp_client_udp.h rename to src/vscp/common/vscp-client-udp.h diff --git a/src/vscp/common/vscp_client_ws1.cpp b/src/vscp/common/vscp-client-ws1.cpp similarity index 100% rename from src/vscp/common/vscp_client_ws1.cpp rename to src/vscp/common/vscp-client-ws1.cpp diff --git a/src/vscp/common/vscp_client_ws1.h b/src/vscp/common/vscp-client-ws1.h similarity index 100% rename from src/vscp/common/vscp_client_ws1.h rename to src/vscp/common/vscp-client-ws1.h diff --git a/src/vscp/common/vscp_client_ws2.cpp b/src/vscp/common/vscp-client-ws2.cpp similarity index 100% rename from src/vscp/common/vscp_client_ws2.cpp rename to src/vscp/common/vscp-client-ws2.cpp diff --git a/src/vscp/common/vscp_client_ws2.h b/src/vscp/common/vscp-client-ws2.h similarity index 100% rename from src/vscp/common/vscp_client_ws2.h rename to src/vscp/common/vscp-client-ws2.h diff --git a/src/vscp/common/vscp_serial.h b/src/vscp/common/vscp-serial.h similarity index 100% rename from src/vscp/common/vscp_serial.h rename to src/vscp/common/vscp-serial.h diff --git a/src/vscp/common/vscp_type.h b/src/vscp/common/vscp-type.h similarity index 100% rename from src/vscp/common/vscp_type.h rename to src/vscp/common/vscp-type.h diff --git a/src/vscp/common/vscpd_caps.h b/src/vscp/common/vscpd-caps.h similarity index 100% rename from src/vscp/common/vscpd_caps.h rename to src/vscp/common/vscpd-caps.h