NMEA2000 Library  0.1
Library to handle NMEA 2000 Communication written in C++
tNMEA2000::tDevice Class Referenceabstract

This class represents a N2k device. More...

#include <NMEA2000.h>

Inheritance diagram for tNMEA2000::tDevice:
Collaboration diagram for tNMEA2000::tDevice:

Public Member Functions

 tDevice (uint64_t _Name, uint8_t _Source=255)
 Construct a new Device object. More...
 
virtual ~tDevice ()
 Destroy the Device object. More...
 
virtual unsigned short GetCertificationLevel () const =0
 Get the certification level from the product information of this device. More...
 
unsigned long GetCreateTime () const
 Returns the Time of Creation of this device. More...
 
unsigned char GetDeviceClass () const
 Get the Device Class from the Device Information. More...
 
unsigned char GetDeviceFunction () const
 Get the Device Function from the Device Information. More...
 
unsigned char GetDeviceInstance () const
 Get the Device Instance from the Device Information. More...
 
unsigned char GetDeviceInstanceLower () const
 Get the Device Instance (lower bits) from the Device Information. More...
 
unsigned char GetDeviceInstanceUpper () const
 Get the Device Instance (upper bits) from the Device Information. More...
 
unsigned char GetIndustryGroup () const
 Get the Industry Group from the Device Information. More...
 
virtual const char * GetInstallationDescription1 () const
 Get the installation description 1 from the configuration information of this device. More...
 
virtual const char * GetInstallationDescription2 () const
 Get the installation description 2 from the configuration information of this device. More...
 
virtual unsigned short GetLoadEquivalency () const =0
 Get the load equivalency from the product information of this device. More...
 
uint16_t GetManufacturerCode () const
 Get the Manufacturer Code from the Device Information. More...
 
virtual const char * GetManufacturerInformation () const
 Get the manufacturer information from the configuration information of this device. More...
 
virtual const char * GetModelID () const =0
 Get the model ID from the product information of this device. More...
 
virtual const char * GetModelSerialCode () const =0
 Get the model serial code from the product information of this device. More...
 
virtual const char * GetModelVersion () const =0
 Get the model version from the product information of this device. More...
 
virtual unsigned short GetN2kVersion () const =0
 Get N2k Standard version from the product information of this device. More...
 
uint64_t GetName () const
 Get the Name of this device. More...
 
virtual unsigned short GetProductCode () const =0
 Get the product code from the product information of this device. More...
 
virtual const unsigned long * GetReceivePGNs () const
 Get the list of received PGNs from this device. More...
 
uint8_t GetSource () const
 Returns the Source Address of this device. More...
 
virtual const char * GetSwCode () const =0
 Get the Software version code from the product information of this device. More...
 
unsigned char GetSystemInstance () const
 Get the System Instance from the Device Information. More...
 
virtual const unsigned long * GetTransmitPGNs () const
 Get the list of transmitted PGNs from this device. More...
 
uint32_t GetUniqueNumber () const
 Get the unique Number from the Device Information. More...
 
bool IsSame (uint64_t Other)
 Check if two devices are the same, by comparing the device name. More...
 

Protected Attributes

unsigned long CreateTime
 Timestamp when this device was created. More...
 
tDeviceInformation DevI
 This object holds all necessary device informations. More...
 
uint8_t Source
 Source address on bus for this device. More...
 

Detailed Description

This class represents a N2k device.

Definition at line 481 of file NMEA2000.h.

Constructor & Destructor Documentation

◆ tDevice()

tNMEA2000::tDevice::tDevice ( uint64_t  _Name,
uint8_t  _Source = 255 
)
inline

Construct a new Device object.

Initialize all the attributes of the device.

Parameters
_NameName of the device
_SourceSource address on the bus (default = 255)

Definition at line 499 of file NMEA2000.h.

◆ ~tDevice()

virtual tNMEA2000::tDevice::~tDevice ( )
inlinevirtual

Destroy the Device object.

Definition at line 502 of file NMEA2000.h.

Member Function Documentation

◆ GetCertificationLevel()

virtual unsigned short tNMEA2000::tDevice::GetCertificationLevel ( ) const
pure virtual

Get the certification level from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetCreateTime()

unsigned long tNMEA2000::tDevice::GetCreateTime ( ) const
inline

Returns the Time of Creation of this device.

Definition at line 507 of file NMEA2000.h.

◆ GetDeviceClass()

unsigned char tNMEA2000::tDevice::GetDeviceClass ( ) const
inline

Get the Device Class from the Device Information.

Returns
unsigned char -> Device class code, tDeviceInformation::tUnionDeviceInformation::DeviceClass

Definition at line 558 of file NMEA2000.h.

◆ GetDeviceFunction()

unsigned char tNMEA2000::tDevice::GetDeviceFunction ( ) const
inline

Get the Device Function from the Device Information.

Returns
unsigned char -> Device function code, tDeviceInformation::tUnionDeviceInformation::DeviceFunction

Definition at line 552 of file NMEA2000.h.

◆ GetDeviceInstance()

unsigned char tNMEA2000::tDevice::GetDeviceInstance ( ) const
inline

Get the Device Instance from the Device Information.

Returns
unsigned char

Definition at line 536 of file NMEA2000.h.

◆ GetDeviceInstanceLower()

