OpenCPN Partial API docs
Loading...
Searching...
No Matches
N2kName Struct Reference

N2k uses CAN which defines the basic properties of messages. More...

#include <comm_navmsg.h>

Classes

union  tUnionDeviceInformation
 

Public Member Functions

 N2kName (uint64_t name)
 
std::string to_string () const
 
uint32_t GetNumber () const
 21 bits
 
uint16_t GetManufacturer () const
 9 bits
 
uint8_t GetDevInstanceLow () const
 3 bits
 
uint8_t GetDevInstanceHigh () const
 5 bits
 
uint8_t GetDevFunc () const
 8 bits
 
uint8_t GetDevClass () const
 7 bits
 
uint8_t GetSysInstance () const
 4 bits
 
uint8_t GetIndustryGroup () const
 4 bits
 
void SetUniqueNumber (uint32_t _UniqueNumber)
 
void SetManufacturerCode (uint16_t _ManufacturerCode)
 
void SetDeviceInstance (unsigned char _DeviceInstance)
 
void SetDeviceFunction (unsigned char _DeviceFunction)
 
void SetDeviceClass (unsigned char _DeviceClass)
 
void SetIndustryGroup (unsigned char _IndustryGroup)
 
void SetSystemInstance (unsigned char _SystemInstance)
 
uint64_t GetName () const
 

Static Public Member Functions

static uint64_t Parse (const std::string &s)
 

Public Attributes

tUnionDeviceInformation value
 

Detailed Description

N2k uses CAN which defines the basic properties of messages.

The NAME is an unique identifier for a node. CAN standardizes an address claim protocol. The net effect is that upper layers sees a stable NAME even if the address chnages.

The structure of the NAME is defined in the J/1939 standard, see https://www.kvaser.com/about-can/higher-layer-protocols/j1939-introduction/

Definition at line 62 of file comm_navmsg.h.

Constructor & Destructor Documentation

◆ N2kName() [1/2]

N2kName::N2kName ( )
inline

Definition at line 63 of file comm_navmsg.h.

◆ N2kName() [2/2]

N2kName::N2kName ( uint64_t  name)
inline

Definition at line 64 of file comm_navmsg.h.

Member Function Documentation

◆ GetName()

uint64_t N2kName::GetName ( ) const
inline

Definition at line 132 of file comm_navmsg.h.

◆ Parse()

static uint64_t N2kName::Parse ( const std::string &  s)
inlinestatic

Definition at line 72 of file comm_navmsg.h.

◆ SetDeviceClass()

void N2kName::SetDeviceClass ( unsigned char  _DeviceClass)
inline

Definition at line 118 of file comm_navmsg.h.

◆ SetDeviceFunction()

void N2kName::SetDeviceFunction ( unsigned char  _DeviceFunction)
inline

Definition at line 115 of file comm_navmsg.h.

◆ SetDeviceInstance()

void N2kName::SetDeviceInstance ( unsigned char  _DeviceInstance)
inline

Definition at line 112 of file comm_navmsg.h.

◆ SetIndustryGroup()

void N2kName::SetIndustryGroup ( unsigned char  _IndustryGroup)
inline

Definition at line 121 of file comm_navmsg.h.

◆ SetManufacturerCode()

void N2kName::SetManufacturerCode ( uint16_t  _ManufacturerCode)
inline

Definition at line 107 of file comm_navmsg.h.

◆ SetSystemInstance()

void N2kName::SetSystemInstance ( unsigned char  _SystemInstance)
inline

Definition at line 126 of file comm_navmsg.h.

◆ SetUniqueNumber()

void N2kName::SetUniqueNumber ( uint32_t  _UniqueNumber)
inline

Definition at line 103 of file comm_navmsg.h.

◆ to_string()

std::string N2kName::to_string ( ) const
inline

Definition at line 66 of file comm_navmsg.h.

Member Data Documentation

◆ value

tUnionDeviceInformation N2kName::value

Definition at line 101 of file comm_navmsg.h.


The documentation for this struct was generated from the following file: