mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-08-30 12:15:12 +00:00
connection between 2 systems and bug fixes (#14)
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
#include <support/component_impl.h>
|
||||
#include <interfaces/ipc.h>
|
||||
#include "watchdog.h"
|
||||
#include <algorithm>
|
||||
|
||||
class CUnixSocketConnection;
|
||||
|
||||
@@ -37,9 +39,9 @@ public:
|
||||
|
||||
// Object declarations
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::system_object)
|
||||
DECLARE_OBJECT_CLASS_NAME("UnixDomainSocketsChannelControl")
|
||||
DECLARE_OBJECT_CLASS_ALIAS("LocalChannelControl")
|
||||
DECLARE_DEFAULT_OBJECT_NAME("LocalChannelControl")
|
||||
DECLARE_OBJECT_CLASS_NAME("UnixSocketsChannelControl")
|
||||
DECLARE_OBJECT_CLASS_ALIAS("unix_domain_sockets")
|
||||
DECLARE_DEFAULT_OBJECT_NAME("unix_domain_sockets")
|
||||
DECLARE_OBJECT_SINGLETON()
|
||||
|
||||
/**
|
||||
@@ -53,6 +55,11 @@ public:
|
||||
*/
|
||||
virtual void OnShutdown() override;
|
||||
|
||||
/**
|
||||
* @brief Last function called before destruction. Overload of sdv::CSdvObject::OnDestroy.
|
||||
*/
|
||||
virtual void OnDestroy() override;
|
||||
|
||||
/**
|
||||
* @brief Create IPC connection object and return the endpoint information. Overload of
|
||||
* sdv::ipc::ICreateEndpoint::CreateEndpoint.
|
||||
@@ -80,8 +87,7 @@ private:
|
||||
|
||||
// Helper: choose runtime dir (/run/user/<uid>/sdv) or fallback (/tmp/sdv)
|
||||
static std::string MakeUserRuntimeDir();
|
||||
|
||||
std::vector<std::shared_ptr<CUnixSocketConnection>> m_ServerConnections;
|
||||
CUnixSocketsConnectionWatchDog m_watchdog;
|
||||
|
||||
};
|
||||
DEFINE_SDV_OBJECT(CUnixDomainSocketsChannelMgnt)
|
||||
|
||||
Reference in New Issue
Block a user