unsigned char tNMEA2000::tDevice::GetDeviceInstanceLower ( ) const
inline

Get the Device Instance (lower bits) from the Device Information.

Returns
unsigned char

Definition at line 541 of file NMEA2000.h.

◆ GetDeviceInstanceUpper()

unsigned char tNMEA2000::tDevice::GetDeviceInstanceUpper ( ) const
inline

Get the Device Instance (upper bits) from the Device Information.

Returns
unsigned char

Definition at line 546 of file NMEA2000.h.

◆ GetIndustryGroup()

unsigned char tNMEA2000::tDevice::GetIndustryGroup ( ) const
inline

Get the Industry Group from the Device Information.

Returns
unsigned char

Definition at line 563 of file NMEA2000.h.

◆ GetInstallationDescription1()

virtual const char * tNMEA2000::tDevice::GetInstallationDescription1 ( ) const
inlinevirtual

Get the installation description 1 from the configuration information of this device.

Reimplemented in tN2kDeviceList::tInternalDevice.

Definition at line 601 of file NMEA2000.h.

◆ GetInstallationDescription2()

virtual const char * tNMEA2000::tDevice::GetInstallationDescription2 ( ) const
inlinevirtual

Get the installation description 2 from the configuration information of this device.

Reimplemented in tN2kDeviceList::tInternalDevice.

Definition at line 604 of file NMEA2000.h.

◆ GetLoadEquivalency()

virtual unsigned short tNMEA2000::tDevice::GetLoadEquivalency ( ) const
pure virtual

Get the load equivalency from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetManufacturerCode()

uint16_t tNMEA2000::tDevice::GetManufacturerCode ( ) const
inline

Get the Manufacturer Code from the Device Information.

Returns
uint16_t

Definition at line 530 of file NMEA2000.h.

◆ GetManufacturerInformation()

virtual const char * tNMEA2000::tDevice::GetManufacturerInformation ( ) const
inlinevirtual

Get the manufacturer information from the configuration information of this device.

Reimplemented in tN2kDeviceList::tInternalDevice.

Definition at line 598 of file NMEA2000.h.

◆ GetModelID()

virtual const char * tNMEA2000::tDevice::GetModelID ( ) const
pure virtual

Get the model ID from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetModelSerialCode()

virtual const char * tNMEA2000::tDevice::GetModelSerialCode ( ) const
pure virtual

Get the model serial code from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetModelVersion()

virtual const char * tNMEA2000::tDevice::GetModelVersion ( ) const
pure virtual

Get the model version from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetN2kVersion()

virtual unsigned short tNMEA2000::tDevice::GetN2kVersion ( ) const
pure virtual

Get N2k Standard version from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetName()

uint64_t tNMEA2000::tDevice::GetName ( ) const
inline

Get the Name of this device.

Returns
uint64_t

Definition at line 513 of file NMEA2000.h.

◆ GetProductCode()

virtual unsigned short tNMEA2000::tDevice::GetProductCode ( ) const
pure virtual

Get the product code from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetReceivePGNs()

virtual const unsigned long * tNMEA2000::tDevice::GetReceivePGNs ( ) const
inlinevirtual

Get the list of received PGNs from this device.

Reimplemented in tN2kDeviceList::tInternalDevice.

Definition at line 609 of file NMEA2000.h.

◆ GetSource()

uint8_t tNMEA2000::tDevice::GetSource ( ) const
inline

Returns the Source Address of this device.

Definition at line 505 of file NMEA2000.h.

◆ GetSwCode()

virtual const char * tNMEA2000::tDevice::GetSwCode ( ) const
pure virtual

Get the Software version code from the product information of this device.

Implemented in tN2kDeviceList::tInternalDevice.

◆ GetSystemInstance()

unsigned char tNMEA2000::tDevice::GetSystemInstance ( ) const
inline

Get the System Instance from the Device Information.

Returns
unsigned char

Definition at line 568 of file NMEA2000.h.

◆ GetTransmitPGNs()

virtual const unsigned long * tNMEA2000::tDevice::GetTransmitPGNs ( ) const
inlinevirtual

Get the list of transmitted PGNs from this device.

Reimplemented in tN2kDeviceList::tInternalDevice.

Definition at line 607 of file NMEA2000.h.

◆ GetUniqueNumber()

uint32_t tNMEA2000::tDevice::GetUniqueNumber ( ) const
inline

Get the unique Number from the Device Information.

Returns
uint32_t

Definition at line 525 of file NMEA2000.h.

◆ IsSame()

bool tNMEA2000::tDevice::IsSame ( uint64_t  Other)
inline

Check if two devices are the same, by comparing the device name.

Parameters
OtherName of the other device
Return values
true
false

Definition at line 520 of file NMEA2000.h.

Member Data Documentation

◆ CreateTime

unsigned long tNMEA2000::tDevice::CreateTime
protected

Timestamp when this device was created.

Definition at line 486 of file NMEA2000.h.

◆ DevI

tDeviceInformation tNMEA2000::tDevice::DevI
protected

This object holds all necessary device informations.

Definition at line 484 of file NMEA2000.h.

◆ Source

uint8_t tNMEA2000::tDevice::Source
protected

Source address on bus for this device.

Definition at line 488 of file NMEA2000.h.


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