NMEA2000 Library
0.1
Library to handle NMEA 2000 Communication written in C++
|
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... | |
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.
void tNMEA2000::tProductInformation::Clear | ( | ) |
Clears out all data
Definition at line 627 of file NMEA2000.cpp.
bool tNMEA2000::tProductInformation::IsSame | ( | const tProductInformation & | Other | ) |
Compares two product information structures.
Other | An other product information structure |
true | |
false |
Definition at line 632 of file NMEA2000.cpp.
|
inline |
Set all the product information data of the structure.
_ModelSerialCode | Manufacturer's Model serial code, default="". Max 32 chars. |
_ProductCode | Manufacturer's product code, default=666 |
_ModelID | Manufacturer's Model ID, default="". Max 33 chars |
_SwCode | Manufacturer's software version code, default="". Max 40 chars |
_ModelVersion | Manufacturer's Model version default="". Max 24 chars |
_LoadEquivalency | Load equivalency ( x * 50mA, default=1) |
_N2kVersion | N2k Standard version, default=2101 |
_CertificationLevel | Certification level, default=0 |
Definition at line 262 of file NMEA2000.h.
unsigned char tNMEA2000::tProductInformation::CertificationLevel |
Certification level of the device.
Definition at line 236 of file NMEA2000.h.
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.
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.
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.
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.
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.
unsigned short tNMEA2000::tProductInformation::N2kVersion |
Version of NMEA2000 Standard that is supported.
Definition at line 219 of file NMEA2000.h.
unsigned short tNMEA2000::tProductInformation::ProductCode |
Product Code of the device.
Definition at line 221 of file NMEA2000.h.