OpenCPN Partial API docs
Loading...
Searching...
No Matches
FileCommDriver Class Reference

Read and write data to/from files test driver
More...

#include <comm_drv_file.h>

Inheritance diagram for FileCommDriver:
AbstractCommDriver

Public Member Functions

 FileCommDriver (const std::string &opath, const std::string &ipath, DriverListener &l)
 An instance which can write to file and play data from another.
 
 FileCommDriver (const std::string &opath)
 A write-only instance writing to file.
 
bool SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr) override
 
void Activate () override
 Register driver in the driver Registry. More...
 
virtual std::shared_ptr< NavAddrGetAddress ()
 
- Public Member Functions inherited from AbstractCommDriver
virtual bool SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr)=0
 
virtual void Activate ()=0
 Register driver in the driver Registry. More...
 
virtual void SetListener (DriverListener &l)
 Set the entity which will receive incoming data. More...
 
virtual std::pair< CommStatus, std::string > Clone ()
 Create a new virtual interface using a new instance of this driver. More...
 
std::string Key () const
 
virtual std::unordered_map< std::string, std::string > GetAttributes () const
 

Additional Inherited Members

- Public Attributes inherited from AbstractCommDriver
const NavAddr::Bus bus
 
const std::string iface
 Physical device for 0183, else a unique string. More...
 
std::unordered_map< std::string, std::string > attributes
 
- Protected Member Functions inherited from AbstractCommDriver
 AbstractCommDriver (NavAddr::Bus b)
 
 AbstractCommDriver (NavAddr::Bus b, const std::string &s)
 

Detailed Description

Read and write data to/from files test driver

Definition at line 38 of file comm_drv_file.h.

Member Function Documentation

◆ Activate()

void FileCommDriver::Activate ( )
overridevirtual

Register driver in the driver Registry.

Implements AbstractCommDriver.

Definition at line 121 of file comm_drv_file.cpp.

◆ GetAddress()

std::shared_ptr< NavAddr > FileCommDriver::GetAddress ( )
virtual

Definition at line 64 of file comm_drv_file.cpp.

◆ SendMessage()

bool FileCommDriver::SendMessage ( std::shared_ptr< const NavMsg msg,
std::shared_ptr< const NavAddr addr 
)
overridevirtual

Implements AbstractCommDriver.

Definition at line 68 of file comm_drv_file.cpp.


The documentation for this class was generated from the following files: