DAQ Driver
DeviceInfo Class Reference

The DeviceInfo class Provides information about the Voyager. More...

#include <Driver/DriverComponents/DeviceInfo.h>

Inheritance diagram for DeviceInfo:
Collaboration diagram for DeviceInfo:

Public Member Functions

 DeviceInfo (pMessageProcessor messageProcessor)
 
void refresh ()
 refresh Updates the remote deviceInfo More...
 
DeviceInfoStructure localDeviceInfo ()
 localDeviceInfo Gets the information of the device this code is running on More...
 
void setLocalDeviceInfo (const DeviceInfoStructure &localDeviceInfo)
 
DeviceInfoStructure remoteDeviceInfo ()
 remoteDeviceInfo Gets the information of the device that you are connected to More...
 
std::shared_ptr< std::function< void()> > addRemoteInfoRecievedCallback (const std::function< void()> &newBufferCallback)
 
bool removeRemoteInfoRecievedCallback (std::shared_ptr< std::function< void(void)>> callback)
 
void reset () override
 reset Resets the components More...
 
- Public Member Functions inherited from AbstractDriverComponent
 AbstractDriverComponent (pMessageProcessor messageProcessor)
 

Protected Member Functions

void setRemoteDeviceInfo (const DeviceInfoStructure &remoteDeviceInfo)
 
void handleDeviceInfoRequestRecieved (const google::protobuf::Message &message)
 
void handleDeviceInfoResponseRecieved (const google::protobuf::Message &message)
 

Private Attributes

std::mutex m_localDeviceInfoMutex
 Mutex for locking device info of local device. More...
 
std::mutex m_remoteDeviceInfoMutex
 Mutex for locking device info of remote device. More...
 
DeviceInfoStructure m_localDeviceInfo
 Device Information of local device. More...
 
DeviceInfoStructure m_remoteDeviceInfo
 Device information of remote device. More...
 
CallbackHandler m_remoteInfoRecievedCallbackHandler
 

Additional Inherited Members

- Protected Attributes inherited from AbstractDriverComponent
pMessageProcessor m_messageProcessor
 

Detailed Description

The DeviceInfo class Provides information about the Voyager.

Definition at line 21 of file DeviceInfo.h.

Constructor & Destructor Documentation

◆ DeviceInfo()

DeviceInfo::DeviceInfo ( pMessageProcessor  messageProcessor)

Definition at line 3 of file DeviceInfo.cpp.

Member Function Documentation

◆ addRemoteInfoRecievedCallback()

std::shared_ptr< std::function< void()> > DeviceInfo::addRemoteInfoRecievedCallback ( const std::function< void()> &  newBufferCallback)

Definition at line 35 of file DeviceInfo.cpp.

◆ handleDeviceInfoRequestRecieved()

void DeviceInfo::handleDeviceInfoRequestRecieved ( const google::protobuf::Message &  message)
protected

Definition at line 48 of file DeviceInfo.cpp.

◆ handleDeviceInfoResponseRecieved()

void DeviceInfo::handleDeviceInfoResponseRecieved ( const google::protobuf::Message &  message)
protected

Definition at line 56 of file DeviceInfo.cpp.

◆ localDeviceInfo()

DeviceInfoStructure DeviceInfo::localDeviceInfo ( )

localDeviceInfo Gets the information of the device this code is running on

Returns
information about device this code is running on

Definition at line 20 of file DeviceInfo.cpp.

◆ refresh()

void DeviceInfo::refresh ( )

refresh Updates the remote deviceInfo

Definition at line 16 of file DeviceInfo.cpp.

◆ remoteDeviceInfo()

DeviceInfoStructure DeviceInfo::remoteDeviceInfo ( )

remoteDeviceInfo Gets the information of the device that you are connected to

Returns
deviceinfo of remote device

Definition at line 30 of file DeviceInfo.cpp.

◆ removeRemoteInfoRecievedCallback()

bool DeviceInfo::removeRemoteInfoRecievedCallback ( std::shared_ptr< std::function< void(void)>>  callback)

Definition at line 39 of file DeviceInfo.cpp.

◆ reset()

void DeviceInfo::reset ( )
overridevirtual

reset Resets the components

Implements AbstractDriverComponent.

Definition at line 43 of file DeviceInfo.cpp.

◆ setLocalDeviceInfo()

void DeviceInfo::setLocalDeviceInfo ( const DeviceInfoStructure &  localDeviceInfo)

Definition at line 25 of file DeviceInfo.cpp.

◆ setRemoteDeviceInfo()

void DeviceInfo::setRemoteDeviceInfo ( const DeviceInfoStructure &  remoteDeviceInfo)
protected

Definition at line 64 of file DeviceInfo.cpp.

Member Data Documentation

◆ m_localDeviceInfo

DeviceInfoStructure DeviceInfo::m_localDeviceInfo
private

Device Information of local device.

Definition at line 60 of file DeviceInfo.h.

◆ m_localDeviceInfoMutex

std::mutex DeviceInfo::m_localDeviceInfoMutex
private

Mutex for locking device info of local device.

Definition at line 58 of file DeviceInfo.h.

◆ m_remoteDeviceInfo

DeviceInfoStructure DeviceInfo::m_remoteDeviceInfo
private

Device information of remote device.

Definition at line 61 of file DeviceInfo.h.

◆ m_remoteDeviceInfoMutex

std::mutex DeviceInfo::m_remoteDeviceInfoMutex
private

Mutex for locking device info of remote device.

Definition at line 59 of file DeviceInfo.h.

◆ m_remoteInfoRecievedCallbackHandler

CallbackHandler DeviceInfo::m_remoteInfoRecievedCallbackHandler
private

Definition at line 62 of file DeviceInfo.h.