OpenCPN Partial API docs
Loading...
Searching...
No Matches
comm_drv_n2k_socketcan.cpp File Reference

Implement comm_drv_socketcan.h – socketcan driver. More...

#include "config.h"
#include <algorithm>
#include <atomic>
#include <chrono>
#include <mutex>
#include <thread>
#include <vector>
#include <future>
#include <net/if.h>
#include <serial/serial.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <wx/log.h>
#include <wx/string.h>
#include <wx/utils.h>
#include <wx/thread.h>
#include "model/comm_can_util.h"
#include "model/comm_drv_n2k_socketcan.h"
#include "model/comm_drv_registry.h"
#include "model/comm_navmsg_bus.h"
#include "model/config_vars.h"

Go to the source code of this file.

Classes

class  Worker
 Manages reading the N2K data stream provided by some N2K gateways from the declared serial port. More...
 
class  CommDriverN2KSocketCanImpl
 Local driver implementation, not visible outside this file. More...
 

Macros

#define DEFAULT_N2K_SOURCE_ADDRESS   72
 

Typedefs

typedef struct can_frame CanFrame
 

Functions

 wxDEFINE_EVENT (EVT_N2K_59904, ObservedEvt)
 
void AddStr (std::vector< uint8_t > &vec, std::string str, size_t max_len)
 

Detailed Description

Implement comm_drv_socketcan.h – socketcan driver.

Definition in file comm_drv_n2k_socketcan.cpp.

Macro Definition Documentation

◆ DEFAULT_N2K_SOURCE_ADDRESS

#define DEFAULT_N2K_SOURCE_ADDRESS   72

Definition at line 56 of file comm_drv_n2k_socketcan.cpp.

Typedef Documentation

◆ CanFrame

typedef struct can_frame CanFrame

Definition at line 65 of file comm_drv_n2k_socketcan.cpp.

Function Documentation

◆ AddStr()

void AddStr ( std::vector< uint8_t > &  vec,
std::string  str,
size_t  max_len 
)

Definition at line 253 of file comm_drv_n2k_socketcan.cpp.