diff --git a/src/vscp/common/vscp-client-rawcan.cpp b/src/vscp/common/vscp-client-rawcan.cpp deleted file mode 100644 index 805c342eb..000000000 --- a/src/vscp/common/vscp-client-rawcan.cpp +++ /dev/null @@ -1,291 +0,0 @@ -// vscp_client_rawcan.cpp -// -// Raw CAN client communication classes. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version -// 2 of the License, or (at your option) any later version. -// -// This file is part of the VSCP (https://www.vscp.org) -// -// Copyright: (C) 2007-2024 -// Ake Hedman, the VSCP project, -// -// This file is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this file see the file COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. -// - -#ifdef WIN32 -#include -#endif - -#include "vscp-client-rawcan.h" -#include "vscphelper.h" - -/////////////////////////////////////////////////////////////////////////////// -// CTor -// - -vscpClientRawCan::vscpClientRawCan() - : CVscpClient() -{ - m_type = CVscpClient::connType::UDP; -} - -/////////////////////////////////////////////////////////////////////////////// -// DTor -// - -vscpClientRawCan::~vscpClientRawCan() -{ - ; -} - -/////////////////////////////////////////////////////////////////////////////// -// getConfigAsJson -// - -std::string -vscpClientRawCan::getConfigAsJson(void) -{ - std::string rv; - - return rv; -} - -/////////////////////////////////////////////////////////////////////////////// -// initFromJson -// - -bool -vscpClientRawCan::initFromJson(const std::string &config) -{ - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// connect -// - -int -vscpClientRawCan::connect(void) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// disconnect -// - -int -vscpClientRawCan::disconnect(void) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// isConnected -// - -bool -vscpClientRawCan::isConnected(void) -{ - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// send -// - -int -vscpClientRawCan::send(vscpEvent &ev) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// send -// - -int -vscpClientRawCan::send(vscpEventEx &ex) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// send -// - -int -vscpClientRawCan::send(canalMsg &msg) -{ - vscpEventEx ex; - - uint8_t guid[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - if (vscp_convertCanalToEventEx(&ex, &msg, guid)) { - return VSCP_ERROR_INVALID_FRAME; - } - - return send(ex); -} - -/////////////////////////////////////////////////////////////////////////////// -// receive -// - -int -vscpClientRawCan::receive(vscpEvent &ev) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// receive -// - -int -vscpClientRawCan::receive(vscpEventEx &ex) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// receive -// - -int -vscpClientRawCan::receive(canalMsg &msg) -{ - int rv; - vscpEventEx ex; - - if (VSCP_ERROR_SUCCESS != (rv = receive(ex))) { - return rv; - } - - if (!vscp_convertEventExToCanal(&msg, &ex)) { - return VSCP_ERROR_INVALID_FRAME; - } - - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// setfilter -// - -int -vscpClientRawCan::setfilter(vscpEventFilter &filter) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getcount -// - -int -vscpClientRawCan::getcount(uint16_t *pcount) -{ - if (NULL == pcount) - return VSCP_ERROR_INVALID_POINTER; - *pcount = 0; - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// clear -// - -int -vscpClientRawCan::clear() -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getversion -// - -int -vscpClientRawCan::getversion(uint8_t *pmajor, uint8_t *pminor, uint8_t *prelease, uint8_t *pbuild) -{ - if (NULL == pmajor) - return VSCP_ERROR_INVALID_POINTER; - if (NULL == pminor) - return VSCP_ERROR_INVALID_POINTER; - if (NULL == prelease) - return VSCP_ERROR_INVALID_POINTER; - if (NULL == pbuild) - return VSCP_ERROR_INVALID_POINTER; - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getinterfaces -// - -int -vscpClientRawCan::getinterfaces(std::deque &iflist) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getwcyd -// - -int -vscpClientRawCan::getwcyd(uint64_t &wcyd) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// setConnectionTimeout -// - -void -vscpClientRawCan::setConnectionTimeout(uint32_t timeout) -{ - ; -} - -////////////////////////////////////////////////////////////////////////////// -// getConnectionTimeout -// - -uint32_t -vscpClientRawCan::getConnectionTimeout(void) -{ - return 0; -} - -////////////////////////////////////////////////////////////////////////////// -// setResponseTimeout -// - -void -vscpClientRawCan::setResponseTimeout(uint32_t timeout) -{ - ; -} - -////////////////////////////////////////////////////////////////////////////// -// getResponseTimeout -// - -uint32_t -vscpClientRawCan::getResponseTimeout(void) -{ - return 0; -} \ No newline at end of file diff --git a/src/vscp/common/vscp-client-rawcan.h b/src/vscp/common/vscp-client-rawcan.h deleted file mode 100644 index bab962602..000000000 --- a/src/vscp/common/vscp-client-rawcan.h +++ /dev/null @@ -1,173 +0,0 @@ -// vscp_client_rawcan.h -// -// Raw CAN client communication classes. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version -// 2 of the License, or (at your option) any later version. -// -// This file is part of the VSCP (https://www.vscp.org) -// -// Copyright: (C) 2007-2024 -// Ake Hedman, the VSCP project, -// -// This file is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this file see the file COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. -// - -#if !defined(VSCPCLIENTRAWCAN_H__INCLUDED_) -#define VSCPCLIENTRAWCAN_H__INCLUDED_ - -#include "vscp.h" -#include "vscp-client-base.h" - -class vscpClientRawCan : public CVscpClient -{ - -public: - - vscpClientRawCan(); - ~vscpClientRawCan(); - - /*! - Connect to remote host - @param bPoll If true polling is used. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int connect(void); - - /*! - Disconnect from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int disconnect(void); - - /*! - Check if connected. - @return true if connected, false otherwise. - */ - virtual bool isConnected(void); - - /*! - Send VSCP event to remote host. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int send(vscpEvent &ev); - - /*! - Send VSCP event to remote host. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int send(vscpEventEx &ex); - - /*! - Send VSCP CAN(AL) message to remote host. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int send(canalMsg &msg); - - /*! - Receive VSCP event from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int receive(vscpEvent &ev); - - /*! - Receive VSCP event ex from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int receive(vscpEventEx &ex); - - /*! - Receive CAN(AL) message from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int receive(canalMsg &msg); - - /*! - Set interface filter - @param filter VSCP Filter to set. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int setfilter(vscpEventFilter &filter); - - /*! - Get number of events waiting to be received on remote - interface - @param pcount Pointer to an unsigned integer that get the count of events. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getcount(uint16_t *pcount); - - /*! - Clear the input queue - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int clear(void); - - /*! - Get version from interface - @param pmajor Pointer to uint8_t that get major version of interface. - @param pminor Pointer to uint8_t that get minor version of interface. - @param prelease Pointer to uint8_t that get release version of interface. - @param pbuild Pointer to uint8_t that get build version of interface. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getversion(uint8_t *pmajor, - uint8_t *pminor, - uint8_t *prelease, - uint8_t *pbuild); - - /*! - Get interfaces - @param iflist Get a list of available interfaces - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getinterfaces(std::deque &iflist); - - /*! - Get capabilities (wcyd) from remote interface - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getwcyd(uint64_t &wcyd); - - /*! - Return a JSON representation of connection - @return JSON representation as string - */ - virtual std::string getConfigAsJson(void); - - /*! - Set member variables from JSON representation of connection - @param config JSON representation as string - @return True on success, false on failure. - */ - virtual bool initFromJson(const std::string& config); - - /*! - Getter/setters for connection timeout - Time is in milliseconds - */ - virtual void setConnectionTimeout(uint32_t timeout); - virtual uint32_t getConnectionTimeout(void); - - /*! - Getter/setters for response timeout - Time is in milliseconds - */ - virtual void setResponseTimeout(uint32_t timeout); - virtual uint32_t getResponseTimeout(void); - -private: - -}; - -#endif diff --git a/src/vscp/common/vscp-client-rawmqtt.cpp b/src/vscp/common/vscp-client-rawmqtt.cpp deleted file mode 100644 index 288cb6f03..000000000 --- a/src/vscp/common/vscp-client-rawmqtt.cpp +++ /dev/null @@ -1,270 +0,0 @@ -// vscp_client_rawmqtt.cpp -// -// Raw MQTT client communication classes. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version -// 2 of the License, or (at your option) any later version. -// -// This file is part of the VSCP (https://www.vscp.org) -// -// Copyright: (C)2007-2021 -// Ake Hedman, the VSCP project, -// -// This file is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this file see the file COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. -// - -#ifdef WIN32 -#include -#endif - -#include "vscphelper.h" -#include "vscp-client-rawmqtt.h" - -/////////////////////////////////////////////////////////////////////////////// -// CTor -// - -vscpClientRawMqtt::vscpClientRawMqtt() : CVscpClient() -{ - m_type = CVscpClient::connType::UDP; -} - -/////////////////////////////////////////////////////////////////////////////// -// DTor -// - -vscpClientRawMqtt::~vscpClientRawMqtt() -{ - ; -} - -/////////////////////////////////////////////////////////////////////////////// -// getConfigAsJson -// - -std::string vscpClientRawMqtt::getConfigAsJson(void) -{ - std::string rv; - - return rv; -} - - -/////////////////////////////////////////////////////////////////////////////// -// initFromJson -// - -bool vscpClientRawMqtt::initFromJson(const std::string& config) -{ - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// connect -// - -int vscpClientRawMqtt::connect(void) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// disconnect -// - -int vscpClientRawMqtt::disconnect(void) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// isConnected -// - -bool vscpClientRawMqtt::isConnected(void) -{ - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// send -// - -int vscpClientRawMqtt::send(vscpEvent &ev) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// send -// - -int vscpClientRawMqtt::send(vscpEventEx &ex) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// send -// - -int -vscpClientRawMqtt::send(canalMsg &msg) -{ - vscpEventEx ex; - - uint8_t guid[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - if (vscp_convertCanalToEventEx(&ex, &msg, guid)) { - return VSCP_ERROR_INVALID_FRAME; - } - - return send(ex); -} - -/////////////////////////////////////////////////////////////////////////////// -// receive -// - -int vscpClientRawMqtt::receive(vscpEvent &ev) -{ - return VSCP_ERROR_SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// -// receive -// - -int vscpClientRawMqtt::receive(vscpEventEx &ex) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// receive -// - -int -vscpClientRawMqtt::receive(canalMsg &msg) -{ - int rv; - vscpEventEx ex; - - if (VSCP_ERROR_SUCCESS != (rv = receive(ex))) { - return rv; - } - - if (!vscp_convertEventExToCanal(&msg, &ex)) { - return VSCP_ERROR_INVALID_FRAME; - } - - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// setfilter -// - -int vscpClientRawMqtt::setfilter(vscpEventFilter &filter) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getcount -// - -int vscpClientRawMqtt::getcount(uint16_t *pcount) -{ - if (NULL == pcount ) return VSCP_ERROR_INVALID_POINTER; - *pcount = 0; - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// clear -// - -int vscpClientRawMqtt::clear() -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getversion -// - -int vscpClientRawMqtt::getversion(uint8_t *pmajor, - uint8_t *pminor, - uint8_t *prelease, - uint8_t *pbuild) -{ - if (NULL == pmajor ) return VSCP_ERROR_INVALID_POINTER; - if (NULL == pminor ) return VSCP_ERROR_INVALID_POINTER; - if (NULL == prelease ) return VSCP_ERROR_INVALID_POINTER; - if (NULL == pbuild ) return VSCP_ERROR_INVALID_POINTER; - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getinterfaces -// - -int vscpClientRawMqtt::getinterfaces(std::deque &iflist) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// getwcyd -// - -int vscpClientRawMqtt::getwcyd(uint64_t &wcyd) -{ - return VSCP_ERROR_SUCCESS; -} - -////////////////////////////////////////////////////////////////////////////// -// setConnectionTimeout -// - -void vscpClientRawMqtt::setConnectionTimeout(uint32_t timeout) -{ - ; -} - -////////////////////////////////////////////////////////////////////////////// -// getConnectionTimeout -// - -uint32_t vscpClientRawMqtt::getConnectionTimeout(void) -{ - return 0; -} - -////////////////////////////////////////////////////////////////////////////// -// setResponseTimeout -// - -void vscpClientRawMqtt::setResponseTimeout(uint32_t timeout) -{ - ; -} - -////////////////////////////////////////////////////////////////////////////// -// getResponseTimeout -// - -uint32_t vscpClientRawMqtt::getResponseTimeout(void) -{ - return 0; -} \ No newline at end of file diff --git a/src/vscp/common/vscp-client-rawmqtt.h b/src/vscp/common/vscp-client-rawmqtt.h deleted file mode 100644 index f736aec60..000000000 --- a/src/vscp/common/vscp-client-rawmqtt.h +++ /dev/null @@ -1,173 +0,0 @@ -// vscp_client_rawmqtt.h -// -// Raw MQTT client communication classes. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version -// 2 of the License, or (at your option) any later version. -// -// This file is part of the VSCP (https://www.vscp.org) -// -// Copyright: (C) 2007-2024 -// Ake Hedman, the VSCP project, -// -// This file is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this file see the file COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. -// - -#if !defined(VSCPCLIENTRAWMQTT_H__INCLUDED_) -#define VSCPCLIENTRAWMQTT_H__INCLUDED_ - -#include "vscp.h" -#include "vscp-client-base.h" - -class vscpClientRawMqtt : public CVscpClient -{ - -public: - - vscpClientRawMqtt(); - ~vscpClientRawMqtt(); - - /*! - Connect to remote host - @param bPoll If true polling is used. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int connect(void); - - /*! - Disconnect from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int disconnect(void); - - /*! - Check if connected. - @return true if connected, false otherwise. - */ - virtual bool isConnected(void); - - /*! - Send VSCP event to remote host. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int send(vscpEvent &ev); - - /*! - Send VSCP event to remote host. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int send(vscpEventEx &ex); - - /*! - Send VSCP CAN(AL) message to remote host. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int send(canalMsg &msg); - - /*! - Receive VSCP event from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int receive(vscpEvent &ev); - - /*! - Receive VSCP event ex from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int receive(vscpEventEx &ex); - - /*! - Receive CAN(AL) message from remote host - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int receive(canalMsg &msg); - - /*! - Set interface filter - @param filter VSCP Filter to set. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int setfilter(vscpEventFilter &filter); - - /*! - Get number of events waiting to be received on remote - interface - @param pcount Pointer to an unsigned integer that get the count of events. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getcount(uint16_t *pcount); - - /*! - Clear the input queue - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int clear(void); - - /*! - Get version from interface - @param pmajor Pointer to uint8_t that get major version of interface. - @param pminor Pointer to uint8_t that get minor version of interface. - @param prelease Pointer to uint8_t that get release version of interface. - @param pbuild Pointer to uint8_t that get build version of interface. - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getversion(uint8_t *pmajor, - uint8_t *pminor, - uint8_t *prelease, - uint8_t *pbuild); - - /*! - Get interfaces - @param iflist Get a list of available interfaces - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getinterfaces(std::deque &iflist); - - /*! - Get capabilities (wcyd) from remote interface - @return Return VSCP_ERROR_SUCCESS of OK and error code else. - */ - virtual int getwcyd(uint64_t &wcyd); - - /*! - Return a JSON representation of connection - @return JSON representation as string - */ - virtual std::string getConfigAsJson(void); - - /*! - Set member variables from JSON representation of connection - @param config JSON representation as string - @return True on success, false on failure. - */ - virtual bool initFromJson(const std::string& config); - - /*! - Getter/setters for connection timeout - Time is in milliseconds - */ - virtual void setConnectionTimeout(uint32_t timeout); - virtual uint32_t getConnectionTimeout(void); - - /*! - Getter/setters for response timeout - Time is in milliseconds - */ - virtual void setResponseTimeout(uint32_t timeout); - virtual uint32_t getResponseTimeout(void); - -private: - -}; - -#endif diff --git a/third_party/mongoose b/third_party/mongoose index 98db3360d..94efcc83a 160000 --- a/third_party/mongoose +++ b/third_party/mongoose @@ -1 +1 @@ -Subproject commit 98db3360dfcb0f941f6afb5a00a2e24e1d437c5c +Subproject commit 94efcc83a109eaba8baf5ea194d49387dd817546 diff --git a/third_party/nlohmann b/third_party/nlohmann index 0457de21c..8c391e04f 160000 --- a/third_party/nlohmann +++ b/third_party/nlohmann @@ -1 +1 @@ -Subproject commit 0457de21cffb298c22b629e538036bfeb96130b7 +Subproject commit 8c391e04fe4195d8be862c97f38cfe10e2a3472e diff --git a/third_party/spdlog b/third_party/spdlog index 5532231bb..27cb4c767 160000 --- a/third_party/spdlog +++ b/third_party/spdlog @@ -1 +1 @@ -Subproject commit 5532231bbc31bbdf95ac15febdac0413ee1d07ad +Subproject commit 27cb4c76708608465c413f6d0e6b8d99a4d84302