NMEA2000 Library  0.1
Library to handle NMEA 2000 Communication written in C++
tNMEA2000::tProductInformation Struct Reference

Structure that holds all the product information. More...

#include <NMEA2000.h>

Public Member Functions

void Clear ()
 Clears out all data
More...
 
bool IsSame (const tProductInformation &Other)
 Compares two product information structures. More...
 
void Set (const char *_ModelSerialCode, unsigned short _ProductCode=0xffff, const char *_ModelID=0, const char *_SwCode=0, const char *_ModelVersion=0, unsigned char _LoadEquivalency=0xff, unsigned short _N2kVersion=0xffff, unsigned char _CertificationLevel=0xff)
 Set all the product information data of the structure. More...
 

Public Attributes

unsigned char CertificationLevel
 Certification level of the device. More...
 
unsigned char LoadEquivalency
 Load Equivalency of the device A Load Equivalence Number express the amount of current that is drawn from an NMEA 2000 network. 1 equals to 50mA. If a device draws 151mA of current from the network, then its LEN is 4. More...
 
char N2kModelID [Max_N2kModelID_len+1]
 Max length of ModelID Note that we reserve one extra char for null termination
More...
 
char N2kModelSerialCode [Max_N2kModelSerialCode_len+1]
 Max length of Serial Code Note that we reserve one extra char for null termination. More...
 
char N2kModelVersion [Max_N2kModelVersion_len+1]
 Max length of Model Version Note that we reserve one extra char for null termination. More...
 
char N2kSwCode [Max_N2kSwCode_len+1]
 Max length of Software Code Note that we reserve one extra char for null termination
More...
 
unsigned short N2kVersion
 Version of NMEA2000 Standard that is supported. More...
 
unsigned short ProductCode
 Product Code of the device. More...
 

Detailed Description

Structure that holds all the product information.

It is important that every device has proper product information available. This struct holds all the data and provides several helper functions.

Definition at line 216 of file NMEA2000.h.

Member Function Documentation

◆ Clear()

void tNMEA2000::tProductInformation::Clear ( )

Clears out all data

Definition at line 627 of file NMEA2000.cpp.

◆ IsSame()

bool tNMEA2000::tProductInformation::IsSame ( const tProductInformation Other)

Compares two product information structures.

Parameters
OtherAn other product information structure
Return values
true
false

Definition at line 632 of file NMEA2000.cpp.

◆ Set()

void tNMEA2000::tProductInformation::Set ( const char *  _ModelSerialCode,
unsigned short  _ProductCode = 0xffff,
const char *  _ModelID = 0,
const char *  _SwCode = 0,
const char *  _ModelVersion = 0,
unsigned char  _LoadEquivalency = 0xff,
unsigned short  _N2kVersion = 0xffff,
unsigned char  _CertificationLevel = 0xff 
)
inline

Set all the product information data of the structure.

Parameters
_ModelSerialCodeManufacturer's Model serial code, default="". Max 32 chars.
_ProductCodeManufacturer's product code, default=666
_ModelIDManufacturer's Model ID, default="". Max 33 chars
_SwCodeManufacturer's software version code, default="". Max 40 chars
_ModelVersionManufacturer's Model version default="". Max 24 chars
_LoadEquivalencyLoad equivalency ( x * 50mA, default=1)
_N2kVersionN2k Standard version, default=2101
_CertificationLevelCertification level, default=0

Definition at line 262 of file NMEA2000.h.

Member Data Documentation

◆ CertificationLevel

unsigned char tNMEA2000::tProductInformation::CertificationLevel

Certification level of the device.

Definition at line 236 of file NMEA2000.h.

◆ LoadEquivalency

unsigned char tNMEA2000::tProductInformation::LoadEquivalency

Load Equivalency of the device A Load Equivalence Number express the amount of current that is drawn from an NMEA 2000 network. 1 equals to 50mA. If a device draws 151mA of current from the network, then its LEN is 4.

Definition at line 243 of file NMEA2000.h.

◆ N2kModelID

char tNMEA2000::tProductInformation::N2kModelID[Max_N2kModelID_len+1]

Max length of ModelID Note that we reserve one extra char for null termination

Definition at line 225 of file NMEA2000.h.

◆ N2kModelSerialCode

char tNMEA2000::tProductInformation::N2kModelSerialCode[Max_N2kModelSerialCode_len+1]

Max length of Serial Code Note that we reserve one extra char for null termination.

Definition at line 234 of file NMEA2000.h.

◆ N2kModelVersion

char tNMEA2000::tProductInformation::N2kModelVersion[Max_N2kModelVersion_len+1]

Max length of Model Version Note that we reserve one extra char for null termination.

Definition at line 231 of file NMEA2000.h.

◆ N2kSwCode

char tNMEA2000::tProductInformation::N2kSwCode[Max_N2kSwCode_len+1]

Max length of Software Code Note that we reserve one extra char for null termination

Definition at line 228 of file NMEA2000.h.

◆ N2kVersion

unsigned short tNMEA2000::tProductInformation::N2kVersion

Version of NMEA2000 Standard that is supported.

Definition at line 219 of file NMEA2000.h.

◆ ProductCode

unsigned short tNMEA2000::tProductInformation::ProductCode

Product Code of the device.

Definition at line 221 of file NMEA2000.h.


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