NMEA2000 Library  0.1
Library to handle NMEA 2000 Communication written in C++
N2kMessages.h
Go to the documentation of this file.
1/* N2kMessages.h
2 *
3 * Copyright (c) 2015-2024 Timo Lappalainen, Kave Oy, www.kave.fi
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 * SOFTWARE.
21*/
22
23/************************************************************************/
54#ifndef _N2kMessages_H_
55#define _N2kMessages_H_
56
57#include "N2kMsg.h"
58#include "N2kTypes.h"
59#include <string.h>
60#include <stdint.h>
61
62/************************************************************************/
67inline double RadToDeg(double v) { return N2kIsNA(v)?v:v*180.0/3.1415926535897932384626433832795L; }
68
69/************************************************************************/
74inline double DegToRad(double v) { return N2kIsNA(v)?v:v/180.0*3.1415926535897932384626433832795L; }
75
76/************************************************************************/
81inline double CToKelvin(double v) { return N2kIsNA(v)?v:v+273.15L; }
82
83/************************************************************************/
88inline double KelvinToC(double v) { return N2kIsNA(v)?v:v-273.15L; }
89
90/************************************************************************/
95inline double FToKelvin(double v) { return N2kIsNA(v)?v:(v-32)*5.0/9.0+273.15; }
96
97/************************************************************************/
102inline double KelvinToF(double v) { return N2kIsNA(v)?v:(v-273.15)*9.0/5.0+32; }
103
104/************************************************************************/
109inline double mBarToPascal(double v) { return N2kIsNA(v)?v:v*100L; }
110
111/************************************************************************/
116inline double PascalTomBar(double v) { return N2kIsNA(v)?v:v/100L; }
117
118/************************************************************************/
123inline double hPAToPascal(double v) { return N2kIsNA(v)?v:v*100L; }
124
125/************************************************************************/
130inline double PascalTohPA(double v) { return N2kIsNA(v)?v:v/100L; }
131
132/************************************************************************/
137inline double AhToCoulomb(double v) { return N2kIsNA(v)?v:v*3600L; }
138
139/************************************************************************/
144inline double CoulombToAh(double v) { return N2kIsNA(v)?v:v/3600L; }
145
146/************************************************************************/
151inline double hToSeconds(double v) { return N2kIsNA(v)?v:v*3600L; }
152
153/************************************************************************/
158inline double SecondsToh(double v) { return N2kIsNA(v)?v:v/3600L; }
159
160/************************************************************************/
165inline double msToKnots(double v) { return N2kIsNA(v)?v:v*1.9438444924406047516198704103672L; } // 3600L/1852.0L
166
167/************************************************************************/
172inline double KnotsToms(double v) { return N2kIsNA(v)?v:v*0.51444444444444444444444444444444L; } // 1852L/3600.0L
173
174/************************************************************************/
197void SetN2kPGN126992(tN2kMsg &N2kMsg, unsigned char SID, uint16_t SystemDate,
198 double SystemTime, tN2kTimeSource TimeSource=N2ktimes_GPS);
199
200/************************************************************************/
208inline void SetN2kSystemTime(tN2kMsg &N2kMsg, unsigned char SID, uint16_t SystemDate,
209 double SystemTime, tN2kTimeSource TimeSource=N2ktimes_GPS) {
210 SetN2kPGN126992(N2kMsg,SID,SystemDate,SystemTime,TimeSource);
211}
212
213/************************************************************************/
228bool ParseN2kPGN126992(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &SystemDate,
229 double &SystemTime, tN2kTimeSource &TimeSource);
230
231/************************************************************************/
238inline bool ParseN2kSystemTime(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &SystemDate,
239 double &SystemTime, tN2kTimeSource &TimeSource) {
240 return ParseN2kPGN126992(N2kMsg,SID,SystemDate,SystemTime,TimeSource);
241}
242
243/************************************************************************/
264void SetN2kPGN129802(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t SourceID,
265 tN2kAISTransceiverInformation AISTransceiverInformation, char * SafetyRelatedText);
266
267/************************************************************************/
276inline void SetN2kAISSafetyRelatedBroadcastMsg(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t SourceID,
277 tN2kAISTransceiverInformation AISTransceiverInformation, char * SafetyRelatedText) {
278 SetN2kPGN129802(N2kMsg, MessageID, Repeat, SourceID, AISTransceiverInformation, SafetyRelatedText);
279}
280
281/************************************************************************/
307bool ParseN2kPGN129802(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &SourceID,
308 tN2kAISTransceiverInformation &AISTransceiverInformation, char * SafetyRelatedText, size_t &SafetyRelatedTextMaxSize);
309
310/************************************************************************/
318inline bool ParseN2kAISSafetyRelatedBroadcastMsg(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &SourceID,
319 tN2kAISTransceiverInformation &AISTransceiverInformation, char * SafetyRelatedText, size_t &SafetyRelatedTextMaxSize) {
320 return ParseN2kPGN129802(N2kMsg, MessageID, Repeat, SourceID, AISTransceiverInformation, SafetyRelatedText, SafetyRelatedTextMaxSize);
321}
322
323/************************************************************************/
355void SetN2kPGN127233(tN2kMsg &N2kMsg,
356 unsigned char SID,
357 uint32_t MobEmitterId,
358 tN2kMOBStatus MOBStatus,
359 double ActivationTime,
360 tN2kMOBPositionSource PositionSource,
361 uint16_t PositionDate,
362 double PositionTime,
363 double Latitude,
364 double Longitude,
365 tN2kHeadingReference COGReference,
366 double COG,
367 double SOG,
368 uint32_t MMSI,
369 tN2kMOBEmitterBatteryStatus MOBEmitterBatteryStatus);
370
371/************************************************************************/
379inline void SetN2kMOBNotification(tN2kMsg &N2kMsg,
380 unsigned char SID,
381 uint32_t MobEmitterId,
382 tN2kMOBStatus MOBStatus,
383 double ActivationTime,
384 tN2kMOBPositionSource PositionSource,
385 uint16_t PositionDate,
386 double PositionTime,
387 double Latitude,
388 double Longitude,
389 tN2kHeadingReference COGReference,
390 double COG,
391 double SOG,
392 uint32_t MMSI,
393 tN2kMOBEmitterBatteryStatus MOBEmitterBatteryStatus) {
394 SetN2kPGN127233(N2kMsg,SID,MobEmitterId,MOBStatus,ActivationTime,PositionSource,PositionDate,PositionTime,Latitude,Longitude,COGReference,COG,SOG,MMSI,MOBEmitterBatteryStatus);
395}
396
397/************************************************************************/
428bool ParseN2kPGN127233(const tN2kMsg &N2kMsg,
429 unsigned char &SID,
430 uint32_t &MobEmitterId,
431 tN2kMOBStatus &MOBStatus,
432 double &ActivationTime,
433 tN2kMOBPositionSource &PositionSource,
434 uint16_t &PositionDate,
435 double &PositionTime,
436 double &Latitude,
437 double &Longitude,
438 tN2kHeadingReference &COGReference,
439 double &COG,
440 double &SOG,
441 uint32_t &MMSI,
442 tN2kMOBEmitterBatteryStatus &MOBEmitterBatteryStatus);
443
444/************************************************************************/
452inline bool ParseN2kMOBNotification(const tN2kMsg &N2kMsg,
453 unsigned char &SID,
454 uint32_t &MobEmitterId,
455 tN2kMOBStatus &MOBStatus,
456 double &ActivationTime,
457 tN2kMOBPositionSource &PositionSource,
458 uint16_t &PositionDate,
459 double &PositionTime,
460 double &Latitude,
461 double &Longitude,
462 tN2kHeadingReference &COGReference,
463 double &COG,
464 double &SOG,
465 uint32_t &MMSI,
466 tN2kMOBEmitterBatteryStatus &MOBEmitterBatteryStatus) {
467 return ParseN2kPGN127233(N2kMsg,SID,MobEmitterId,MOBStatus,ActivationTime,PositionSource,PositionDate,PositionTime,Latitude,Longitude,COGReference,COG,SOG,MMSI,MOBEmitterBatteryStatus);
468}
469
470/************************************************************************/
499void SetN2kPGN127237(tN2kMsg &N2kMsg,
500 tN2kOnOff RudderLimitExceeded,
501 tN2kOnOff OffHeadingLimitExceeded,
502 tN2kOnOff OffTrackLimitExceeded,
503 tN2kOnOff Override,
504 tN2kSteeringMode SteeringMode,
505 tN2kTurnMode TurnMode,
506 tN2kHeadingReference HeadingReference,
507 tN2kRudderDirectionOrder CommandedRudderDirection,
508 double CommandedRudderAngle,
509 double HeadingToSteerCourse,
510 double Track,
511 double RudderLimit,
512 double OffHeadingLimit,
513 double RadiusOfTurnOrder,
514 double RateOfTurnOrder,
515 double OffTrackLimit,
516 double VesselHeading);
517
518/************************************************************************/
527 tN2kOnOff RudderLimitExceeded,
528 tN2kOnOff OffHeadingLimitExceeded,
529 tN2kOnOff OffTrackLimitExceeded,
530 tN2kOnOff Override,
531 tN2kSteeringMode SteeringMode,
532 tN2kTurnMode TurnMode,
533 tN2kHeadingReference HeadingReference,
534 tN2kRudderDirectionOrder CommandedRudderDirection,
535 double CommandedRudderAngle,
536 double HeadingToSteerCourse,
537 double Track,
538 double RudderLimit,
539 double OffHeadingLimit,
540 double RadiusOfTurnOrder,
541 double RateOfTurnOrder,
542 double OffTrackLimit,
543 double VesselHeading) {
544 SetN2kPGN127237(N2kMsg, RudderLimitExceeded,OffHeadingLimitExceeded,OffTrackLimitExceeded,Override,SteeringMode,TurnMode,
545 HeadingReference,CommandedRudderDirection,CommandedRudderAngle,HeadingToSteerCourse,Track,RudderLimit,OffHeadingLimit,
546 RadiusOfTurnOrder,RateOfTurnOrder,OffTrackLimit,VesselHeading);
547}
548
549/************************************************************************/
580bool ParseN2kPGN127237(const tN2kMsg &N2kMsg,
581 tN2kOnOff &RudderLimitExceeded,
582 tN2kOnOff &OffHeadingLimitExceeded,
583 tN2kOnOff &OffTrackLimitExceeded,
584 tN2kOnOff &Override,
585 tN2kSteeringMode &SteeringMode,
586 tN2kTurnMode &TurnMode,
587 tN2kHeadingReference &HeadingReference,
588 tN2kRudderDirectionOrder &CommandedRudderDirection,
589 double &CommandedRudderAngle,
590 double &HeadingToSteerCourse,
591 double &Track,
592 double &RudderLimit,
593 double &OffHeadingLimit,
594 double &RadiusOfTurnOrder,
595 double &RateOfTurnOrder,
596 double &OffTrackLimit,
597 double &VesselHeading);
598
599/************************************************************************/
607inline bool ParseN2kHeadingTrackControl(const tN2kMsg &N2kMsg,
608 tN2kOnOff &RudderLimitExceeded,
609 tN2kOnOff &OffHeadingLimitExceeded,
610 tN2kOnOff &OffTrackLimitExceeded,
611 tN2kOnOff &Override,
612 tN2kSteeringMode &SteeringMode,
613 tN2kTurnMode &TurnMode,
614 tN2kHeadingReference &HeadingReference,
615 tN2kRudderDirectionOrder &CommandedRudderDirection,
616 double &CommandedRudderAngle,
617 double &HeadingToSteerCourse,
618 double &Track,
619 double &RudderLimit,
620 double &OffHeadingLimit,
621 double &RadiusOfTurnOrder,
622 double &RateOfTurnOrder,
623 double &OffTrackLimit,
624 double &VesselHeading)
625{
626 return ParseN2kPGN127237(N2kMsg,RudderLimitExceeded,OffHeadingLimitExceeded,OffTrackLimitExceeded,Override,SteeringMode,
627 TurnMode,HeadingReference,CommandedRudderDirection, CommandedRudderAngle,HeadingToSteerCourse,Track,RudderLimit,
628 OffHeadingLimit,RadiusOfTurnOrder,RateOfTurnOrder,OffTrackLimit,VesselHeading);
629}
630
631/************************************************************************/
646void SetN2kPGN127245(tN2kMsg &N2kMsg, double RudderPosition, unsigned char Instance=0,
647 tN2kRudderDirectionOrder RudderDirectionOrder=N2kRDO_NoDirectionOrder, double AngleOrder=N2kDoubleNA);
648
649/************************************************************************/
657inline void SetN2kRudder(tN2kMsg &N2kMsg, double RudderPosition, unsigned char Instance=0,
658 tN2kRudderDirectionOrder RudderDirectionOrder=N2kRDO_NoDirectionOrder, double AngleOrder=N2kDoubleNA) {
659 SetN2kPGN127245(N2kMsg,RudderPosition,Instance,RudderDirectionOrder,AngleOrder);
660}
661
662/************************************************************************/
680bool ParseN2kPGN127245(const tN2kMsg &N2kMsg, double &RudderPosition, unsigned char &Instance,
681 tN2kRudderDirectionOrder &RudderDirectionOrder, double &AngleOrder);
682
683/************************************************************************/
691inline bool ParseN2kRudder(const tN2kMsg &N2kMsg, double &RudderPosition, unsigned char &Instance,
692 tN2kRudderDirectionOrder &RudderDirectionOrder, double &AngleOrder) {
693 return ParseN2kPGN127245(N2kMsg,RudderPosition,Instance,RudderDirectionOrder,AngleOrder);
694}
695
696/************************************************************************/
704inline bool ParseN2kRudder(const tN2kMsg &N2kMsg, double &RudderPosition) {
705 tN2kRudderDirectionOrder RudderDirectionOrder;
706 double AngleOrder;
707 unsigned char Instance;
708 return ParseN2kPGN127245(N2kMsg,RudderPosition,Instance,RudderDirectionOrder,AngleOrder);
709}
710
711/************************************************************************/
734void SetN2kPGN127250(tN2kMsg &N2kMsg, unsigned char SID, double Heading, double Deviation, double Variation, tN2kHeadingReference ref);
735
736/************************************************************************/
743inline void SetN2kTrueHeading(tN2kMsg &N2kMsg, unsigned char SID, double Heading) {
745}
746
747/************************************************************************/
754inline void SetN2kMagneticHeading(tN2kMsg &N2kMsg, unsigned char SID, double Heading, double Deviation=N2kDoubleNA, double Variation=N2kDoubleNA) {
755 SetN2kPGN127250(N2kMsg,SID,Heading,Deviation,Variation,N2khr_magnetic);
756}
757
758/************************************************************************/
781bool ParseN2kPGN127250(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heading, double &Deviation, double &Variation, tN2kHeadingReference &ref);
782
783/************************************************************************/
791inline bool ParseN2kHeading(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heading, double &Deviation, double &Variation, tN2kHeadingReference &ref) {
792 return ParseN2kPGN127250(N2kMsg,SID,Heading,Deviation,Variation,ref);
793}
794
795/************************************************************************/
810void SetN2kPGN127251(tN2kMsg &N2kMsg, unsigned char SID, double RateOfTurn);
811
812/************************************************************************/
819inline void SetN2kRateOfTurn(tN2kMsg &N2kMsg, unsigned char SID, double RateOfTurn) {
820 SetN2kPGN127251(N2kMsg,SID,RateOfTurn);
821}
822
823/************************************************************************/
837bool ParseN2kPGN127251(const tN2kMsg &N2kMsg, unsigned char &SID, double &RateOfTurn);
838
839/************************************************************************/
847inline bool ParseN2kRateOfTurn(const tN2kMsg &N2kMsg, unsigned char &SID, double &RateOfTurn) {
848 return ParseN2kPGN127251(N2kMsg,SID,RateOfTurn);
849}
850
851/************************************************************************/
868void SetN2kPGN127252(tN2kMsg &N2kMsg, unsigned char SID, double Heave,
869 double Delay=N2kDoubleNA, tN2kDelaySource DelaySource=N2kDD374_DataNotAvailable);
870
871/************************************************************************/
878inline void SetN2kHeave(tN2kMsg &N2kMsg, unsigned char SID, double Heave,
879 double Delay=N2kDoubleNA, tN2kDelaySource DelaySource=N2kDD374_DataNotAvailable) {
880 SetN2kPGN127252(N2kMsg, SID, Heave, Delay, DelaySource);
881}
882
883/************************************************************************/
901bool ParseN2kPGN127252(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heave, double &Delay, tN2kDelaySource &DelaySource);
902
903/************************************************************************/
911inline bool ParseN2kHeave(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heave) {
912 double Delay;
913 tN2kDelaySource DelaySource;
914 return ParseN2kPGN127252(N2kMsg, SID, Heave, Delay, DelaySource);
915}
916/************************************************************************/
924inline bool ParseN2kHeave(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heave, double &Delay, tN2kDelaySource &DelaySource) {
925 return ParseN2kPGN127252(N2kMsg, SID, Heave, Delay, DelaySource);
926}
927
928/************************************************************************/
948void SetN2kPGN127257(tN2kMsg &N2kMsg, unsigned char SID, double Yaw, double Pitch, double Roll);
949
950/************************************************************************/
957inline void SetN2kAttitude(tN2kMsg &N2kMsg, unsigned char SID, double Yaw, double Pitch, double Roll) {
958 SetN2kPGN127257(N2kMsg,SID, Yaw, Pitch, Roll);
959}
960
961/************************************************************************/
980bool ParseN2kPGN127257(const tN2kMsg &N2kMsg, unsigned char &SID, double &Yaw, double &Pitch, double &Roll);
981
982/************************************************************************/
990inline bool ParseN2kAttitude(const tN2kMsg &N2kMsg, unsigned char &SID, double &Yaw, double &Pitch, double &Roll) {
991 return ParseN2kPGN127257(N2kMsg,SID, Yaw, Pitch, Roll);
992}
993
994/************************************************************************/
1015void SetN2kPGN127258(tN2kMsg &N2kMsg, unsigned char SID, tN2kMagneticVariation Source, uint16_t DaysSince1970, double Variation);
1016
1017/************************************************************************/
1024inline void SetN2kMagneticVariation(tN2kMsg &N2kMsg, unsigned char SID, tN2kMagneticVariation Source, uint16_t DaysSince1970, double Variation) {
1025 SetN2kPGN127258(N2kMsg, SID, Source, DaysSince1970, Variation);
1026}
1027
1028/************************************************************************/
1048bool ParseN2kPGN127258(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kMagneticVariation &Source, uint16_t &DaysSince1970, double &Variation);
1049
1050/************************************************************************/
1058inline bool ParseN2kMagneticVariation(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kMagneticVariation &Source, uint16_t &DaysSince1970, double &Variation) {
1059 return ParseN2kPGN127258(N2kMsg, SID, Source, DaysSince1970, Variation);
1060}
1061
1062/************************************************************************/
1077void SetN2kPGN127488(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineSpeed,
1078 double EngineBoostPressure=N2kDoubleNA, int8_t EngineTiltTrim=N2kInt8NA);
1079
1080/************************************************************************/
1087inline void SetN2kEngineParamRapid(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineSpeed,
1088 double EngineBoostPressure=N2kDoubleNA, int8_t EngineTiltTrim=N2kInt8NA) {
1089 SetN2kPGN127488(N2kMsg,EngineInstance,EngineSpeed,EngineBoostPressure,EngineTiltTrim);
1090}
1091
1092/************************************************************************/
1109bool ParseN2kPGN127488(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineSpeed,
1110 double &EngineBoostPressure, int8_t &EngineTiltTrim);
1111
1112/************************************************************************/
1120inline bool ParseN2kEngineParamRapid(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineSpeed,
1121 double &EngineBoostPressure, int8_t &EngineTiltTrim) {
1122 return ParseN2kPGN127488(N2kMsg,EngineInstance,EngineSpeed,EngineBoostPressure,EngineTiltTrim);
1123}
1124
1125/************************************************************************/
1153void SetN2kPGN127489(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineOilPress, double EngineOilTemp, double EngineCoolantTemp, double AltenatorVoltage,
1154 double FuelRate, double EngineHours, double EngineCoolantPress=N2kDoubleNA, double EngineFuelPress=N2kDoubleNA,
1155 int8_t EngineLoad=N2kInt8NA, int8_t EngineTorque=N2kInt8NA,
1157
1158/************************************************************************/
1165inline void SetN2kEngineDynamicParam(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineOilPress, double EngineOilTemp, double EngineCoolantTemp, double AltenatorVoltage,
1166 double FuelRate, double EngineHours, double EngineCoolantPress=N2kDoubleNA, double EngineFuelPress=N2kDoubleNA,
1167 int8_t EngineLoad=N2kInt8NA, int8_t EngineTorque=N2kInt8NA,
1169 SetN2kPGN127489(N2kMsg,EngineInstance, EngineOilPress, EngineOilTemp, EngineCoolantTemp, AltenatorVoltage,
1170 FuelRate, EngineHours, EngineCoolantPress, EngineFuelPress, EngineLoad, EngineTorque,
1171 Status1,Status2);
1172}
1173
1174/************************************************************************/
1221inline void SetN2kPGN127489(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineOilPress, double EngineOilTemp, double EngineCoolantTemp, double AltenatorVoltage,
1222 double FuelRate, double EngineHours, double EngineCoolantPress=N2kDoubleNA, double EngineFuelPress=N2kDoubleNA,
1223 int8_t EngineLoad=N2kInt8NA, int8_t EngineTorque=N2kInt8NA,
1224 bool flagCheckEngine=false, bool flagOverTemp=false, bool flagLowOilPress=false, bool flagLowOilLevel=false,
1225 bool flagLowFuelPress=false, bool flagLowSystemVoltage=false, bool flagLowCoolantLevel=false, bool flagWaterFlow=false,
1226 bool flagWaterInFuel=false, bool flagChargeIndicator=false, bool flagPreheatIndicator=false, bool flagHighBoostPress=false,
1227 bool flagRevLimitExceeded=false, bool flagEgrSystem=false, bool flagTPS=false, bool flagEmergencyStopMode=false,
1228 bool flagWarning1=false, bool flagWarning2=false, bool flagPowerReduction=false, bool flagMaintenanceNeeded=false,
1229 bool flagEngineCommError=false, bool flagSubThrottle=false, bool flagNeutralStartProtect=false, bool flagEngineShuttingDown=false) {
1232 Status1.Bits.CheckEngine=flagCheckEngine;
1233 Status1.Bits.OverTemperature=flagOverTemp;
1234 Status1.Bits.LowOilPressure=flagLowOilPress;
1235 Status1.Bits.LowOilLevel=flagLowOilLevel;
1236 Status1.Bits.LowFuelPressure=flagLowFuelPress;
1237 Status1.Bits.LowSystemVoltage=flagLowSystemVoltage;
1238 Status1.Bits.LowCoolantLevel=flagLowCoolantLevel;
1239 Status1.Bits.WaterFlow=flagWaterFlow;
1240 Status1.Bits.WaterInFuel=flagWaterInFuel;
1241 Status1.Bits.ChargeIndicator=flagChargeIndicator;
1242 Status1.Bits.PreheatIndicator=flagPreheatIndicator;
1243 Status1.Bits.HighBoostPressure=flagHighBoostPress;
1244 Status1.Bits.RevLimitExceeded=flagRevLimitExceeded;
1245 Status1.Bits.EGRSystem=flagEgrSystem;
1246 Status1.Bits.ThrottlePositionSensor=flagTPS;
1247 Status1.Bits.EngineEmergencyStopMode=flagEmergencyStopMode;
1248 Status2.Bits.WarningLevel1=flagWarning1;
1249 Status2.Bits.WarningLevel2=flagWarning2;
1250 Status2.Bits.LowOiPowerReduction=flagPowerReduction;
1251 Status2.Bits.MaintenanceNeeded=flagMaintenanceNeeded;
1252 Status2.Bits.EngineCommError=flagEngineCommError;
1253 Status2.Bits.SubOrSecondaryThrottle=flagSubThrottle;
1254 Status2.Bits.NeutralStartProtect=flagNeutralStartProtect;
1255 Status2.Bits.EngineShuttingDown=flagEngineShuttingDown;
1256
1257 SetN2kPGN127489(N2kMsg,EngineInstance, EngineOilPress, EngineOilTemp, EngineCoolantTemp, AltenatorVoltage,
1258 FuelRate, EngineHours, EngineCoolantPress, EngineFuelPress, EngineLoad, EngineTorque,
1259 Status1,Status2);
1260}
1261
1262/************************************************************************/
1269inline void SetN2kEngineDynamicParam(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineOilPress, double EngineOilTemp, double EngineCoolantTemp, double AltenatorVoltage,
1270 double FuelRate, double EngineHours, double EngineCoolantPress=N2kDoubleNA, double EngineFuelPress=N2kDoubleNA,
1271 int8_t EngineLoad=N2kInt8NA, int8_t EngineTorque=N2kInt8NA,
1272 bool flagCheckEngine=false, bool flagOverTemp=false, bool flagLowOilPress=false, bool flagLowOilLevel=false,
1273 bool flagLowFuelPress=false, bool flagLowSystemVoltage=false, bool flagLowCoolantLevel=false, bool flagWaterFlow=false,
1274 bool flagWaterInFuel=false, bool flagChargeIndicator=false, bool flagPreheatIndicator=false, bool flagHighBoostPress=false,
1275 bool flagRevLimitExceeded=false, bool flagEgrSystem=false, bool flagTPS=false, bool flagEmergencyStopMode=false,
1276 bool flagWarning1=false, bool flagWarning2=false, bool flagPowerReduction=false, bool flagMaintenanceNeeded=false,
1277 bool flagEngineCommError=false, bool flagSubThrottle=false, bool flagNeutralStartProtect=false, bool flagEngineShuttingDown=false) {
1278 SetN2kPGN127489(N2kMsg,EngineInstance, EngineOilPress, EngineOilTemp, EngineCoolantTemp, AltenatorVoltage,
1279 FuelRate, EngineHours, EngineCoolantPress, EngineFuelPress, EngineLoad, EngineTorque,
1280 flagCheckEngine, flagOverTemp, flagLowOilPress, flagLowOilLevel,
1281 flagLowFuelPress, flagLowSystemVoltage, flagLowCoolantLevel, flagWaterFlow,
1282 flagWaterInFuel, flagChargeIndicator, flagPreheatIndicator, flagHighBoostPress,
1283 flagRevLimitExceeded, flagEgrSystem, flagTPS, flagEmergencyStopMode,
1284 flagWarning1, flagWarning2, flagPowerReduction, flagMaintenanceNeeded,
1285 flagEngineCommError, flagSubThrottle, flagNeutralStartProtect, flagEngineShuttingDown);
1286}
1287
1288/************************************************************************/
1317bool ParseN2kPGN127489(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineOilPress,
1318 double &EngineOilTemp, double &EngineCoolantTemp, double &AltenatorVoltage,
1319 double &FuelRate, double &EngineHours, double &EngineCoolantPress, double &EngineFuelPress,
1320 int8_t &EngineLoad, int8_t &EngineTorque,
1322
1323/************************************************************************/
1331inline bool ParseN2kPGN127489(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineOilPress,
1332 double &EngineOilTemp, double &EngineCoolantTemp, double &AltenatorVoltage,
1333 double &FuelRate, double &EngineHours, double &EngineCoolantPress, double &EngineFuelPress,
1334 int8_t &EngineLoad, int8_t &EngineTorque) {
1337 return ParseN2kPGN127489(N2kMsg, EngineInstance, EngineOilPress,
1338 EngineOilTemp, EngineCoolantTemp, AltenatorVoltage,
1339 FuelRate, EngineHours,EngineCoolantPress, EngineFuelPress,
1340 EngineLoad, EngineTorque,Status1,Status2);
1341}
1342
1343/************************************************************************/
1351inline bool ParseN2kEngineDynamicParam(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineOilPress,
1352 double &EngineOilTemp, double &EngineCoolantTemp, double &AltenatorVoltage,
1353 double &FuelRate, double &EngineHours, double &EngineCoolantPress, double &EngineFuelPress,
1354 int8_t &EngineLoad, int8_t &EngineTorque) {
1355 return ParseN2kPGN127489(N2kMsg, EngineInstance, EngineOilPress,
1356 EngineOilTemp, EngineCoolantTemp, AltenatorVoltage,
1357 FuelRate, EngineHours,EngineCoolantPress, EngineFuelPress,
1358 EngineLoad, EngineTorque);
1359}
1360
1361/************************************************************************/
1369inline bool ParseN2kEngineDynamicParam(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineOilPress,
1370 double &EngineOilTemp, double &EngineCoolantTemp, double &AltenatorVoltage,
1371 double &FuelRate, double &EngineHours, double &EngineCoolantPress, double &EngineFuelPress,
1372 int8_t &EngineLoad, int8_t &EngineTorque,
1374 return ParseN2kPGN127489(N2kMsg, EngineInstance, EngineOilPress,
1375 EngineOilTemp, EngineCoolantTemp, AltenatorVoltage,
1376 FuelRate, EngineHours,EngineCoolantPress, EngineFuelPress,
1377 EngineLoad, EngineTorque,
1378 Status1, Status2);
1379}
1380
1381/************************************************************************/
1389inline bool ParseN2kEngineDynamicParam(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineOilPress,
1390 double &EngineOilTemp, double &EngineCoolantTemp, double &AltenatorVoltage,
1391 double &FuelRate, double &EngineHours) {
1392 double EngineCoolantPress, EngineFuelPress;
1393 int8_t EngineLoad, EngineTorque;
1396 return ParseN2kPGN127489(N2kMsg, EngineInstance, EngineOilPress,
1397 EngineOilTemp, EngineCoolantTemp, AltenatorVoltage,
1398 FuelRate, EngineHours,EngineCoolantPress, EngineFuelPress,
1399 EngineLoad, EngineTorque,Status1,Status2);
1400}
1401
1402/************************************************************************/
1420void SetN2kPGN127493(tN2kMsg &N2kMsg, unsigned char EngineInstance, tN2kTransmissionGear TransmissionGear,
1421 double OilPressure, double OilTemperature, unsigned char DiscreteStatus1=0);
1422
1423/************************************************************************/
1430inline void SetN2kTransmissionParameters(tN2kMsg &N2kMsg, unsigned char EngineInstance, tN2kTransmissionGear TransmissionGear,
1431 double OilPressure, double OilTemperature, unsigned char DiscreteStatus1=0) {
1432 SetN2kPGN127493(N2kMsg, EngineInstance, TransmissionGear, OilPressure, OilTemperature, DiscreteStatus1);
1433}
1434
1435/************************************************************************/
1442inline void SetN2kTransmissionParameters(tN2kMsg &N2kMsg, unsigned char EngineInstance, tN2kTransmissionGear TransmissionGear,
1443 double OilPressure, double OilTemperature,
1444 bool flagCheck, bool flagOverTemp, bool flagLowOilPressure=false, bool flagLowOilLevel=false,
1445 bool flagSailDrive=false) {
1446 unsigned char DiscreteStatus1=0;
1447
1448 if (flagCheck) DiscreteStatus1 |= BIT(0);
1449 if (flagOverTemp) DiscreteStatus1 |= BIT(1);
1450 if (flagLowOilPressure) DiscreteStatus1 |= BIT(2);
1451 if (flagLowOilLevel) DiscreteStatus1 |= BIT(3);
1452 if (flagSailDrive) DiscreteStatus1 |= BIT(4);
1453 SetN2kPGN127493(N2kMsg, EngineInstance, TransmissionGear, OilPressure, OilTemperature,DiscreteStatus1);
1454}
1455/************************************************************************/
1476bool ParseN2kPGN127493(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, tN2kTransmissionGear &TransmissionGear,
1477 double &OilPressure, double &OilTemperature, unsigned char &DiscreteStatus1);
1478
1479/************************************************************************/
1487inline bool ParseN2kTransmissionParameters(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, tN2kTransmissionGear &TransmissionGear,
1488 double &OilPressure, double &OilTemperature, unsigned char &DiscreteStatus1) {
1489 return ParseN2kPGN127493(N2kMsg, EngineInstance, TransmissionGear, OilPressure, OilTemperature, DiscreteStatus1);
1490}
1491
1492/************************************************************************/
1500inline bool ParseN2kTransmissionParameters(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, tN2kTransmissionGear &TransmissionGear,
1501 double &OilPressure, double &OilTemperature,
1502 bool &flagCheck, bool &flagOverTemp, bool &flagLowOilPressure, bool &flagLowOilLevel,
1503 bool &flagSailDrive) {
1504 unsigned char DiscreteStatus1;
1505 bool ret=ParseN2kPGN127493(N2kMsg, EngineInstance, TransmissionGear, OilPressure, OilTemperature, DiscreteStatus1);
1506 if (ret) {
1507 flagCheck = ((DiscreteStatus1 & BIT(0))!=0);
1508 flagOverTemp = ((DiscreteStatus1 & BIT(1))!=0);
1509 flagLowOilPressure = ((DiscreteStatus1 & BIT(2))!=0);
1510 flagLowOilLevel = ((DiscreteStatus1 & BIT(3))!=0);
1511 flagSailDrive = ((DiscreteStatus1 & BIT(4))!=0);
1512 }
1513 return ret;
1514}
1515
1516/************************************************************************/
1531void SetN2kPGN127497(tN2kMsg &N2kMsg, unsigned char EngineInstance, double TripFuelUsed,
1532 double FuelRateAverage,
1533 double FuelRateEconomy=N2kDoubleNA, double InstantaneousFuelEconomy=N2kDoubleNA);
1534
1535/************************************************************************/
1542inline void SetN2kEngineTripParameters(tN2kMsg &N2kMsg, unsigned char EngineInstance, double TripFuelUsed,
1543 double FuelRateAverage,
1544 double FuelRateEconomy=N2kDoubleNA, double InstantaneousFuelEconomy=N2kDoubleNA) {
1545 SetN2kPGN127497(N2kMsg,EngineInstance,TripFuelUsed,FuelRateAverage,FuelRateEconomy,InstantaneousFuelEconomy);
1546}
1547
1548/************************************************************************/
1565bool ParseN2kPGN127497(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &TripFuelUsed,
1566 double &FuelRateAverage,
1567 double &FuelRateEconomy, double &InstantaneousFuelEconomy);
1568
1569/************************************************************************/
1577inline bool ParseN2kEngineTripParameters(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &TripFuelUsed,
1578 double &FuelRateAverage,
1579 double &FuelRateEconomy, double &InstantaneousFuelEconomy) {
1580 return ParseN2kPGN127497(N2kMsg,EngineInstance,TripFuelUsed,FuelRateAverage,FuelRateEconomy, InstantaneousFuelEconomy);
1581}
1582
1583/************************************************************************/
1589typedef uint64_t tN2kBinaryStatus;
1590
1591/************************************************************************/
1606tN2kOnOff N2kGetStatusOnBinaryStatus(tN2kBinaryStatus BankStatus, uint8_t ItemIndex=1);
1607
1608/************************************************************************/
1616inline void N2kResetBinaryStatus(tN2kBinaryStatus &BankStatus) { BankStatus=0xffffffffffffffffULL; }
1617
1618/************************************************************************/
1629void N2kSetStatusBinaryOnStatus(tN2kBinaryStatus &BankStatus, tN2kOnOff ItemStatus, uint8_t ItemIndex=1);
1630
1631/************************************************************************/
1646void SetN2kPGN127501(tN2kMsg &N2kMsg, unsigned char DeviceBankInstance, tN2kBinaryStatus BankStatus);
1647
1648/************************************************************************/
1655inline void SetN2kBinaryStatus(tN2kMsg &N2kMsg, unsigned char DeviceBankInstance, tN2kBinaryStatus BankStatus) {
1656 SetN2kPGN127501(N2kMsg,DeviceBankInstance,BankStatus);
1657}
1658
1659/************************************************************************/
1679void SetN2kPGN127501(tN2kMsg &N2kMsg, unsigned char DeviceBankInstance
1680 ,tN2kOnOff Status1
1684 );
1685
1686/************************************************************************/
1693inline void SetN2kBinaryStatus(tN2kMsg &N2kMsg, unsigned char DeviceBankInstance
1694 ,tN2kOnOff Status1
1698 ) {
1699 SetN2kPGN127501(N2kMsg, DeviceBankInstance,Status1,Status2,Status3,Status4);
1700}
1701
1702/************************************************************************/
1726bool ParseN2kPGN127501(const tN2kMsg &N2kMsg, unsigned char &DeviceBankInstance
1727 ,tN2kOnOff &Status1
1728 ,tN2kOnOff &Status2
1729 ,tN2kOnOff &Status3
1730 ,tN2kOnOff &Status4
1731 );
1732
1733/************************************************************************/
1741inline bool ParseN2kBinaryStatus(const tN2kMsg &N2kMsg, unsigned char &DeviceBankInstance
1742 ,tN2kOnOff &Status1
1743 ,tN2kOnOff &Status2
1744 ,tN2kOnOff &Status3
1745 ,tN2kOnOff &Status4
1746 ) {
1747 return ParseN2kPGN127501(N2kMsg,DeviceBankInstance,Status1,Status2,Status3,Status4);
1748}
1749
1750/************************************************************************/
1772bool ParseN2kPGN127501(const tN2kMsg &N2kMsg, unsigned char &DeviceBankInstance, tN2kBinaryStatus &BankStatus);
1773
1774/************************************************************************/
1782inline bool ParseN2kBinaryStatus(const tN2kMsg &N2kMsg, unsigned char &DeviceBankInstance, tN2kBinaryStatus &BankStatus) {
1783 return ParseN2kPGN127501(N2kMsg,DeviceBankInstance,BankStatus);
1784}
1785
1786/************************************************************************/
1809bool ParseN2kPGN127502(const tN2kMsg &N2kMsg, unsigned char &TargetBankInstance, tN2kBinaryStatus &BankStatus);
1810
1811/************************************************************************/
1818inline bool ParseN2kSwitchbankControl(const tN2kMsg &N2kMsg, unsigned char &TargetBankInstance, tN2kBinaryStatus &BankStatus) {
1819 return ParseN2kPGN127502(N2kMsg, TargetBankInstance, BankStatus);
1820}
1821
1822/************************************************************************/
1853void SetN2kPGN127502(tN2kMsg &N2kMsg, unsigned char TargetBankInstance, tN2kBinaryStatus BankStatus);
1854
1855/************************************************************************/
1862inline void SetN2kSwitchbankControl(tN2kMsg &N2kMsg, unsigned char TargetBankInstance, tN2kBinaryStatus BankStatus) {
1863 SetN2kPGN127502(N2kMsg, TargetBankInstance, BankStatus);
1864}
1865
1866/************************************************************************/
1885void SetN2kPGN127505(tN2kMsg &N2kMsg, unsigned char Instance, tN2kFluidType FluidType, double Level, double Capacity);
1886
1887/************************************************************************/
1894inline void SetN2kFluidLevel(tN2kMsg &N2kMsg, unsigned char Instance, tN2kFluidType FluidType, double Level, double Capacity) {
1895 SetN2kPGN127505(N2kMsg, Instance, FluidType, Level, Capacity);
1896}
1897
1898/************************************************************************/
1919bool ParseN2kPGN127505(const tN2kMsg &N2kMsg, unsigned char &Instance, tN2kFluidType &FluidType, double &Level, double &Capacity);
1920
1921/************************************************************************/
1929inline bool ParseN2kFluidLevel(const tN2kMsg &N2kMsg, unsigned char &Instance, tN2kFluidType &FluidType, double &Level, double &Capacity) {
1930 return ParseN2kPGN127505(N2kMsg, Instance, FluidType, Level, Capacity);
1931}
1932
1933/************************************************************************/
1957void SetN2kPGN127506(tN2kMsg &N2kMsg, unsigned char SID, unsigned char DCInstance, tN2kDCType DCType,
1958 unsigned char StateOfCharge, unsigned char StateOfHealth, double TimeRemaining, double RippleVoltage=N2kDoubleNA, double Capacity=N2kDoubleNA);
1959
1960/************************************************************************/
1967inline void SetN2kDCStatus(tN2kMsg &N2kMsg, unsigned char SID, unsigned char DCInstance, tN2kDCType DCType,
1968 unsigned char StateOfCharge, unsigned char StateOfHealth, double TimeRemaining, double RippleVoltage=N2kDoubleNA, double Capacity=N2kDoubleNA) {
1969 SetN2kPGN127506(N2kMsg,SID,DCInstance,DCType,StateOfCharge,StateOfHealth,TimeRemaining,RippleVoltage,Capacity);
1970}
1971
1972/************************************************************************/
1995bool ParseN2kPGN127506(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &DCInstance, tN2kDCType &DCType,
1996 unsigned char &StateOfCharge, unsigned char &StateOfHealth, double &TimeRemaining, double &RippleVoltage, double &Capacity);
1997
1998/************************************************************************/
2006inline bool ParseN2kDCStatus(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &DCInstance, tN2kDCType &DCType,
2007 unsigned char &StateOfCharge, unsigned char &StateOfHealth, double &TimeRemaining, double &RippleVoltage, double &Capacity) {
2008 return ParseN2kPGN127506(N2kMsg,SID,DCInstance,DCType,StateOfCharge,StateOfHealth,TimeRemaining,RippleVoltage, Capacity);
2009}
2010
2011/************************************************************************/
2029void SetN2kPGN127507(tN2kMsg &N2kMsg, unsigned char Instance, unsigned char BatteryInstance,
2030 tN2kChargeState ChargeState, tN2kChargerMode ChargerMode=N2kCM_Standalone,
2031 tN2kOnOff Enabled=N2kOnOff_On, tN2kOnOff EqualizationPending=N2kOnOff_Unavailable, double EqualizationTimeRemaining=N2kDoubleNA);
2032
2033/************************************************************************/
2040inline void SetN2kChargerStatus(tN2kMsg &N2kMsg, unsigned char Instance, unsigned char BatteryInstance,
2041 tN2kChargeState ChargeState, tN2kChargerMode ChargerMode=N2kCM_Standalone,
2042 tN2kOnOff Enabled=N2kOnOff_On, tN2kOnOff EqualizationPending=N2kOnOff_Unavailable, double EqualizationTimeRemaining=N2kDoubleNA) {
2043 SetN2kPGN127507(N2kMsg, Instance,BatteryInstance,ChargeState,ChargerMode,Enabled,EqualizationPending,EqualizationTimeRemaining);
2044}
2045
2046/************************************************************************/
2067bool ParseN2kPGN127507(const tN2kMsg &N2kMsg, unsigned char &Instance, unsigned char &BatteryInstance,
2068 tN2kChargeState &ChargeState, tN2kChargerMode &ChargerMode,
2069 tN2kOnOff &Enabled, tN2kOnOff &EqualizationPending, double &EqualizationTimeRemaining);
2070
2071/************************************************************************/
2079inline bool ParseN2kChargerStatus(const tN2kMsg &N2kMsg, unsigned char &Instance, unsigned char &BatteryInstance,
2080 tN2kChargeState &ChargeState, tN2kChargerMode &ChargerMode,
2081 tN2kOnOff &Enabled, tN2kOnOff &EqualizationPending, double &EqualizationTimeRemaining) {
2082 return ParseN2kPGN127507(N2kMsg, Instance,BatteryInstance,ChargeState,ChargerMode,Enabled,EqualizationPending,EqualizationTimeRemaining);
2083}
2084
2085/************************************************************************/
2106void SetN2kPGN127508(tN2kMsg &N2kMsg, unsigned char BatteryInstance, double BatteryVoltage, double BatteryCurrent=N2kDoubleNA,
2107 double BatteryTemperature=N2kDoubleNA, unsigned char SID=0xff);
2108
2109/************************************************************************/
2116inline void SetN2kDCBatStatus(tN2kMsg &N2kMsg, unsigned char BatteryInstance, double BatteryVoltage, double BatteryCurrent=N2kDoubleNA,
2117 double BatteryTemperature=N2kDoubleNA, unsigned char SID=1) {
2118 SetN2kPGN127508(N2kMsg,BatteryInstance,BatteryVoltage,BatteryCurrent,BatteryTemperature,SID);
2119}
2120
2121/************************************************************************/
2143bool ParseN2kPGN127508(const tN2kMsg &N2kMsg, unsigned char &BatteryInstance, double &BatteryVoltage, double &BatteryCurrent,
2144 double &BatteryTemperature, unsigned char &SID);
2145
2146/************************************************************************/
2154inline bool ParseN2kDCBatStatus(const tN2kMsg &N2kMsg, unsigned char &BatteryInstance, double &BatteryVoltage, double &BatteryCurrent,
2155 double &BatteryTemperature, unsigned char &SID) {
2156 return ParseN2kPGN127508(N2kMsg, BatteryInstance, BatteryVoltage, BatteryCurrent, BatteryTemperature, SID);
2157}
2158
2159/************************************************************************/
2179void SetN2kPGN127513(tN2kMsg &N2kMsg, unsigned char BatInstance, tN2kBatType BatType, tN2kBatEqSupport SupportsEqual,
2180 tN2kBatNomVolt BatNominalVoltage, tN2kBatChem BatChemistry, double BatCapacity, int8_t BatTemperatureCoefficient,
2181 double PeukertExponent, int8_t ChargeEfficiencyFactor);
2182
2183/************************************************************************/
2190inline void SetN2kBatConf(tN2kMsg &N2kMsg, unsigned char BatInstance, tN2kBatType BatType, tN2kBatEqSupport SupportsEqual,
2191 tN2kBatNomVolt BatNominalVoltage, tN2kBatChem BatChemistry, double BatCapacity, int8_t BatTemperatureCoefficient,
2192 double PeukertExponent, int8_t ChargeEfficiencyFactor) {
2193 SetN2kPGN127513(N2kMsg,BatInstance,BatType,SupportsEqual,BatNominalVoltage,BatChemistry,BatCapacity,BatTemperatureCoefficient,
2194 PeukertExponent,ChargeEfficiencyFactor);
2195}
2196/************************************************************************/
2220bool ParseN2kPGN127513(const tN2kMsg &N2kMsg, unsigned char &BatInstance, tN2kBatType &BatType, tN2kBatEqSupport &SupportsEqual,
2221 tN2kBatNomVolt &BatNominalVoltage, tN2kBatChem &BatChemistry, double &BatCapacity, int8_t &BatTemperatureCoefficient,
2222 double &PeukertExponent, int8_t &ChargeEfficiencyFactor);
2223
2224/************************************************************************/
2232inline bool ParseN2kBatConf(const tN2kMsg &N2kMsg, unsigned char &BatInstance, tN2kBatType &BatType, tN2kBatEqSupport &SupportsEqual,
2233 tN2kBatNomVolt &BatNominalVoltage, tN2kBatChem &BatChemistry, double &BatCapacity, int8_t &BatTemperatureCoefficient,
2234 double &PeukertExponent, int8_t &ChargeEfficiencyFactor) {
2235 return ParseN2kPGN127513(N2kMsg,BatInstance,BatType,SupportsEqual,BatNominalVoltage,BatChemistry,BatCapacity,BatTemperatureCoefficient,
2236 PeukertExponent,ChargeEfficiencyFactor);
2237}
2238
2239/************************************************************************/
2274void SetN2kPGN128000(tN2kMsg &N2kMsg, unsigned char SID, double Leeway);
2275
2276/************************************************************************/
2283inline void SetN2kLeeway(tN2kMsg &N2kMsg, unsigned char SID, double Leeway) {
2284 SetN2kPGN128000(N2kMsg,SID,Leeway);
2285}
2286
2287/************************************************************************/
2323bool ParseN2kPGN128000(const tN2kMsg &N2kMsg, unsigned char &SID, double &Leeway);
2324
2325/************************************************************************/
2333inline bool ParseN2kLeeway(const tN2kMsg &N2kMsg, unsigned char &SID, double &Leeway) {
2334 return ParseN2kPGN128000(N2kMsg, SID, Leeway);
2335}
2336
2337/************************************************************************/
2357void SetN2kPGN128259(tN2kMsg &N2kMsg, unsigned char SID, double WaterReferenced, double GroundReferenced=N2kDoubleNA, tN2kSpeedWaterReferenceType SWRT=N2kSWRT_Paddle_wheel);
2358
2359/************************************************************************/
2366inline void SetN2kBoatSpeed(tN2kMsg &N2kMsg, unsigned char SID, double WaterReferenced, double GroundReferenced=N2kDoubleNA, tN2kSpeedWaterReferenceType SWRT=N2kSWRT_Paddle_wheel) {
2367 SetN2kPGN128259(N2kMsg,SID,WaterReferenced,GroundReferenced,SWRT);
2368}
2369
2370/************************************************************************/
2389bool ParseN2kPGN128259(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterReferenced, double &GroundReferenced, tN2kSpeedWaterReferenceType &SWRT);
2390
2391/************************************************************************/
2399inline bool ParseN2kBoatSpeed(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterReferenced, double &GroundReferenced, tN2kSpeedWaterReferenceType &SWRT) {
2400 return ParseN2kPGN128259(N2kMsg, SID, WaterReferenced, GroundReferenced, SWRT);
2401}
2402
2403/************************************************************************/
2423void SetN2kPGN128267(tN2kMsg &N2kMsg, unsigned char SID, double DepthBelowTransducer, double Offset, double Range=N2kDoubleNA);
2424
2425/************************************************************************/
2432inline void SetN2kWaterDepth(tN2kMsg &N2kMsg, unsigned char SID, double DepthBelowTransducer, double Offset, double Range=N2kDoubleNA) {
2433 SetN2kPGN128267(N2kMsg,SID,DepthBelowTransducer,Offset,Range);
2434}
2435
2436/************************************************************************/
2456bool ParseN2kPGN128267(const tN2kMsg &N2kMsg, unsigned char &SID, double &DepthBelowTransducer, double &Offset, double &Range);
2457
2458/************************************************************************/
2466inline bool ParseN2kWaterDepth(const tN2kMsg &N2kMsg, unsigned char &SID, double &DepthBelowTransducer, double &Offset) {
2467 double Range;
2468 return ParseN2kPGN128267(N2kMsg, SID, DepthBelowTransducer, Offset, Range);
2469}
2470
2471/************************************************************************/
2479inline bool ParseN2kWaterDepth(const tN2kMsg &N2kMsg, unsigned char &SID, double &DepthBelowTransducer, double &Offset, double &Range) {
2480 return ParseN2kPGN128267(N2kMsg, SID, DepthBelowTransducer, Offset, Range);
2481}
2482
2483
2484/************************************************************************/
2503void SetN2kPGN128275(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, uint32_t Log, uint32_t TripLog);
2504
2505/************************************************************************/
2512inline void SetN2kDistanceLog(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, uint32_t Log, uint32_t TripLog) {
2513 SetN2kPGN128275(N2kMsg,DaysSince1970,SecondsSinceMidnight,Log,TripLog);
2514}
2515
2516/************************************************************************/
2538bool ParseN2kPGN128275(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, uint32_t &Log, uint32_t &TripLog);
2539
2540/************************************************************************/
2548inline bool ParseN2kDistanceLog(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, uint32_t &Log, uint32_t &TripLog) {
2549 return ParseN2kPGN128275(N2kMsg,DaysSince1970,SecondsSinceMidnight,Log,TripLog);
2550}
2551
2552/************************************************************************/
2599void SetN2kPGN128776(
2600 tN2kMsg &N2kMsg,
2601 unsigned char SID,
2602 unsigned char WindlassIdentifier,
2603 tN2kWindlassDirectionControl WindlassDirectionControl,
2604 unsigned char SpeedControl,
2605 tN2kSpeedType SpeedControlType = N2kDD488_DataNotAvailable,
2606 tN2kGenericStatusPair AnchorDockingControl = N2kDD002_Unavailable,
2609 tN2kGenericStatusPair DeckAndAnchorWash = N2kDD002_Unavailable,
2611 double CommandTimeout = 0.4,
2612 const tN2kWindlassControlEvents &WindlassControlEvents = tN2kWindlassControlEvents()
2613);
2614
2615/************************************************************************/
2663 const tN2kMsg &N2kMsg,
2664 unsigned char &SID,
2665 unsigned char &WindlassIdentifier,
2666 tN2kWindlassDirectionControl &WindlassDirectionControl,
2667 unsigned char &SpeedControl,
2668 tN2kSpeedType &SpeedControlType,
2669 tN2kGenericStatusPair &AnchorDockingControl,
2670 tN2kGenericStatusPair &PowerEnable,
2671 tN2kGenericStatusPair &MechanicalLock,
2672 tN2kGenericStatusPair &DeckAndAnchorWash,
2673 tN2kGenericStatusPair &AnchorLight,
2674 double &CommandTimeout,
2675 tN2kWindlassControlEvents &WindlassControlEvents
2676);
2677
2678/************************************************************************/
2722void SetN2kPGN128777(
2723 tN2kMsg &N2kMsg,
2724 unsigned char SID,
2725 unsigned char WindlassIdentifier,
2726 double RodeCounterValue,
2727 double WindlassLineSpeed = N2kDoubleNA,
2728 tN2kWindlassMotionStates WindlassMotionStatus = N2kDD480_Unavailable,
2730 tN2kDD482 AnchorDockingStatus = N2kDD482_DataNotAvailable,
2731 const tN2kWindlassOperatingEvents &WindlassOperatingEvents = tN2kWindlassOperatingEvents()
2732);
2733
2734/************************************************************************/
2779 const tN2kMsg &N2kMsg,
2780 unsigned char &SID,
2781 unsigned char &WindlassIdentifier,
2782 double &RodeCounterValue,
2783 double &WindlassLineSpeed,
2784 tN2kWindlassMotionStates &WindlassMotionStatus,
2785 tN2kRodeTypeStates &RodeTypeStatus,
2786 tN2kAnchorDockingStates &AnchorDockingStatus,
2787 tN2kWindlassOperatingEvents &WindlassOperatingEvents
2788);
2789
2790/************************************************************************/
2831void SetN2kPGN128778(
2832 tN2kMsg &N2kMsg,
2833 unsigned char SID,
2834 unsigned char WindlassIdentifier,
2835 double TotalMotorTime,
2836 double ControllerVoltage = N2kDoubleNA,
2837 double MotorCurrent = N2kDoubleNA,
2838 const tN2kWindlassMonitoringEvents &WindlassMonitoringEvents = tN2kWindlassMonitoringEvents()
2839);
2840
2841/************************************************************************/
2884 const tN2kMsg &N2kMsg,
2885 unsigned char &SID,
2886 unsigned char &WindlassIdentifier,
2887 double &TotalMotorTime,
2888 double &ControllerVoltage,
2889 double &MotorCurrent,
2890 tN2kWindlassMonitoringEvents &WindlassMonitoringEvents
2891);
2892
2893/************************************************************************/
2911void SetN2kPGN129025(tN2kMsg &N2kMsg, double Latitude, double Longitude);
2912
2913/************************************************************************/
2920inline void SetN2kLatLonRapid(tN2kMsg &N2kMsg, double Latitude, double Longitude) {
2921 SetN2kPGN129025(N2kMsg,Latitude,Longitude);
2922}
2923
2924/************************************************************************/
2944bool ParseN2kPGN129025(const tN2kMsg &N2kMsg, double &Latitude, double &Longitude);
2945
2946/************************************************************************/
2954inline bool ParseN2kPositionRapid(const tN2kMsg &N2kMsg, double &Latitude, double &Longitude) {
2955 return ParseN2kPGN129025(N2kMsg, Latitude, Longitude);
2956}
2957
2958/************************************************************************/
2976void SetN2kPGN129026(tN2kMsg &N2kMsg, unsigned char SID, tN2kHeadingReference ref, double COG, double SOG);
2977
2978/************************************************************************/
2985inline void SetN2kCOGSOGRapid(tN2kMsg &N2kMsg, unsigned char SID, tN2kHeadingReference ref, double COG, double SOG) {
2986 SetN2kPGN129026(N2kMsg,SID,ref,COG,SOG);
2987}
2988
2989/************************************************************************/
3006bool ParseN2kPGN129026(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kHeadingReference &ref, double &COG, double &SOG);
3007
3008/************************************************************************/
3015inline bool ParseN2kCOGSOGRapid(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kHeadingReference &ref, double &COG, double &SOG) {
3016 return ParseN2kPGN129026(N2kMsg,SID,ref,COG,SOG);
3017}
3018
3019/************************************************************************/
3050void SetN2kPGN129029(tN2kMsg &N2kMsg, unsigned char SID, uint16_t DaysSince1970, double SecondsSinceMidnight,
3051 double Latitude, double Longitude, double Altitude,
3052 tN2kGNSStype GNSStype, tN2kGNSSmethod GNSSmethod,
3053 unsigned char nSatellites, double HDOP, double PDOP=0, double GeoidalSeparation=0,
3054 unsigned char nReferenceStations=0, tN2kGNSStype ReferenceStationType=N2kGNSSt_GPS, uint16_t ReferenceSationID=0,
3055 double AgeOfCorrection=0
3056 );
3057
3058/************************************************************************/
3065inline void SetN2kGNSS(tN2kMsg &N2kMsg, unsigned char SID, uint16_t DaysSince1970, double SecondsSinceMidnight,
3066 double Latitude, double Longitude, double Altitude,
3067 tN2kGNSStype GNSStype, tN2kGNSSmethod GNSSmethod,
3068 unsigned char nSatellites, double HDOP, double PDOP=0, double GeoidalSeparation=0,
3069 unsigned char nReferenceStations=0, tN2kGNSStype ReferenceStationType=N2kGNSSt_GPS, uint16_t ReferenceSationID=0,
3070 double AgeOfCorrection=0
3071 ) {
3072 SetN2kPGN129029(N2kMsg,SID,DaysSince1970,SecondsSinceMidnight,
3073 Latitude,Longitude,Altitude,
3074 GNSStype,GNSSmethod,
3075 nSatellites,HDOP,PDOP,GeoidalSeparation,
3076 nReferenceStations,ReferenceStationType,ReferenceSationID,
3077 AgeOfCorrection);
3078}
3079
3080/************************************************************************/
3114bool ParseN2kPGN129029(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &DaysSince1970, double &SecondsSinceMidnight,
3115 double &Latitude, double &Longitude, double &Altitude,
3116 tN2kGNSStype &GNSStype, tN2kGNSSmethod &GNSSmethod,
3117 unsigned char &nSatellites, double &HDOP, double &PDOP, double &GeoidalSeparation,
3118 unsigned char &nReferenceStations, tN2kGNSStype &ReferenceStationType, uint16_t &ReferenceSationID,
3119 double &AgeOfCorrection
3120 );
3121
3122/************************************************************************/
3130inline bool ParseN2kGNSS(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &DaysSince1970, double &SecondsSinceMidnight,
3131 double &Latitude, double &Longitude, double &Altitude,
3132 tN2kGNSStype &GNSStype, tN2kGNSSmethod &GNSSmethod,
3133 unsigned char &nSatellites, double &HDOP, double &PDOP, double &GeoidalSeparation,
3134 unsigned char &nReferenceStations, tN2kGNSStype &ReferenceStationType, uint16_t &ReferenceSationID,
3135 double &AgeOfCorrection
3136 ) {
3137 return ParseN2kPGN129029(N2kMsg, SID, DaysSince1970, SecondsSinceMidnight,
3138 Latitude, Longitude, Altitude,
3139 GNSStype, GNSSmethod,
3140 nSatellites, HDOP, PDOP, GeoidalSeparation,
3141 nReferenceStations, ReferenceStationType, ReferenceSationID,
3142 AgeOfCorrection
3143 );
3144}
3145
3146/************************************************************************/
3164void SetN2kPGN129033(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, int16_t LocalOffset);
3165
3166/************************************************************************/
3173inline void SetN2kLocalOffset(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, int16_t LocalOffset) {
3174 SetN2kPGN129033(N2kMsg,DaysSince1970,SecondsSinceMidnight,LocalOffset);
3175}
3176
3177/************************************************************************/
3198bool ParseN2kPGN129033(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, int16_t &LocalOffset);
3199
3200/************************************************************************/
3208inline bool ParseN2kLocalOffset(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, int16_t &LocalOffset) {
3209 return ParseN2kPGN129033(N2kMsg,DaysSince1970,SecondsSinceMidnight,LocalOffset);
3210}
3211
3212/************************************************************************/
3256void SetN2kPGN129038(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
3257 double Latitude, double Longitude, bool Accuracy, bool RAIM,
3258 uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation,
3259 double Heading, double ROT, tN2kAISNavStatus NavStatus);
3260/************************************************************************/
3267inline void SetN2kAISClassAPosition(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
3268 double Latitude, double Longitude, bool Accuracy, bool RAIM,
3269 uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation,
3270 double Heading, double ROT, tN2kAISNavStatus NavStatus) {
3271 SetN2kPGN129038(N2kMsg, MessageID, Repeat, UserID, Latitude, Longitude,
3272 Accuracy, RAIM, Seconds, COG, SOG, AISTransceiverInformation, Heading, ROT, NavStatus);
3273}
3274
3275/************************************************************************/
3322bool ParseN2kPGN129038(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, double &Latitude, double &Longitude,
3323 bool &Accuracy, bool &RAIM, uint8_t &Seconds, double &COG, double &SOG, double &Heading, double &ROT, tN2kAISNavStatus &NavStatus);
3324
3325/************************************************************************/
3333inline bool ParseN2kAISClassAPosition(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, double &Latitude, double &Longitude,
3334 bool &Accuracy, bool &RAIM, uint8_t &Seconds, double &COG, double &SOG, double &Heading, double &ROT, tN2kAISNavStatus & NavStatus) {
3335 return ParseN2kPGN129038(N2kMsg, MessageID, Repeat, UserID, Latitude, Longitude, Accuracy, RAIM, Seconds, COG, SOG, Heading, ROT, NavStatus);
3336}
3337
3338/************************************************************************/
3410void SetN2kPGN129039(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
3411 double Latitude, double Longitude, bool Accuracy, bool RAIM,
3412 uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation,
3413 double Heading, tN2kAISUnit Unit, bool Display, bool DSC, bool Band, bool Msg22, tN2kAISMode Mode,
3414 bool State, unsigned char SID=0xff);
3415
3416/************************************************************************/
3424inline void SetN2kAISClassBPosition(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
3425 double Latitude, double Longitude, bool Accuracy, bool RAIM,
3426 uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation,
3427 double Heading, tN2kAISUnit Unit, bool Display, bool DSC, bool Band, bool Msg22, tN2kAISMode Mode,
3428 bool State, unsigned char SID=0xff) {
3429 SetN2kPGN129039(N2kMsg, MessageID, Repeat, UserID, Latitude, Longitude, Accuracy, RAIM, Seconds,
3430 COG, SOG, AISTransceiverInformation, Heading, Unit, Display, DSC, Band, Msg22, Mode, State, SID);
3431}
3432
3433/************************************************************************/
3444inline void SetN2kAISClassBPosition(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
3445 double Latitude, double Longitude, bool Accuracy, bool RAIM,
3446 uint8_t Seconds, double COG, double SOG, double Heading, tN2kAISUnit Unit,
3447 bool Display, bool DSC, bool Band, bool Msg22, tN2kAISMode Mode, bool State) {
3448 SetN2kPGN129039(N2kMsg, MessageID, Repeat, UserID, Latitude, Longitude, Accuracy, RAIM, Seconds,
3449 COG, SOG, N2kaischannel_A_VDL_reception, Heading, Unit, Display, DSC, Band, Msg22, Mode, State);
3450}
3451
3452/************************************************************************/
3524bool ParseN2kPGN129039(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID,
3525 double &Latitude, double &Longitude, bool &Accuracy, bool &RAIM, uint8_t &Seconds, double &COG,
3526 double &SOG, tN2kAISTransceiverInformation &AISTransceiverInformation, double &Heading,
3527 tN2kAISUnit &Unit, bool &Display, bool &DSC, bool &Band, bool &Msg22, tN2kAISMode &Mode, bool &State);
3528
3529/************************************************************************/
3539inline bool ParseN2kAISClassBPosition(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID,
3540 double &Latitude, double &Longitude, bool &Accuracy, bool &RAIM,
3541 uint8_t &Seconds, double &COG, double &SOG, tN2kAISTransceiverInformation &AISTransceiverInformation,
3542 double &Heading, tN2kAISUnit &Unit, bool &Display, bool &DSC, bool &Band, bool &Msg22, tN2kAISMode &Mode,
3543 bool &State) {
3544 return ParseN2kPGN129039(N2kMsg, MessageID, Repeat, UserID, Latitude, Longitude, Accuracy, RAIM, Seconds, COG, SOG, AISTransceiverInformation, Heading, Unit, Display, DSC, Band, Msg22, Mode, State);
3545}
3546
3547/************************************************************************/
3558inline bool ParseN2kAISClassBPosition(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID,
3559 double &Latitude, double &Longitude, bool &Accuracy, bool &RAIM,
3560 uint8_t &Seconds, double &COG, double &SOG, double &Heading, tN2kAISUnit &Unit,
3561 bool &Display, bool &DSC, bool &Band, bool &Msg22, tN2kAISMode &Mode, bool &State) {
3562 tN2kAISTransceiverInformation AISTransceiverInformation; // for backwards compatibility
3563 return ParseN2kPGN129039(N2kMsg, MessageID, Repeat, UserID, Latitude, Longitude, Accuracy,
3564 RAIM, Seconds, COG, SOG, AISTransceiverInformation, Heading, Unit, Display, DSC, Band, Msg22, Mode, State);
3565}
3566
3567/************************************************************************/
3579 uint8_t MessageID;
3583 uint32_t UserID;
3587 double Latitude;
3588
3595
3601 bool RAIM;
3602
3603 /**********************************************************************/
3613 uint8_t Seconds;
3615 double Length;
3617 double Beam;
3625
3626 /**********************************************************************/
3637
3638 /**********************************************************************/
3644
3645 /**********************************************************************/
3651
3652 /**********************************************************************/
3657
3658 /**********************************************************************/
3662 uint8_t AtoNStatus;
3663
3668
3669 /************************************************************************/
3682 char AtoNName[34 + 1];
3683
3684 /**********************************************************************/
3695 Accuracy(false),
3696 RAIM(false),
3703 OffPositionIndicator(false),
3704 VirtualAtoNFlag(false),
3705 AssignedModeFlag(false),
3709 AtoNName[0]=0;
3710 }
3711
3712 /**********************************************************************/
3717 void SetAtoNName(const char *name) {
3718 strncpy(AtoNName, name, sizeof(AtoNName));
3719 AtoNName[sizeof(AtoNName) - 1] = 0;
3720 }
3721};
3722
3723/************************************************************************/
3735void SetN2kPGN129041(tN2kMsg &N2kMsg, const tN2kAISAtoNReportData &N2kData);
3736
3737/************************************************************************/
3744inline void SetN2kAISAtoNReport(tN2kMsg &N2kMsg, const tN2kAISAtoNReportData &N2kData) {
3745 SetN2kPGN129041(N2kMsg, N2kData);
3746}
3747
3748/************************************************************************/
3765bool ParseN2kPGN129041(const tN2kMsg &N2kMsg, tN2kAISAtoNReportData &N2kData);
3766
3767/************************************************************************/
3775inline bool ParseN2kAISAtoNReport(const tN2kMsg &N2kMsg, tN2kAISAtoNReportData &N2kData) {
3776 return ParseN2kPGN129041(N2kMsg, N2kData);
3777}
3778
3779/************************************************************************/
3797void SetN2kPGN129283(tN2kMsg &N2kMsg, unsigned char SID, tN2kXTEMode XTEMode, bool NavigationTerminated, double XTE);
3798
3799/************************************************************************/
3806inline void SetN2kXTE(tN2kMsg &N2kMsg, unsigned char SID, tN2kXTEMode XTEMode, bool NavigationTerminated, double XTE) {
3807 SetN2kPGN129283(N2kMsg, SID, XTEMode, NavigationTerminated, XTE);
3808}
3809
3810/************************************************************************/
3828bool ParseN2kPGN129283(const tN2kMsg &N2kMsg, unsigned char& SID, tN2kXTEMode& XTEMode, bool& NavigationTerminated, double& XTE);
3829
3830/************************************************************************/
3838inline bool ParseN2kXTE(const tN2kMsg &N2kMsg, unsigned char& SID, tN2kXTEMode& XTEMode, bool& NavigationTerminated, double& XTE) {
3839 return ParseN2kPGN129283(N2kMsg, SID, XTEMode, NavigationTerminated, XTE);
3840}
3841
3842/************************************************************************/
3877void SetN2kPGN129284(tN2kMsg &N2kMsg, unsigned char SID, double DistanceToWaypoint, tN2kHeadingReference BearingReference,
3878 bool PerpendicularCrossed, bool ArrivalCircleEntered, tN2kDistanceCalculationType CalculationType,
3879 double ETATime, int16_t ETADate, double BearingOriginToDestinationWaypoint, double BearingPositionToDestinationWaypoint,
3880 uint32_t OriginWaypointNumber, uint32_t DestinationWaypointNumber,
3881 double DestinationLatitude, double DestinationLongitude, double WaypointClosingVelocity);
3882
3883/************************************************************************/
3890inline void SetN2kNavigationInfo(tN2kMsg &N2kMsg, unsigned char SID, double DistanceToWaypoint, tN2kHeadingReference BearingReference,
3891 bool PerpendicularCrossed, bool ArrivalCircleEntered, tN2kDistanceCalculationType CalculationType,
3892 double ETATime, int16_t ETADate, double BearingOriginToDestinationWaypoint, double BearingPositionToDestinationWaypoint,
3893 uint32_t OriginWaypointNumber, uint32_t DestinationWaypointNumber,
3894 double DestinationLatitude, double DestinationLongitude, double WaypointClosingVelocity) {
3895 SetN2kPGN129284(N2kMsg, SID, DistanceToWaypoint, BearingReference,
3896 PerpendicularCrossed, ArrivalCircleEntered, CalculationType,
3897 ETATime, ETADate, BearingOriginToDestinationWaypoint, BearingPositionToDestinationWaypoint,
3898 OriginWaypointNumber, DestinationWaypointNumber,
3899 DestinationLatitude, DestinationLongitude, WaypointClosingVelocity);
3900}
3901
3902/************************************************************************/
3937bool ParseN2kPGN129284(const tN2kMsg &N2kMsg, unsigned char& SID, double& DistanceToWaypoint, tN2kHeadingReference& BearingReference,
3938 bool& PerpendicularCrossed, bool& ArrivalCircleEntered, tN2kDistanceCalculationType& CalculationType,
3939 double& ETATime, int16_t& ETADate, double& BearingOriginToDestinationWaypoint, double& BearingPositionToDestinationWaypoint,
3940 uint32_t& OriginWaypointNumber, uint32_t& DestinationWaypointNumber,
3941 double& DestinationLatitude, double& DestinationLongitude, double& WaypointClosingVelocity);
3942
3943
3944/************************************************************************/
3952inline bool ParseN2kNavigationInfo(const tN2kMsg &N2kMsg, unsigned char& SID, double& DistanceToWaypoint, tN2kHeadingReference& BearingReference,
3953 bool& PerpendicularCrossed, bool& ArrivalCircleEntered, tN2kDistanceCalculationType& CalculationType,
3954 double& ETATime, int16_t& ETADate, double& BearingOriginToDestinationWaypoint, double& BearingPositionToDestinationWaypoint,
3955 uint32_t& OriginWaypointNumber, uint32_t& DestinationWaypointNumber,
3956 double& DestinationLatitude, double& DestinationLongitude, double& WaypointClosingVelocity) {
3957 return ParseN2kPGN129284(N2kMsg, SID, DistanceToWaypoint, BearingReference, PerpendicularCrossed, ArrivalCircleEntered, CalculationType,
3958 ETATime, ETADate, BearingOriginToDestinationWaypoint, BearingPositionToDestinationWaypoint,
3959 OriginWaypointNumber, DestinationWaypointNumber, DestinationLatitude, DestinationLongitude, WaypointClosingVelocity);
3960}
3961
3962/************************************************************************/
3981void SetN2kPGN129285(tN2kMsg &N2kMsg, uint16_t Start, uint16_t Database, uint16_t Route,
3982 tN2kNavigationDirection NavDirection, const char* RouteName, tN2kGenericStatusPair SupplementaryData=N2kDD002_No);
3983
3984/************************************************************************/
3991inline void SetN2kRouteWPInfo(tN2kMsg &N2kMsg, uint16_t Start, uint16_t Database, uint16_t Route,
3992 tN2kNavigationDirection NavDirection, const char* RouteName, tN2kGenericStatusPair SupplementaryData=N2kDD002_No) {
3993 SetN2kPGN129285(N2kMsg, Start, Database, Route, NavDirection, RouteName, SupplementaryData);
3994}
3995
3996/************************************************************************/
4004inline void SetN2kPGN129285(tN2kMsg &N2kMsg, uint16_t Start, uint16_t Database, uint16_t Route,
4005 bool NavDirection, bool SupplementaryData, char* RouteName)
4006{
4007 tN2kNavigationDirection NavDirection1 = NavDirection?N2kdir_reverse:N2kdir_forward;
4008 tN2kGenericStatusPair N2kSupplementaryData = SupplementaryData?N2kDD002_Yes:N2kDD002_No;
4009 SetN2kPGN129285(N2kMsg, Start, Database, Route, NavDirection1, RouteName, N2kSupplementaryData);
4010}
4011
4012/************************************************************************/
4029bool AppendN2kPGN129285(tN2kMsg &N2kMsg, uint16_t WPID, const char* WPName, double Latitude, double Longitude);
4030
4031/************************************************************************/
4038inline bool AppendN2kRouteWPInfo(tN2kMsg &N2kMsg, uint16_t WPID, const char* WPName, double Latitude, double Longitude) {
4039 return AppendN2kPGN129285(N2kMsg, WPID, WPName, Latitude, Longitude);
4040}
4041
4042/************************************************************************/
4066void SetN2kPGN129539(tN2kMsg& N2kMsg, unsigned char SID, tN2kGNSSDOPmode DesiredMode, tN2kGNSSDOPmode ActualMode,
4067 double HDOP, double VDOP, double TDOP);
4068
4069/************************************************************************/
4076inline void SetN2kGNSSDOPData(tN2kMsg& N2kMsg, unsigned char SID, tN2kGNSSDOPmode DesiredMode, tN2kGNSSDOPmode ActualMode,
4077 double HDOP, double VDOP, double TDOP)
4078{
4079 SetN2kPGN129539(N2kMsg, SID, DesiredMode, ActualMode, HDOP, VDOP, TDOP);
4080}
4081
4082/************************************************************************/
4104bool ParseN2kPgn129539(const tN2kMsg& N2kMsg, unsigned char& SID, tN2kGNSSDOPmode& DesiredMode, tN2kGNSSDOPmode& ActualMode,
4105 double& HDOP, double& VDOP, double& TDOP);
4106
4107/************************************************************************/
4115inline bool ParseN2kGNSSDOPData(const tN2kMsg& N2kMsg, unsigned char& SID, tN2kGNSSDOPmode& DesiredMode, tN2kGNSSDOPmode& ActualMode,
4116 double& HDOP, double& VDOP, double& TDOP)
4117{
4118 return ParseN2kPgn129539(N2kMsg, SID, DesiredMode, ActualMode, HDOP, VDOP, TDOP);
4119}
4120
4121/************************************************************************/
4131 unsigned char PRN;
4132 double Elevation;
4133 double Azimuth;
4134 double SNR;
4137};
4138
4139/************************************************************************/
4159void SetN2kPGN129540(tN2kMsg& N2kMsg, unsigned char SID=0xff, tN2kRangeResidualMode Mode=N2kDD072_Unavailable);
4160
4161/************************************************************************/
4176bool AppendN2kPGN129540(tN2kMsg& N2kMsg, const tSatelliteInfo& SatelliteInfo);
4177
4178/************************************************************************/
4185inline void SetN2kGNSSSatellitesInView(tN2kMsg& N2kMsg, unsigned char SID=0xff, tN2kRangeResidualMode Mode=N2kDD072_Unavailable) {
4186 SetN2kPGN129540(N2kMsg,SID,Mode);
4187}
4188
4189/************************************************************************/
4196inline bool AppendSatelliteInfo(tN2kMsg& N2kMsg, const tSatelliteInfo& SatelliteInfo) {
4197 return AppendN2kPGN129540(N2kMsg,SatelliteInfo);
4198}
4199
4200/************************************************************************/
4220bool ParseN2kPGN129540(const tN2kMsg& N2kMsg, unsigned char& SID, tN2kRangeResidualMode &Mode, uint8_t& NumberOfSVs);
4221
4222/************************************************************************/
4242bool ParseN2kPGN129540(const tN2kMsg& N2kMsg, uint8_t SVIndex, tSatelliteInfo& SatelliteInfo);
4243
4244/************************************************************************/
4252inline bool ParseN2kPGNSatellitesInView(const tN2kMsg& N2kMsg, unsigned char& SID, tN2kRangeResidualMode &Mode, uint8_t& NumberOfSVs){
4253 return ParseN2kPGN129540(N2kMsg,SID,Mode,NumberOfSVs);
4254}
4255
4256/************************************************************************/
4264inline bool ParseN2kPGNSatellitesInView(const tN2kMsg& N2kMsg, uint8_t SVIndex, tSatelliteInfo& SatelliteInfo){
4265 return ParseN2kPGN129540(N2kMsg,SVIndex,SatelliteInfo);
4266}
4267
4268
4269/************************************************************************/
4321void SetN2kPGN129794(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
4322 uint32_t IMOnumber, const char *Callsign, const char *Name, uint8_t VesselType, double Length,
4323 double Beam, double PosRefStbd, double PosRefBow, uint16_t ETAdate, double ETAtime,
4324 double Draught, const char *Destination, tN2kAISVersion AISversion, tN2kGNSStype GNSStype,
4326
4327/************************************************************************/
4334inline void SetN2kAISClassAStatic(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
4335 uint32_t IMOnumber, const char *Callsign, const char *Name, uint8_t VesselType, double Length,
4336 double Beam, double PosRefStbd, double PosRefBow, uint16_t ETAdate, double ETAtime,
4337 double Draught, char const *Destination, tN2kAISVersion AISversion, tN2kGNSStype GNSStype,
4339 SetN2kPGN129794(N2kMsg, MessageID, Repeat, UserID, IMOnumber, Callsign, Name, VesselType, Length,
4340 Beam, PosRefStbd, PosRefBow, ETAdate, ETAtime, Draught, Destination, AISversion, GNSStype, DTE, AISinfo);
4341}
4342
4343/************************************************************************/
4400bool ParseN2kPGN129794(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID,
4401 uint32_t &IMOnumber, char *Callsign, size_t CallsignBufSize, char *Name, size_t NameBufSize, uint8_t &VesselType, double &Length,
4402 double &Beam, double &PosRefStbd, double &PosRefBow, uint16_t &ETAdate, double &ETAtime,
4403 double &Draught, char *Destination, size_t DestinationBufSize, tN2kAISVersion &AISversion, tN2kGNSStype &GNSStype,
4405
4406/************************************************************************/
4414inline bool ParseN2kAISClassAStatic(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID,
4415 uint32_t & IMOnumber, char *Callsign, size_t CallsignBufSize, char *Name, size_t NameBufSize, uint8_t &VesselType, double &Length,
4416 double &Beam, double &PosRefStbd, double &PosRefBow, uint16_t &ETAdate, double &ETAtime,
4417 double &Draught, char *Destination, size_t DestinationBufSize, tN2kAISVersion &AISversion, tN2kGNSStype &GNSStype,
4419 return ParseN2kPGN129794(N2kMsg, MessageID, Repeat, UserID, IMOnumber, Callsign, CallsignBufSize, Name, NameBufSize, VesselType, Length,
4420 Beam, PosRefStbd, PosRefBow, ETAdate, ETAtime, Draught, Destination, DestinationBufSize,AISversion,
4421 GNSStype, DTE, AISinfo);
4422}
4423
4424/************************************************************************/
4449void SetN2kPGN129809(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, const char *Name);
4450
4451/************************************************************************/
4458inline void SetN2kAISClassBStaticPartA(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, const char *Name) {
4459 SetN2kPGN129809(N2kMsg, MessageID, Repeat, UserID, Name);
4460}
4461
4462/************************************************************************/
4491bool ParseN2kPGN129809(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, char *Name, size_t NameBufSize);
4492
4493/************************************************************************/
4501inline bool ParseN2kAISClassBStaticPartA(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, char *Name, size_t NameBufSize) {
4502 return ParseN2kPGN129809(N2kMsg, MessageID, Repeat, UserID, Name, NameBufSize);
4503}
4504
4505/************************************************************************/
4540void SetN2kPGN129810(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
4541 uint8_t VesselType, const char *Vendor, const char *Callsign, double Length, double Beam,
4542 double PosRefStbd, double PosRefBow, uint32_t MothershipID);
4543
4544/************************************************************************/
4551inline void SetN2kAISClassBStaticPartB(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID,
4552 uint8_t VesselType, const char *Vendor, const char *Callsign, double Length, double Beam,
4553 double PosRefStbd, double PosRefBow, uint32_t MothershipID) {
4554 SetN2kPGN129810(N2kMsg, MessageID, Repeat, UserID, VesselType, Vendor, Callsign, Length, Beam,
4555 PosRefStbd, PosRefBow, MothershipID);
4556}
4557
4558/************************************************************************/
4598bool ParseN2kPGN129810(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID,
4599 uint8_t &VesselType, const char *Vendor, size_t VendorBufSize, const char *Callsign, size_t CallsignBufSize,double &Length, double &Beam,
4600 double &PosRefStbd, double &PosRefBow, uint32_t &MothershipID);
4601
4602/************************************************************************/
4610inline bool ParseN2kAISClassBStaticPartB(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID,
4611 uint8_t &VesselType, char *Vendor, size_t VendorBufSize, char *Callsign, size_t CallsignBufSize, double &Length, double &Beam,
4612 double &PosRefStbd, double &PosRefBow, uint32_t &MothershipID) {
4613 return ParseN2kPGN129810(N2kMsg, MessageID, Repeat, UserID, VesselType, Vendor, VendorBufSize, Callsign, CallsignBufSize,
4614 Length, Beam, PosRefStbd, PosRefBow, MothershipID);
4615}
4616
4617/************************************************************************/
4636void SetN2kPGN130074(tN2kMsg &N2kMsg, uint16_t Start, uint16_t NumWaypoints, uint16_t Database);
4637
4638/************************************************************************/
4646inline void SetN2kWaypointList(tN2kMsg &N2kMsg, uint16_t Start, uint16_t NumWaypoints, uint16_t Database) {
4647 SetN2kPGN130074(N2kMsg,Start,NumWaypoints,Database);
4648}
4649
4650/************************************************************************/
4670bool AppendN2kPGN130074(tN2kMsg &N2kMsg, uint16_t ID, char* Name, double Latitude, double Longitude);
4671
4672/************************************************************************/
4680inline bool AppendN2kWaypointList(tN2kMsg &N2kMsg, uint16_t ID, char* Name, double Latitude, double Longitude) {
4681 return AppendN2kPGN130074(N2kMsg,ID,Name,Latitude,Longitude);
4682}
4683
4684/************************************************************************/
4708void SetN2kPGN130306(tN2kMsg &N2kMsg, unsigned char SID, double WindSpeed, double WindAngle, tN2kWindReference WindReference);
4709
4710/************************************************************************/
4717inline void SetN2kWindSpeed(tN2kMsg &N2kMsg, unsigned char SID, double WindSpeed, double WindAngle, tN2kWindReference WindReference) {
4718 SetN2kPGN130306(N2kMsg,SID,WindSpeed,WindAngle,WindReference);
4719}
4720
4721/************************************************************************/
4745bool ParseN2kPGN130306(const tN2kMsg &N2kMsg, unsigned char &SID, double &WindSpeed, double &WindAngle, tN2kWindReference &WindReference);
4746
4747/************************************************************************/
4755inline bool ParseN2kWindSpeed(const tN2kMsg &N2kMsg, unsigned char &SID, double &WindSpeed, double &WindAngle, tN2kWindReference &WindReference) {
4756 return ParseN2kPGN130306(N2kMsg,SID,WindSpeed,WindAngle,WindReference);
4757}
4758
4759/************************************************************************/
4782void SetN2kPGN130310(tN2kMsg &N2kMsg, unsigned char SID, double WaterTemperature,
4783 double OutsideAmbientAirTemperature=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA);
4784
4785/************************************************************************/
4793inline void SetN2kOutsideEnvironmentalParameters(tN2kMsg &N2kMsg, unsigned char SID, double WaterTemperature,
4794 double OutsideAmbientAirTemperature=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA) {
4795 SetN2kPGN130310(N2kMsg,SID,WaterTemperature,OutsideAmbientAirTemperature,AtmosphericPressure);
4796}
4797
4798/************************************************************************/
4822bool ParseN2kPGN130310(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterTemperature,
4823 double &OutsideAmbientAirTemperature, double &AtmosphericPressure);
4824
4825/************************************************************************/
4833inline bool ParseN2kOutsideEnvironmentalParameters(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterTemperature,
4834 double &OutsideAmbientAirTemperature, double &AtmosphericPressure) {
4835 return ParseN2kPGN130310(N2kMsg, SID,WaterTemperature,OutsideAmbientAirTemperature,AtmosphericPressure);
4836}
4837
4838/************************************************************************/
4865void SetN2kPGN130311(tN2kMsg &N2kMsg, unsigned char SID, tN2kTempSource TempSource, double Temperature,
4866 tN2kHumiditySource HumiditySource=N2khs_Undef, double Humidity=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA);
4867
4868/************************************************************************/
4876inline void SetN2kEnvironmentalParameters(tN2kMsg &N2kMsg, unsigned char SID, tN2kTempSource TempSource, double Temperature,
4877 tN2kHumiditySource HumiditySource=N2khs_Undef, double Humidity=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA) {
4878 SetN2kPGN130311(N2kMsg,SID,TempSource,Temperature,HumiditySource,Humidity,AtmosphericPressure);
4879}
4880
4881/************************************************************************/
4909bool ParseN2kPGN130311(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kTempSource &TempSource, double &Temperature,
4910 tN2kHumiditySource &HumiditySource, double &Humidity, double &AtmosphericPressure);
4911
4912/************************************************************************/
4920inline bool ParseN2kEnvironmentalParameters(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kTempSource &TempSource, double &Temperature,
4921 tN2kHumiditySource &HumiditySource, double &Humidity, double &AtmosphericPressure) {
4922 return ParseN2kPGN130311(N2kMsg,SID,TempSource,Temperature,HumiditySource,Humidity,AtmosphericPressure);
4923}
4924
4925/************************************************************************/
4952void SetN2kPGN130312(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource,
4953 double ActualTemperature, double SetTemperature=N2kDoubleNA);
4954
4955/************************************************************************/
4962inline void SetN2kTemperature(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource,
4963 double ActualTemperature, double SetTemperature=N2kDoubleNA) {
4964 SetN2kPGN130312(N2kMsg,SID,TempInstance,TempSource,ActualTemperature,SetTemperature);
4965}
4966
4967/************************************************************************/
4995bool ParseN2kPGN130312(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource,
4996 double &ActualTemperature, double &SetTemperature);
4997
4998/************************************************************************/
5006inline bool ParseN2kTemperature(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource,
5007 double &ActualTemperature, double &SetTemperature) {
5008 return ParseN2kPGN130312(N2kMsg, SID, TempInstance, TempSource, ActualTemperature, SetTemperature);
5009}
5010
5011/************************************************************************/
5030void SetN2kPGN130313(tN2kMsg &N2kMsg, unsigned char SID, unsigned char HumidityInstance,
5031 tN2kHumiditySource HumiditySource, double ActualHumidity, double SetHumidity=N2kDoubleNA);
5032
5033/************************************************************************/
5040inline void SetN2kHumidity(tN2kMsg &N2kMsg, unsigned char SID, unsigned char HumidityInstance,
5041 tN2kHumiditySource HumiditySource, double ActualHumidity, double SetHumidity=N2kDoubleNA) {
5042 SetN2kPGN130313(N2kMsg, SID, HumidityInstance, HumiditySource, ActualHumidity,SetHumidity);
5043}
5044/************************************************************************/
5063bool ParseN2kPGN130313(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &HumidityInstance,
5064 tN2kHumiditySource &HumiditySource, double &ActualHumidity, double &SetHumidity);
5065
5066/************************************************************************/
5074inline bool ParseN2kHumidity(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &HumidityInstance,
5075 tN2kHumiditySource &HumiditySource, double &ActualHumidity, double &SetHumidity) {
5076 return ParseN2kPGN130313(N2kMsg, SID, HumidityInstance, HumiditySource, ActualHumidity, SetHumidity);
5077}
5078
5079/************************************************************************/
5087inline bool ParseN2kPGN130313(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &HumidityInstance,
5088 tN2kHumiditySource &HumiditySource, double &ActualHumidity) {
5089 double SetHumidity;
5090 return ParseN2kPGN130313(N2kMsg, SID, HumidityInstance, HumiditySource, ActualHumidity, SetHumidity);
5091}
5092
5093/************************************************************************/
5101inline bool ParseN2kHumidity(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &HumidityInstance,
5102 tN2kHumiditySource &HumiditySource, double &ActualHumidity) {
5103 return ParseN2kPGN130313(N2kMsg, SID, HumidityInstance, HumiditySource, ActualHumidity);
5104}
5105
5106/************************************************************************/
5126void SetN2kPGN130314(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance,
5127 tN2kPressureSource PressureSource, double Pressure);
5128
5129/************************************************************************/
5136inline void SetN2kPressure(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance,
5137 tN2kPressureSource PressureSource, double Pressure) {
5138 SetN2kPGN130314(N2kMsg, SID, PressureInstance, PressureSource, Pressure);
5139}
5140/************************************************************************/
5160bool ParseN2kPGN130314(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &PressureInstance,
5161 tN2kPressureSource &PressureSource, double &Pressure);
5162
5163/************************************************************************/
5171inline bool ParseN2kPressure(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &PressureInstance,
5172 tN2kPressureSource &PressureSource, double &Pressure) {
5173 return ParseN2kPGN130314(N2kMsg, SID, PressureInstance, PressureSource, Pressure);
5174}
5175
5176/************************************************************************/
5198void SetN2kPGN130315(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance,
5199 tN2kPressureSource PressureSource, double SetPressure);
5200
5201/************************************************************************/
5208inline void SetN2kSetPressure(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance,
5209 tN2kPressureSource PressureSource, double SetPressure) {
5210 SetN2kPGN130315(N2kMsg, SID, PressureInstance, PressureSource, SetPressure);
5211}
5212
5213/************************************************************************/
5236void SetN2kPGN130316(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource,
5237 double ActualTemperature, double SetTemperature=N2kDoubleNA);
5238
5239/************************************************************************/
5246inline void SetN2kTemperatureExt(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource,
5247 double ActualTemperature, double SetTemperature=N2kDoubleNA) {
5248 SetN2kPGN130316(N2kMsg,SID,TempInstance,TempSource,ActualTemperature,SetTemperature);
5249}
5250
5251/************************************************************************/
5275bool ParseN2kPGN130316(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource,
5276 double &ActualTemperature, double &SetTemperature);
5277
5278/************************************************************************/
5286inline bool ParseN2kTemperatureExt(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource,
5287 double &ActualTemperature, double &SetTemperature) {
5288 return ParseN2kPGN130316(N2kMsg, SID, TempInstance, TempSource, ActualTemperature, SetTemperature);
5289}
5290
5291
5292/************************************************************************/
5305 uint16_t SystemDate;
5309 double Latitude;
5329 char StationID[15 + 1];
5332 char StationName[50 + 1];
5333
5346 StationID[0] = 0;
5347 StationName[0] = 0;
5348 }
5349
5350 /**********************************************************************/
5356 void SetStationID(const char *id) {
5357 strncpy(StationID, id, sizeof(StationID));
5358 StationID[sizeof(StationID) - 1] = 0;
5359 }
5360
5361 /**********************************************************************/
5367 void SetStationName(const char *name) {
5368 strncpy(StationName, name, sizeof(StationName));
5369 StationName[sizeof(StationName) - 1] = 0;
5370 }
5371};
5372
5373/************************************************************************/
5386void SetN2kPGN130323(tN2kMsg &N2kMsg, const tN2kMeteorlogicalStationData &N2kData);
5387
5388/************************************************************************/
5395inline void SetN2kMeteorlogicalStationData(tN2kMsg &N2kMsg, const tN2kMeteorlogicalStationData &N2kData) { SetN2kPGN130323(N2kMsg, N2kData); }
5396
5397/************************************************************************/
5408bool ParseN2kPGN130323(const tN2kMsg &N2kMsg, tN2kMeteorlogicalStationData &N2kData);
5409
5410/************************************************************************/
5419 return ParseN2kPGN130323(N2kMsg, N2kData);
5420}
5421
5422/************************************************************************/
5436void SetN2kPGN130576(tN2kMsg &N2kMsg, int8_t PortTrimTab, int8_t StbdTrimTab);
5437
5438/************************************************************************/
5445inline void SetN2kTrimTab(tN2kMsg &N2kMsg, int8_t PortTrimTab, int8_t StbdTrimTab){
5446 SetN2kPGN130576(N2kMsg,PortTrimTab, StbdTrimTab);
5447}
5448
5449/************************************************************************/
5466bool ParseN2kPGN130576(const tN2kMsg &N2kMsg, int8_t &PortTrimTab, int8_t &StbdTrimTab);
5467
5468/************************************************************************/
5476inline bool ParseN2kTrimTab(const tN2kMsg &N2kMsg, int8_t &PortTrimTab, int8_t &StbdTrimTab) {
5477 return ParseN2kPGN130576(N2kMsg, PortTrimTab, StbdTrimTab);
5478}
5479
5480/************************************************************************/
5503void SetN2kPGN130577(tN2kMsg &N2kMsg, tN2kDataMode DataMode, tN2kHeadingReference CogReference, unsigned char SID, double COG, double SOG,
5504 double Heading, double SpeedThroughWater, double Set, double Drift);
5505
5506/************************************************************************/
5513inline void SetN2kDirectionData(tN2kMsg &N2kMsg, tN2kDataMode DataMode, tN2kHeadingReference CogReference, unsigned char SID, double COG, double SOG,
5514 double Heading, double SpeedThroughWater, double Set, double Drift){
5515
5516 SetN2kPGN130577(N2kMsg,DataMode,CogReference,SID,COG,SOG,Heading,SpeedThroughWater,Set,Drift);
5517}
5518
5519/************************************************************************/
5542bool ParseN2kPGN130577(const tN2kMsg &N2kMsg,tN2kDataMode &DataMode, tN2kHeadingReference &CogReference,unsigned char &SID,double &COG,
5543 double &SOG,double &Heading,double &SpeedThroughWater,double &Set,double &Drift);
5544
5545/************************************************************************/
5553inline bool ParseN2kDirectionData(const tN2kMsg &N2kMsg,tN2kDataMode &DataMode, tN2kHeadingReference &CogReference,unsigned char &SID,double &COG,
5554 double &SOG,double &Heading,double &SpeedThroughWater,double &Set,double &Drift) {
5555
5556 return ParseN2kPGN130577(N2kMsg,DataMode,CogReference,SID,COG,SOG,Heading,SpeedThroughWater,Set,Drift);
5557}
5558
5559
5560#endif
void N2kSetStatusBinaryOnStatus(tN2kBinaryStatus &BankStatus, tN2kOnOff ItemStatus, uint8_t ItemIndex=1)
Set single status to full binary bank status.
double CToKelvin(double v)
Converting a value from Celsius to Kelvin.
Definition: N2kMessages.h:81
double FToKelvin(double v)
Converting a value from Fahrenheit to Kelvin.
Definition: N2kMessages.h:95
double DegToRad(double v)
Converting a value from Deg to Rad.
Definition: N2kMessages.h:74
double PascalTohPA(double v)
Converting a value from Pascal to HectoPascal.
Definition: N2kMessages.h:130
double KnotsToms(double v)
Converting a value from Knots to MeterPerSecond.
Definition: N2kMessages.h:172
double KelvinToF(double v)
Converting a value from Kelvin to Fahrenheit.
Definition: N2kMessages.h:102
void N2kResetBinaryStatus(tN2kBinaryStatus &BankStatus)
Reset all single binary status values to not available.
Definition: N2kMessages.h:1616
tN2kOnOff N2kGetStatusOnBinaryStatus(tN2kBinaryStatus BankStatus, uint8_t ItemIndex=1)
Get single status to full binary bank status.
bool ParseN2kCOGSOGRapid(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kHeadingReference &ref, double &COG, double &SOG)
Parsing the content of a "COG SOG Rapid Update" message - PGN 129026.
Definition: N2kMessages.h:3015
double KelvinToC(double v)
Converting a value from Kelvin to Celsius.
Definition: N2kMessages.h:88
double PascalTomBar(double v)
Converting a value from Pascal to Millibar.
Definition: N2kMessages.h:116
double AhToCoulomb(double v)
Converting a value from AmpereHours to Coulomb.
Definition: N2kMessages.h:137
double mBarToPascal(double v)
Converting a value from Millibar to Pascal.
Definition: N2kMessages.h:109
double CoulombToAh(double v)
Converting a value from Coulomb to AmpereHours.
Definition: N2kMessages.h:144
double msToKnots(double v)
Converting a value from MeterPerSecond to Knots.
Definition: N2kMessages.h:165
uint64_t tN2kBinaryStatus
64bit Binary Status value of a full bank status, that can handle up to 28 item states in one value.
Definition: N2kMessages.h:1589
double SecondsToh(double v)
Converting a value from Seconds to Hours.
Definition: N2kMessages.h:158
double RadToDeg(double v)
Converting a value from Rad to Deg.
Definition: N2kMessages.h:67
double hToSeconds(double v)
Converting a value from Hours to Seconds.
Definition: N2kMessages.h:151
bool AppendSatelliteInfo(tN2kMsg &N2kMsg, const tSatelliteInfo &SatelliteInfo)
Append a new satellite info to Message "GNSS Satellites in View" - PGN 129540.
Definition: N2kMessages.h:4196
double hPAToPascal(double v)
Converting a value from HectoPascal to Pascal.
Definition: N2kMessages.h:123
This File contains the class tN2kMsg and all necessary functions to handle a NMEA2000 Message.
const uint32_t N2kUInt32NA
Constant "Not Available" for a unsigned 32bit int value.
Definition: N2kMsg.h:61
const double N2kDoubleNA
Constant "Not Available" for a double value.
Definition: N2kMsg.h:49
#define BIT(n)
Definition: N2kMsg.h:70
const int8_t N2kInt8NA
Constant "Not Available" for a signed 8bit value.
Definition: N2kMsg.h:55
const uint16_t N2kUInt16NA
Constant "Not Available" for a unsigned 16bit int value.
Definition: N2kMsg.h:57
const uint8_t N2kUInt8NA
Constant "Not Available" for a unsigned 8bit int value.
Definition: N2kMsg.h:53
bool N2kIsNA(double v)
Verify that the specified value is equal to "Not available".
Definition: N2kMsg.h:80
This File contains all specific Enumerations to make NMEA2000 Messages easier for humans to read.
@ N2kCM_Standalone
Charger mode is stand alone.
Definition: N2kTypes.h:519
@ N2khr_magnetic
heading magnetic compass direction
Definition: N2kTypes.h:64
@ N2khr_true
heading true (eg. GNSS) direction
Definition: N2kTypes.h:63
@ N2kaismode_Autonomous
AIS is in Autonomous mode.
Definition: N2kTypes.h:452
@ N2kdir_reverse
navigating reverse
Definition: N2kTypes.h:49
@ N2kdir_forward
navigating forward
Definition: N2kTypes.h:48
@ N2ktimes_GPS
Source is Global Positioning System GPS.
Definition: N2kTypes.h:223
@ N2kRDO_NoDirectionOrder
no direction order
Definition: N2kTypes.h:280
@ N2kOnOff_Unavailable
Unavailable.
Definition: N2kTypes.h:492
@ N2kOnOff_On
Yes, On, Enabled.
Definition: N2kTypes.h:490
@ N2kWind_Unavailable
unavailable
Definition: N2kTypes.h:260
@ N2kGNSSt_GPS
only GPS satellite network
Definition: N2kTypes.h:109
@ N2kSWRT_Paddle_wheel
paddle wheel sensor is used
Definition: N2kTypes.h:267
@ N2khs_Undef
source is undefined
Definition: N2kTypes.h:197
@ N2kaischannel_A_VDL_reception
Channel A VDL reception.
Definition: N2kTypes.h:460
@ N2kaisr_Initial
initial AIS repeat
Definition: N2kTypes.h:369
@ N2kDD481_Unavailable
Unavailable.
@ N2kDD482_DataNotAvailable
Data not available.
@ N2kAISAtoN_not_specified
Default, type of AtoN not specified.
@ N2kDD072_Unavailable
data not available
@ N2kDD374_DataNotAvailable
Data is not available.
@ N2kDD002_No
paired status is NO
@ N2kDD002_Unavailable
paired status is UNKNOWN
@ N2kDD002_Yes
paired status is YES
@ N2kDD488_DataNotAvailable
Data Not Available.
@ N2kDD480_Unavailable
Unavailable.
This class contains all the data of an NMEA2000 message.
Definition: N2kMsg.h:656
bool ParseN2kTemperature(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource, double &ActualTemperature, double &SetTemperature)
Parsing the content of a "Temperature - DEPRECATED" message - PGN 130312.
Definition: N2kMessages.h:5006
bool ParseN2kTrimTab(const tN2kMsg &N2kMsg, int8_t &PortTrimTab, int8_t &StbdTrimTab)
Parsing the content of a "Trim Tab Status" message - PGN 130576.
Definition: N2kMessages.h:5476
bool ParseN2kTransmissionParameters(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, tN2kTransmissionGear &TransmissionGear, double &OilPressure, double &OilTemperature, unsigned char &DiscreteStatus1)
Parsing the content of a "Transmission parameters, dynamic" message - PGN 127493.
Definition: N2kMessages.h:1487
bool ParseN2kPGN127505(const tN2kMsg &N2kMsg, unsigned char &Instance, tN2kFluidType &FluidType, double &Level, double &Capacity)
Parsing the content of message PGN 127505 "Fluid level".
bool ParseN2kPGN129802(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &SourceID, tN2kAISTransceiverInformation &AISTransceiverInformation, char *SafetyRelatedText, size_t &SafetyRelatedTextMaxSize)
Parsing the Content of a PGN129802 Message - "AIS Safety Related Broadcast Message".
Definition: N2kMessages.cpp:66
bool ParseN2kEngineDynamicParam(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineOilPress, double &EngineOilTemp, double &EngineCoolantTemp, double &AltenatorVoltage, double &FuelRate, double &EngineHours, double &EngineCoolantPress, double &EngineFuelPress, int8_t &EngineLoad, int8_t &EngineTorque)
Parsing the content of a "Engine parameters dynamic" message - PGN 127489.
Definition: N2kMessages.h:1351
bool ParseN2kPGN129025(const tN2kMsg &N2kMsg, double &Latitude, double &Longitude)
Parsing the content of PGN 129025 "Position, Rapid Update".
bool ParseN2kPGN128776(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &WindlassIdentifier, tN2kWindlassDirectionControl &WindlassDirectionControl, unsigned char &SpeedControl, tN2kSpeedType &SpeedControlType, tN2kGenericStatusPair &AnchorDockingControl, tN2kGenericStatusPair &PowerEnable, tN2kGenericStatusPair &MechanicalLock, tN2kGenericStatusPair &DeckAndAnchorWash, tN2kGenericStatusPair &AnchorLight, double &CommandTimeout, tN2kWindlassControlEvents &WindlassControlEvents)
Parsing the content of message PGN 128776 "Anchor Windlass Control Status".
bool ParseN2kPGN129039(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, double &Latitude, double &Longitude, bool &Accuracy, bool &RAIM, uint8_t &Seconds, double &COG, double &SOG, tN2kAISTransceiverInformation &AISTransceiverInformation, double &Heading, tN2kAISUnit &Unit, bool &Display, bool &DSC, bool &Band, bool &Msg22, tN2kAISMode &Mode, bool &State)
Parsing the content of message PGN 129039 "AIS position reports for Class B".
bool ParseN2kOutsideEnvironmentalParameters(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterTemperature, double &OutsideAmbientAirTemperature, double &AtmosphericPressure)
Parsing the content of a "Environmental Parameters - DEPRECATED" message - PGN 130310.
Definition: N2kMessages.h:4833
bool ParseN2kDCStatus(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &DCInstance, tN2kDCType &DCType, unsigned char &StateOfCharge, unsigned char &StateOfHealth, double &TimeRemaining, double &RippleVoltage, double &Capacity)
Parsing the content of a "DC Detailed Status" message - PGN 127506.
Definition: N2kMessages.h:2006
bool ParseN2kPGN128777(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &WindlassIdentifier, double &RodeCounterValue, double &WindlassLineSpeed, tN2kWindlassMotionStates &WindlassMotionStatus, tN2kRodeTypeStates &RodeTypeStatus, tN2kAnchorDockingStates &AnchorDockingStatus, tN2kWindlassOperatingEvents &WindlassOperatingEvents)
Parsing the content of message PGN 128777 "Anchor Windlass Operating Status".
bool ParseN2kPGN128267(const tN2kMsg &N2kMsg, unsigned char &SID, double &DepthBelowTransducer, double &Offset, double &Range)
Parsing the content of message PGN 128267 "Water depth".
bool ParseN2kPGN130311(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kTempSource &TempSource, double &Temperature, tN2kHumiditySource &HumiditySource, double &Humidity, double &AtmosphericPressure)
Parsing the content of message PGN 130311 "Environmental Parameters - DEPRECATED".
bool ParseN2kMagneticVariation(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kMagneticVariation &Source, uint16_t &DaysSince1970, double &Variation)
Parsing the content of a "Magnetic Variation" message - PGN 127258.
Definition: N2kMessages.h:1058
bool ParseN2kRateOfTurn(const tN2kMsg &N2kMsg, unsigned char &SID, double &RateOfTurn)
Parsing the content of a "Rate of Turn" message - PGN 127251.
Definition: N2kMessages.h:847
bool ParseN2kBoatSpeed(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterReferenced, double &GroundReferenced, tN2kSpeedWaterReferenceType &SWRT)
Parsing the content of a "Boat Speed, Water Referenced" message - PGN 128259.
Definition: N2kMessages.h:2399
bool ParseN2kPGN127251(const tN2kMsg &N2kMsg, unsigned char &SID, double &RateOfTurn)
Parsing the content of Message PGN127251 "Rate of Turn".
bool ParseN2kWindSpeed(const tN2kMsg &N2kMsg, unsigned char &SID, double &WindSpeed, double &WindAngle, tN2kWindReference &WindReference)
Parsing the content of a "Wind Data" message - PGN 130306.
Definition: N2kMessages.h:4755
bool ParseN2kPGNSatellitesInView(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kRangeResidualMode &Mode, uint8_t &NumberOfSVs)
Parsing the content of a "GNSS Satellites in View" message - PGN 129540.
Definition: N2kMessages.h:4252
bool ParseN2kPGN130576(const tN2kMsg &N2kMsg, int8_t &PortTrimTab, int8_t &StbdTrimTab)
Parsing the content of message PGN 130576 "Trim Tab Status".
bool ParseN2kHeadingTrackControl(const tN2kMsg &N2kMsg, tN2kOnOff &RudderLimitExceeded, tN2kOnOff &OffHeadingLimitExceeded, tN2kOnOff &OffTrackLimitExceeded, tN2kOnOff &Override, tN2kSteeringMode &SteeringMode, tN2kTurnMode &TurnMode, tN2kHeadingReference &HeadingReference, tN2kRudderDirectionOrder &CommandedRudderDirection, double &CommandedRudderAngle, double &HeadingToSteerCourse, double &Track, double &RudderLimit, double &OffHeadingLimit, double &RadiusOfTurnOrder, double &RateOfTurnOrder, double &OffTrackLimit, double &VesselHeading)
Parsing the content of a "Heading/Track control" message - PGN 127237.
Definition: N2kMessages.h:607
bool ParseN2kEngineTripParameters(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &TripFuelUsed, double &FuelRateAverage, double &FuelRateEconomy, double &InstantaneousFuelEconomy)
Parsing the content of a "Trip Parameters, Engine" message - PGN 127497.
Definition: N2kMessages.h:1577
bool ParseN2kPGN130306(const tN2kMsg &N2kMsg, unsigned char &SID, double &WindSpeed, double &WindAngle, tN2kWindReference &WindReference)
Parsing the content of message PGN 130306 "Wind Data".
bool ParseN2kPGN127488(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineSpeed, double &EngineBoostPressure, int8_t &EngineTiltTrim)
Parsing the content of Message PGN 127488 "Engine parameters rapid".
bool ParseN2kEngineParamRapid(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineSpeed, double &EngineBoostPressure, int8_t &EngineTiltTrim)
Parsing the content of a "Engine parameters rapid" message - PGN 127488.
Definition: N2kMessages.h:1120
bool ParseN2kBinaryStatus(const tN2kMsg &N2kMsg, unsigned char &DeviceBankInstance, tN2kOnOff &Status1, tN2kOnOff &Status2, tN2kOnOff &Status3, tN2kOnOff &Status4)
Parsing the content of a "Universal Binary Status Report" message - PGN 127501.
Definition: N2kMessages.h:1741
bool ParseN2kPGN129810(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, uint8_t &VesselType, const char *Vendor, size_t VendorBufSize, const char *Callsign, size_t CallsignBufSize, double &Length, double &Beam, double &PosRefStbd, double &PosRefBow, uint32_t &MothershipID)
Parsing the content of message PGN 129810 "AIS static data class B part B".
bool ParseN2kPressure(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &PressureInstance, tN2kPressureSource &PressureSource, double &Pressure)
Parsing the content of a "Actual Pressure" message - PGN 130314.
Definition: N2kMessages.h:5171
bool ParseN2kPGN127513(const tN2kMsg &N2kMsg, unsigned char &BatInstance, tN2kBatType &BatType, tN2kBatEqSupport &SupportsEqual, tN2kBatNomVolt &BatNominalVoltage, tN2kBatChem &BatChemistry, double &BatCapacity, int8_t &BatTemperatureCoefficient, double &PeukertExponent, int8_t &ChargeEfficiencyFactor)
Parsing the content of message PGN 127513 "Battery Configuration Status".
bool ParseN2kPGN129794(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, uint32_t &IMOnumber, char *Callsign, size_t CallsignBufSize, char *Name, size_t NameBufSize, uint8_t &VesselType, double &Length, double &Beam, double &PosRefStbd, double &PosRefBow, uint16_t &ETAdate, double &ETAtime, double &Draught, char *Destination, size_t DestinationBufSize, tN2kAISVersion &AISversion, tN2kGNSStype &GNSStype, tN2kAISDTE &DTE, tN2kAISTransceiverInformation &AISinfo)
Parsing the content of message PGN 129794 "AIS static data class A".
bool ParseN2kPgn129539(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kGNSSDOPmode &DesiredMode, tN2kGNSSDOPmode &ActualMode, double &HDOP, double &VDOP, double &TDOP)
Parsing the content of message PGN 129539 "GNSS DOP data".
bool ParseN2kPGN127237(const tN2kMsg &N2kMsg, tN2kOnOff &RudderLimitExceeded, tN2kOnOff &OffHeadingLimitExceeded, tN2kOnOff &OffTrackLimitExceeded, tN2kOnOff &Override, tN2kSteeringMode &SteeringMode, tN2kTurnMode &TurnMode, tN2kHeadingReference &HeadingReference, tN2kRudderDirectionOrder &CommandedRudderDirection, double &CommandedRudderAngle, double &HeadingToSteerCourse, double &Track, double &RudderLimit, double &OffHeadingLimit, double &RadiusOfTurnOrder, double &RateOfTurnOrder, double &OffTrackLimit, double &VesselHeading)
Parsing the Content of Message PGN127237 "Heading/Track control".
bool ParseN2kPGN130577(const tN2kMsg &N2kMsg, tN2kDataMode &DataMode, tN2kHeadingReference &CogReference, unsigned char &SID, double &COG, double &SOG, double &Heading, double &SpeedThroughWater, double &Set, double &Drift)
Parsing the content of message PGN 130577 "Direction Data".
bool ParseN2kDistanceLog(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, uint32_t &Log, uint32_t &TripLog)
Parsing the content of a "Distance log" message - PGN 128275.
Definition: N2kMessages.h:2548
bool ParseN2kPGN129033(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, int16_t &LocalOffset)
Parsing the content of message PGN 129033 "Date,Time & Local offset".
bool ParseN2kAISClassBStaticPartB(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, uint8_t &VesselType, char *Vendor, size_t VendorBufSize, char *Callsign, size_t CallsignBufSize, double &Length, double &Beam, double &PosRefStbd, double &PosRefBow, uint32_t &MothershipID)
Parsing the content of a "AIS static data class B part B" message - PGN 129810.
Definition: N2kMessages.h:4610
bool ParseN2kAISClassBPosition(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, double &Latitude, double &Longitude, bool &Accuracy, bool &RAIM, uint8_t &Seconds, double &COG, double &SOG, tN2kAISTransceiverInformation &AISTransceiverInformation, double &Heading, tN2kAISUnit &Unit, bool &Display, bool &DSC, bool &Band, bool &Msg22, tN2kAISMode &Mode, bool &State)
Parsing the content of a "AIS position reports for Class B" message - PGN 129039.
Definition: N2kMessages.h:3539
bool ParseN2kPGN127250(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heading, double &Deviation, double &Variation, tN2kHeadingReference &ref)
Parsing Content of Message PGN 127250 "Vessel Heading".
bool ParseN2kPGN127258(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kMagneticVariation &Source, uint16_t &DaysSince1970, double &Variation)
Parsing the content of Message PGN 127258 "Magnetic Variation".
bool ParseN2kPGN129540(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kRangeResidualMode &Mode, uint8_t &NumberOfSVs)
Parsing the content of message PGN 129540 "GNSS Satellites in View".
bool ParseN2kMeteorlogicalStationData(const tN2kMsg &N2kMsg, tN2kMeteorlogicalStationData &N2kData)
Parsing the content of a "Meterological Station Data" message - PGN 130323.
Definition: N2kMessages.h:5418
bool ParseN2kPGN127245(const tN2kMsg &N2kMsg, double &RudderPosition, unsigned char &Instance, tN2kRudderDirectionOrder &RudderDirectionOrder, double &AngleOrder)
Parsing the content of Message PGN127245 "Rudder".
bool ParseN2kPGN129026(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kHeadingReference &ref, double &COG, double &SOG)
Parsing the content of PGN 129026 "COG SOG rapid update".
bool ParseN2kBatConf(const tN2kMsg &N2kMsg, unsigned char &BatInstance, tN2kBatType &BatType, tN2kBatEqSupport &SupportsEqual, tN2kBatNomVolt &BatNominalVoltage, tN2kBatChem &BatChemistry, double &BatCapacity, int8_t &BatTemperatureCoefficient, double &PeukertExponent, int8_t &ChargeEfficiencyFactor)
Parsing the content of a "Battery Configuration Status" message - PGN 127513.
Definition: N2kMessages.h:2232
bool ParseN2kMOBNotification(const tN2kMsg &N2kMsg, unsigned char &SID, uint32_t &MobEmitterId, tN2kMOBStatus &MOBStatus, double &ActivationTime, tN2kMOBPositionSource &PositionSource, uint16_t &PositionDate, double &PositionTime, double &Latitude, double &Longitude, tN2kHeadingReference &COGReference, double &COG, double &SOG, uint32_t &MMSI, tN2kMOBEmitterBatteryStatus &MOBEmitterBatteryStatus)
Parsing the content of a "Man Overboard Notification" message - PGN 127233.
Definition: N2kMessages.h:452
bool ParseN2kPGN130323(const tN2kMsg &N2kMsg, tN2kMeteorlogicalStationData &N2kData)
Parsing the content of message PGN 130323 "Meterological Station Data".
bool ParseN2kPGN128778(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &WindlassIdentifier, double &TotalMotorTime, double &ControllerVoltage, double &MotorCurrent, tN2kWindlassMonitoringEvents &WindlassMonitoringEvents)
Parsing the content of message PGN128778 "Anchor Windlass Monitoring Status".
bool ParseN2kPGN127493(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, tN2kTransmissionGear &TransmissionGear, double &OilPressure, double &OilTemperature, unsigned char &DiscreteStatus1)
Parsing the content of Message PGN 127493 "Transmission parameters, dynamic".
bool ParseN2kWaterDepth(const tN2kMsg &N2kMsg, unsigned char &SID, double &DepthBelowTransducer, double &Offset)
Parsing the content of a "Water depth" message - PGN 128267.
Definition: N2kMessages.h:2466
bool ParseN2kGNSSDOPData(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kGNSSDOPmode &DesiredMode, tN2kGNSSDOPmode &ActualMode, double &HDOP, double &VDOP, double &TDOP)
Parsing the content of a "GNSS DOP data" message - PGN 129539.
Definition: N2kMessages.h:4115
bool ParseN2kHumidity(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &HumidityInstance, tN2kHumiditySource &HumiditySource, double &ActualHumidity, double &SetHumidity)
Parsing the content of a "Humidity" message - PGN 130313.
Definition: N2kMessages.h:5074
bool ParseN2kEnvironmentalParameters(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kTempSource &TempSource, double &Temperature, tN2kHumiditySource &HumiditySource, double &Humidity, double &AtmosphericPressure)
Parsing the content of a "Environmental Parameters - DEPRECATED" message - PGN 130311.
Definition: N2kMessages.h:4920
bool ParseN2kPGN129283(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kXTEMode &XTEMode, bool &NavigationTerminated, double &XTE)
Parsing the content of Message PGN 129283 Message "Cross Track Error".
bool ParseN2kDirectionData(const tN2kMsg &N2kMsg, tN2kDataMode &DataMode, tN2kHeadingReference &CogReference, unsigned char &SID, double &COG, double &SOG, double &Heading, double &SpeedThroughWater, double &Set, double &Drift)
Parsing the content of a "Direction Data" message - PGN 130577.
Definition: N2kMessages.h:5553
bool ParseN2kPGN127233(const tN2kMsg &N2kMsg, unsigned char &SID, uint32_t &MobEmitterId, tN2kMOBStatus &MOBStatus, double &ActivationTime, tN2kMOBPositionSource &PositionSource, uint16_t &PositionDate, double &PositionTime, double &Latitude, double &Longitude, tN2kHeadingReference &COGReference, double &COG, double &SOG, uint32_t &MMSI, tN2kMOBEmitterBatteryStatus &MOBEmitterBatteryStatus)
Parsing the Content of Message PGN127233 "Man Overboard Notification".
bool ParseN2kChargerStatus(const tN2kMsg &N2kMsg, unsigned char &Instance, unsigned char &BatteryInstance, tN2kChargeState &ChargeState, tN2kChargerMode &ChargerMode, tN2kOnOff &Enabled, tN2kOnOff &EqualizationPending, double &EqualizationTimeRemaining)
Parsing the content of a "DC Charger Status" message - PGN 127507.
Definition: N2kMessages.h:2079
bool ParseN2kPositionRapid(const tN2kMsg &N2kMsg, double &Latitude, double &Longitude)
Parsing the content of a "Position, Rapid Update" message - PGN 129025.
Definition: N2kMessages.h:2954
bool ParseN2kPGN128275(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, uint32_t &Log, uint32_t &TripLog)
Parsing the content of message PGN 128275 "Distance log".
bool ParseN2kPGN127489(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &EngineOilPress, double &EngineOilTemp, double &EngineCoolantTemp, double &AltenatorVoltage, double &FuelRate, double &EngineHours, double &EngineCoolantPress, double &EngineFuelPress, int8_t &EngineLoad, int8_t &EngineTorque, tN2kEngineDiscreteStatus1 &Status1, tN2kEngineDiscreteStatus2 &Status2)
Parsing the content of Message PGN 127489 "Engine parameters dynamic".
bool ParseN2kPGN126992(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &SystemDate, double &SystemTime, tN2kTimeSource &TimeSource)
Parsing the Content of a PGN126992 Message - "System date/time".
Definition: N2kMessages.cpp:39
bool ParseN2kHeave(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heave)
Parsing the content of a "Heave" message - PGN 127252.
Definition: N2kMessages.h:911
bool ParseN2kDCBatStatus(const tN2kMsg &N2kMsg, unsigned char &BatteryInstance, double &BatteryVoltage, double &BatteryCurrent, double &BatteryTemperature, unsigned char &SID)
Parsing the content of a "Battery Status" message - PGN 127508.
Definition: N2kMessages.h:2154
bool ParseN2kPGN130314(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &PressureInstance, tN2kPressureSource &PressureSource, double &Pressure)
Parsing the content of message PGN 130314 "Actual Pressure".
bool ParseN2kPGN130310(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterTemperature, double &OutsideAmbientAirTemperature, double &AtmosphericPressure)
Parsing the content of message PGN 130310 "Environmental Parameters - DEPRECATED".
bool ParseN2kPGN127507(const tN2kMsg &N2kMsg, unsigned char &Instance, unsigned char &BatteryInstance, tN2kChargeState &ChargeState, tN2kChargerMode &ChargerMode, tN2kOnOff &Enabled, tN2kOnOff &EqualizationPending, double &EqualizationTimeRemaining)
Parsing the content of message PGN 127507 "DC Charger Status".
bool ParseN2kXTE(const tN2kMsg &N2kMsg, unsigned char &SID, tN2kXTEMode &XTEMode, bool &NavigationTerminated, double &XTE)
Parsing the content of a "Cross Track Error" message - PGN 129283.
Definition: N2kMessages.h:3838
bool ParseN2kPGN130316(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource, double &ActualTemperature, double &SetTemperature)
Parsing the content of message PGN 130316 "Temperature, Extended Range".
bool ParseN2kPGN129284(const tN2kMsg &N2kMsg, unsigned char &SID, double &DistanceToWaypoint, tN2kHeadingReference &BearingReference, bool &PerpendicularCrossed, bool &ArrivalCircleEntered, tN2kDistanceCalculationType &CalculationType, double &ETATime, int16_t &ETADate, double &BearingOriginToDestinationWaypoint, double &BearingPositionToDestinationWaypoint, uint32_t &OriginWaypointNumber, uint32_t &DestinationWaypointNumber, double &DestinationLatitude, double &DestinationLongitude, double &WaypointClosingVelocity)
Parsing the content of message PGN 129284 "Navigation Data".
bool ParseN2kPGN127497(const tN2kMsg &N2kMsg, unsigned char &EngineInstance, double &TripFuelUsed, double &FuelRateAverage, double &FuelRateEconomy, double &InstantaneousFuelEconomy)
Parsing the content of Message PGN 127497 "Trip Parameters, Engine".
bool ParseN2kPGN129029(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &DaysSince1970, double &SecondsSinceMidnight, double &Latitude, double &Longitude, double &Altitude, tN2kGNSStype &GNSStype, tN2kGNSSmethod &GNSSmethod, unsigned char &nSatellites, double &HDOP, double &PDOP, double &GeoidalSeparation, unsigned char &nReferenceStations, tN2kGNSStype &ReferenceStationType, uint16_t &ReferenceSationID, double &AgeOfCorrection)
Parsing the content of message PGN 129029 "GNSS Position Data".
bool ParseN2kFluidLevel(const tN2kMsg &N2kMsg, unsigned char &Instance, tN2kFluidType &FluidType, double &Level, double &Capacity)
Parsing the content of a "Fluid level" message - PGN 127505.
Definition: N2kMessages.h:1929
bool ParseN2kPGN128259(const tN2kMsg &N2kMsg, unsigned char &SID, double &WaterReferenced, double &GroundReferenced, tN2kSpeedWaterReferenceType &SWRT)
Parsing the content of message PGN 128259 "Boat Speed, Water Referenced".
bool ParseN2kAttitude(const tN2kMsg &N2kMsg, unsigned char &SID, double &Yaw, double &Pitch, double &Roll)
Parsing the content of a "Attitude" message - PGN 127257.
Definition: N2kMessages.h:990
bool ParseN2kNavigationInfo(const tN2kMsg &N2kMsg, unsigned char &SID, double &DistanceToWaypoint, tN2kHeadingReference &BearingReference, bool &PerpendicularCrossed, bool &ArrivalCircleEntered, tN2kDistanceCalculationType &CalculationType, double &ETATime, int16_t &ETADate, double &BearingOriginToDestinationWaypoint, double &BearingPositionToDestinationWaypoint, uint32_t &OriginWaypointNumber, uint32_t &DestinationWaypointNumber, double &DestinationLatitude, double &DestinationLongitude, double &WaypointClosingVelocity)
Parsing the content of a "Navigation Data" message - PGN 129284.
Definition: N2kMessages.h:3952
bool ParseN2kLeeway(const tN2kMsg &N2kMsg, unsigned char &SID, double &Leeway)
Parsing the content of a "Nautical Leeway Angle" message - PGN 128000.
Definition: N2kMessages.h:2333
bool ParseN2kPGN127508(const tN2kMsg &N2kMsg, unsigned char &BatteryInstance, double &BatteryVoltage, double &BatteryCurrent, double &BatteryTemperature, unsigned char &SID)
Parsing the content of message PGN 127508 "Battery Status".
bool ParseN2kPGN127502(const tN2kMsg &N2kMsg, unsigned char &TargetBankInstance, tN2kBinaryStatus &BankStatus)
Parse the content of a PGN 127502 (Switch Bank Control) message.
bool ParseN2kLocalOffset(const tN2kMsg &N2kMsg, uint16_t &DaysSince1970, double &SecondsSinceMidnight, int16_t &LocalOffset)
Parsing the content of a "Date,Time & Local offset" message - PGN 129033.
Definition: N2kMessages.h:3208
bool ParseN2kAISClassBStaticPartA(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, char *Name, size_t NameBufSize)
Parsing the content of a "AIS static data class B part A" message - PGN 129809.
Definition: N2kMessages.h:4501
bool ParseN2kGNSS(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &DaysSince1970, double &SecondsSinceMidnight, double &Latitude, double &Longitude, double &Altitude, tN2kGNSStype &GNSStype, tN2kGNSSmethod &GNSSmethod, unsigned char &nSatellites, double &HDOP, double &PDOP, double &GeoidalSeparation, unsigned char &nReferenceStations, tN2kGNSStype &ReferenceStationType, uint16_t &ReferenceSationID, double &AgeOfCorrection)
Parsing the content of a "GNSS Position Data" message - PGN 129029.
Definition: N2kMessages.h:3130
bool ParseN2kPGN130313(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &HumidityInstance, tN2kHumiditySource &HumiditySource, double &ActualHumidity, double &SetHumidity)
Parsing the content of message PGN 130313 "Humidity".
bool ParseN2kRudder(const tN2kMsg &N2kMsg, double &RudderPosition, unsigned char &Instance, tN2kRudderDirectionOrder &RudderDirectionOrder, double &AngleOrder)
Parsing the content of a "Rudder" message - PGN 127245.
Definition: N2kMessages.h:691
bool ParseN2kPGN127506(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &DCInstance, tN2kDCType &DCType, unsigned char &StateOfCharge, unsigned char &StateOfHealth, double &TimeRemaining, double &RippleVoltage, double &Capacity)
Parsing the content of message PGN 127506 "DC Detailed Status".
bool ParseN2kPGN127501(const tN2kMsg &N2kMsg, unsigned char &DeviceBankInstance, tN2kOnOff &Status1, tN2kOnOff &Status2, tN2kOnOff &Status3, tN2kOnOff &Status4)
Parsing the content of Message PGN 127501 Message "Universal Binary Status Report".
bool ParseN2kPGN129041(const tN2kMsg &N2kMsg, tN2kAISAtoNReportData &N2kData)
Parsing the content of message PGN 129041 "AIS Aids to Navigation (AtoN) Report".
bool ParseN2kAISClassAStatic(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, uint32_t &IMOnumber, char *Callsign, size_t CallsignBufSize, char *Name, size_t NameBufSize, uint8_t &VesselType, double &Length, double &Beam, double &PosRefStbd, double &PosRefBow, uint16_t &ETAdate, double &ETAtime, double &Draught, char *Destination, size_t DestinationBufSize, tN2kAISVersion &AISversion, tN2kGNSStype &GNSStype, tN2kAISDTE &DTE, tN2kAISTransceiverInformation &AISinfo)
Parsing the content of a "AIS static data class A" message - PGN 129794.
Definition: N2kMessages.h:4414
bool ParseN2kSystemTime(const tN2kMsg &N2kMsg, unsigned char &SID, uint16_t &SystemDate, double &SystemTime, tN2kTimeSource &TimeSource)
Parsing the content of a "System date/time" message - PGN 126992.
Definition: N2kMessages.h:238
bool ParseN2kAISAtoNReport(const tN2kMsg &N2kMsg, tN2kAISAtoNReportData &N2kData)
Parsing the content of a "AIS Aids to Navigation (AtoN) Report" message - PGN 129041.
Definition: N2kMessages.h:3775
bool ParseN2kPGN130312(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource, double &ActualTemperature, double &SetTemperature)
Parsing the content of message PGN 130312 "Temperature - DEPRECATED".
bool ParseN2kAISSafetyRelatedBroadcastMsg(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &SourceID, tN2kAISTransceiverInformation &AISTransceiverInformation, char *SafetyRelatedText, size_t &SafetyRelatedTextMaxSize)
Parsing the content of a "AIS Safety Related Broadcast Message" message - PGN 129802.
Definition: N2kMessages.h:318
bool ParseN2kPGN129038(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, double &Latitude, double &Longitude, bool &Accuracy, bool &RAIM, uint8_t &Seconds, double &COG, double &SOG, double &Heading, double &ROT, tN2kAISNavStatus &NavStatus)
Parsing the content of message PGN 129038 "AIS position reports for Class A".
bool ParseN2kTemperatureExt(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource, double &ActualTemperature, double &SetTemperature)
Parsing the content of a "Temperature, Extended Range" message - PGN 130316.
Definition: N2kMessages.h:5286
bool ParseN2kPGN128000(const tN2kMsg &N2kMsg, unsigned char &SID, double &Leeway)
Parsing the content of Message PGN 128000 "Nautical Leeway Angle".
bool ParseN2kPGN127252(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heave, double &Delay, tN2kDelaySource &DelaySource)
Parsing the content of Message PGN127252 "Heave".
bool ParseN2kHeading(const tN2kMsg &N2kMsg, unsigned char &SID, double &Heading, double &Deviation, double &Variation, tN2kHeadingReference &ref)
Parsing the content of a "Vessel Heading" message - PGN 127250.
Definition: N2kMessages.h:791
bool ParseN2kPGN129809(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, char *Name, size_t NameBufSize)
Parsing the content of message PGN 129809 "AIS static data class B part A".
bool ParseN2kPGN127257(const tN2kMsg &N2kMsg, unsigned char &SID, double &Yaw, double &Pitch, double &Roll)
Parsing the content of Message PGN 127257 "Attitude".
bool ParseN2kAISClassAPosition(const tN2kMsg &N2kMsg, uint8_t &MessageID, tN2kAISRepeat &Repeat, uint32_t &UserID, double &Latitude, double &Longitude, bool &Accuracy, bool &RAIM, uint8_t &Seconds, double &COG, double &SOG, double &Heading, double &ROT, tN2kAISNavStatus &NavStatus)
Parsing the content of a "AIS position reports for Class A" message - PGN 129038.
Definition: N2kMessages.h:3333
void SetN2kEngineParamRapid(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineSpeed, double EngineBoostPressure=N2kDoubleNA, int8_t EngineTiltTrim=N2kInt8NA)
Setting up Message "Engine parameters rapid" - PGN 127488.
Definition: N2kMessages.h:1087
void SetN2kPGN129284(tN2kMsg &N2kMsg, unsigned char SID, double DistanceToWaypoint, tN2kHeadingReference BearingReference, bool PerpendicularCrossed, bool ArrivalCircleEntered, tN2kDistanceCalculationType CalculationType, double ETATime, int16_t ETADate, double BearingOriginToDestinationWaypoint, double BearingPositionToDestinationWaypoint, uint32_t OriginWaypointNumber, uint32_t DestinationWaypointNumber, double DestinationLatitude, double DestinationLongitude, double WaypointClosingVelocity)
Setting up PGN 129284 Message "Navigation Data".
void SetN2kPGN127245(tN2kMsg &N2kMsg, double RudderPosition, unsigned char Instance=0, tN2kRudderDirectionOrder RudderDirectionOrder=N2kRDO_NoDirectionOrder, double AngleOrder=N2kDoubleNA)
Setting up PGN127245 Message "Rudder".
void SetN2kPressure(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance, tN2kPressureSource PressureSource, double Pressure)
Setting up Message "Actual Pressure" - PGN 130314.
Definition: N2kMessages.h:5136
void SetN2kPGN129540(tN2kMsg &N2kMsg, unsigned char SID=0xff, tN2kRangeResidualMode Mode=N2kDD072_Unavailable)
Setting up PGN 129540 Message "GNSS Satellites in View".
void SetN2kPGN128776(tN2kMsg &N2kMsg, unsigned char SID, unsigned char WindlassIdentifier, tN2kWindlassDirectionControl WindlassDirectionControl, unsigned char SpeedControl, tN2kSpeedType SpeedControlType=N2kDD488_DataNotAvailable, tN2kGenericStatusPair AnchorDockingControl=N2kDD002_Unavailable, tN2kGenericStatusPair PowerEnable=N2kDD002_Unavailable, tN2kGenericStatusPair MechanicalLock=N2kDD002_Unavailable, tN2kGenericStatusPair DeckAndAnchorWash=N2kDD002_Unavailable, tN2kGenericStatusPair AnchorLight=N2kDD002_Unavailable, double CommandTimeout=0.4, const tN2kWindlassControlEvents &WindlassControlEvents=tN2kWindlassControlEvents())
Setting up PGN 128776 Message "Anchor Windlass Control Status".
void SetN2kTrimTab(tN2kMsg &N2kMsg, int8_t PortTrimTab, int8_t StbdTrimTab)
Setting up Message "Trim Tab Status" - PGN 130576.
Definition: N2kMessages.h:5445
void SetN2kPGN130314(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance, tN2kPressureSource PressureSource, double Pressure)
Setting up PGN 130314 Message "Actual Pressure".
void SetN2kPGN127502(tN2kMsg &N2kMsg, unsigned char TargetBankInstance, tN2kBinaryStatus BankStatus)
Set up PGN 127502 "Switch Bank Control" message.
void SetN2kDCStatus(tN2kMsg &N2kMsg, unsigned char SID, unsigned char DCInstance, tN2kDCType DCType, unsigned char StateOfCharge, unsigned char StateOfHealth, double TimeRemaining, double RippleVoltage=N2kDoubleNA, double Capacity=N2kDoubleNA)
Setting up Message "DC Detailed Status" - PGN 127506.
Definition: N2kMessages.h:1967
void SetN2kPGN129809(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, const char *Name)
Setting up PGN 129809 Message "AIS static data class B part A".
void SetN2kPGN129029(tN2kMsg &N2kMsg, unsigned char SID, uint16_t DaysSince1970, double SecondsSinceMidnight, double Latitude, double Longitude, double Altitude, tN2kGNSStype GNSStype, tN2kGNSSmethod GNSSmethod, unsigned char nSatellites, double HDOP, double PDOP=0, double GeoidalSeparation=0, unsigned char nReferenceStations=0, tN2kGNSStype ReferenceStationType=N2kGNSSt_GPS, uint16_t ReferenceSationID=0, double AgeOfCorrection=0)
Setting up PGN 129029 Message "GNSS Position Data".
void SetN2kNavigationInfo(tN2kMsg &N2kMsg, unsigned char SID, double DistanceToWaypoint, tN2kHeadingReference BearingReference, bool PerpendicularCrossed, bool ArrivalCircleEntered, tN2kDistanceCalculationType CalculationType, double ETATime, int16_t ETADate, double BearingOriginToDestinationWaypoint, double BearingPositionToDestinationWaypoint, uint32_t OriginWaypointNumber, uint32_t DestinationWaypointNumber, double DestinationLatitude, double DestinationLongitude, double WaypointClosingVelocity)
Setting up Message "Navigation Data" - PGN 129284.
Definition: N2kMessages.h:3890
void SetN2kAISSafetyRelatedBroadcastMsg(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t SourceID, tN2kAISTransceiverInformation AISTransceiverInformation, char *SafetyRelatedText)
Setting up Message "AIS Safety Related Broadcast Message" - PGN 129802.
Definition: N2kMessages.h:276
void SetN2kHeave(tN2kMsg &N2kMsg, unsigned char SID, double Heave, double Delay=N2kDoubleNA, tN2kDelaySource DelaySource=N2kDD374_DataNotAvailable)
Setting up Message "Rate of Turn" - PGN 127252.
Definition: N2kMessages.h:878
void SetN2kPGN127252(tN2kMsg &N2kMsg, unsigned char SID, double Heave, double Delay=N2kDoubleNA, tN2kDelaySource DelaySource=N2kDD374_DataNotAvailable)
Setting up PGN 127252 Message "Heave".
void SetN2kPGN130311(tN2kMsg &N2kMsg, unsigned char SID, tN2kTempSource TempSource, double Temperature, tN2kHumiditySource HumiditySource=N2khs_Undef, double Humidity=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA)
Setting up PGN 130311 Message "Environmental Parameters - DEPRECATED".
void SetN2kRouteWPInfo(tN2kMsg &N2kMsg, uint16_t Start, uint16_t Database, uint16_t Route, tN2kNavigationDirection NavDirection, const char *RouteName, tN2kGenericStatusPair SupplementaryData=N2kDD002_No)
Setting up Message "Route/WP information" - PGN 129285.
Definition: N2kMessages.h:3991
bool AppendN2kPGN129285(tN2kMsg &N2kMsg, uint16_t WPID, const char *WPName, double Latitude, double Longitude)
Append another Waypoint to PGN 129285 "Route/WP information".
void SetN2kPGN130576(tN2kMsg &N2kMsg, int8_t PortTrimTab, int8_t StbdTrimTab)
Setting up PGN 130576 Message "Trim Tab Status".
void SetN2kHeadingTrackControl(tN2kMsg &N2kMsg, tN2kOnOff RudderLimitExceeded, tN2kOnOff OffHeadingLimitExceeded, tN2kOnOff OffTrackLimitExceeded, tN2kOnOff Override, tN2kSteeringMode SteeringMode, tN2kTurnMode TurnMode, tN2kHeadingReference HeadingReference, tN2kRudderDirectionOrder CommandedRudderDirection, double CommandedRudderAngle, double HeadingToSteerCourse, double Track, double RudderLimit, double OffHeadingLimit, double RadiusOfTurnOrder, double RateOfTurnOrder, double OffTrackLimit, double VesselHeading)
Setting up Message "Heading/Track control" - PGN 127237.
Definition: N2kMessages.h:526
void SetN2kPGN126992(tN2kMsg &N2kMsg, unsigned char SID, uint16_t SystemDate, double SystemTime, tN2kTimeSource TimeSource=N2ktimes_GPS)
Setting up PGN126992 Message "System date/time".
Definition: N2kMessages.cpp:28
void SetN2kOutsideEnvironmentalParameters(tN2kMsg &N2kMsg, unsigned char SID, double WaterTemperature, double OutsideAmbientAirTemperature=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA)
Setting up Message "Environmental Parameters - DEPRECATED" - PGN 130310.
Definition: N2kMessages.h:4793
void SetN2kPGN127497(tN2kMsg &N2kMsg, unsigned char EngineInstance, double TripFuelUsed, double FuelRateAverage, double FuelRateEconomy=N2kDoubleNA, double InstantaneousFuelEconomy=N2kDoubleNA)
Setting up PGN 127497 Message "Trip Parameters, Engine".
void SetN2kBatConf(tN2kMsg &N2kMsg, unsigned char BatInstance, tN2kBatType BatType, tN2kBatEqSupport SupportsEqual, tN2kBatNomVolt BatNominalVoltage, tN2kBatChem BatChemistry, double BatCapacity, int8_t BatTemperatureCoefficient, double PeukertExponent, int8_t ChargeEfficiencyFactor)
Setting up Message "Battery Configuration Status" - PGN 127513.
Definition: N2kMessages.h:2190
void SetN2kAISClassBStaticPartA(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, const char *Name)
Setting up Message "AIS static data class B part A" - PGN 129809.
Definition: N2kMessages.h:4458
void SetN2kPGN127489(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineOilPress, double EngineOilTemp, double EngineCoolantTemp, double AltenatorVoltage, double FuelRate, double EngineHours, double EngineCoolantPress=N2kDoubleNA, double EngineFuelPress=N2kDoubleNA, int8_t EngineLoad=N2kInt8NA, int8_t EngineTorque=N2kInt8NA, tN2kEngineDiscreteStatus1 Status1=0, tN2kEngineDiscreteStatus2 Status2=0)
Setting up PGN 127489 Message "Engine parameters dynamic".
bool ParseN2kSwitchbankControl(const tN2kMsg &N2kMsg, unsigned char &TargetBankInstance, tN2kBinaryStatus &BankStatus)
Parse PGN 127502 "Switch Bank Control" message.
Definition: N2kMessages.h:1818
void SetN2kMeteorlogicalStationData(tN2kMsg &N2kMsg, const tN2kMeteorlogicalStationData &N2kData)
Setting up Message "Meterological Station Data" - PGN 130323.
Definition: N2kMessages.h:5395
void SetN2kPGN128778(tN2kMsg &N2kMsg, unsigned char SID, unsigned char WindlassIdentifier, double TotalMotorTime, double ControllerVoltage=N2kDoubleNA, double MotorCurrent=N2kDoubleNA, const tN2kWindlassMonitoringEvents &WindlassMonitoringEvents=tN2kWindlassMonitoringEvents())
Setting up PGN 128778Message "Anchor Windlass Monitoring Status".
void SetN2kBoatSpeed(tN2kMsg &N2kMsg, unsigned char SID, double WaterReferenced, double GroundReferenced=N2kDoubleNA, tN2kSpeedWaterReferenceType SWRT=N2kSWRT_Paddle_wheel)
Setting up Message "Boat Speed, Water Referenced" - PGN 128259.
Definition: N2kMessages.h:2366
void SetN2kPGN129039(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, double Latitude, double Longitude, bool Accuracy, bool RAIM, uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation, double Heading, tN2kAISUnit Unit, bool Display, bool DSC, bool Band, bool Msg22, tN2kAISMode Mode, bool State, unsigned char SID=0xff)
Setting up PGN 129039 Message "AIS position reports for Class B".
void SetN2kPGN128259(tN2kMsg &N2kMsg, unsigned char SID, double WaterReferenced, double GroundReferenced=N2kDoubleNA, tN2kSpeedWaterReferenceType SWRT=N2kSWRT_Paddle_wheel)
Setting up PGN 128259 Message "Boat Speed, Water Referenced".
void SetN2kPGN129539(tN2kMsg &N2kMsg, unsigned char SID, tN2kGNSSDOPmode DesiredMode, tN2kGNSSDOPmode ActualMode, double HDOP, double VDOP, double TDOP)
Setting up PGN 129539 Message "GNSS DOP data".
void SetN2kLeeway(tN2kMsg &N2kMsg, unsigned char SID, double Leeway)
Setting up Message "Nautical Leeway Angle" - PGN 128000.
Definition: N2kMessages.h:2283
void SetN2kPGN128777(tN2kMsg &N2kMsg, unsigned char SID, unsigned char WindlassIdentifier, double RodeCounterValue, double WindlassLineSpeed=N2kDoubleNA, tN2kWindlassMotionStates WindlassMotionStatus=N2kDD480_Unavailable, tN2kRodeTypeStates RodeTypeStatus=N2kDD481_Unavailable, tN2kDD482 AnchorDockingStatus=N2kDD482_DataNotAvailable, const tN2kWindlassOperatingEvents &WindlassOperatingEvents=tN2kWindlassOperatingEvents())
Setting up PGN 128777 Message "Anchor Windlass Operating Status".
void SetN2kXTE(tN2kMsg &N2kMsg, unsigned char SID, tN2kXTEMode XTEMode, bool NavigationTerminated, double XTE)
Setting up Message "Cross Track Error" - PGN 129283.
Definition: N2kMessages.h:3806
void SetN2kPGN130306(tN2kMsg &N2kMsg, unsigned char SID, double WindSpeed, double WindAngle, tN2kWindReference WindReference)
Setting up PGN 130306 Message "Wind Data".
void SetN2kEngineDynamicParam(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineOilPress, double EngineOilTemp, double EngineCoolantTemp, double AltenatorVoltage, double FuelRate, double EngineHours, double EngineCoolantPress=N2kDoubleNA, double EngineFuelPress=N2kDoubleNA, int8_t EngineLoad=N2kInt8NA, int8_t EngineTorque=N2kInt8NA, tN2kEngineDiscreteStatus1 Status1=0, tN2kEngineDiscreteStatus2 Status2=0)
Setting up Message "Engine parameters dynamic" - PGN 127489.
Definition: N2kMessages.h:1165
void SetN2kAISClassBPosition(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, double Latitude, double Longitude, bool Accuracy, bool RAIM, uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation, double Heading, tN2kAISUnit Unit, bool Display, bool DSC, bool Band, bool Msg22, tN2kAISMode Mode, bool State, unsigned char SID=0xff)
Setting up Message "AIS position reports for Class B" - PGN 129039 (Latest inline version)
Definition: N2kMessages.h:3424
void SetN2kPGN127488(tN2kMsg &N2kMsg, unsigned char EngineInstance, double EngineSpeed, double EngineBoostPressure=N2kDoubleNA, int8_t EngineTiltTrim=N2kInt8NA)
Setting up PGN 127488 Message "Engine parameters rapid".
void SetN2kPGN127493(tN2kMsg &N2kMsg, unsigned char EngineInstance, tN2kTransmissionGear TransmissionGear, double OilPressure, double OilTemperature, unsigned char DiscreteStatus1=0)
Setting up PGN 127493 Message "Transmission parameters, dynamic".
void SetN2kAISAtoNReport(tN2kMsg &N2kMsg, const tN2kAISAtoNReportData &N2kData)
Setting up Message "AIS Aids to Navigation (AtoN) Report" - PGN 129041.
Definition: N2kMessages.h:3744
void SetN2kWaterDepth(tN2kMsg &N2kMsg, unsigned char SID, double DepthBelowTransducer, double Offset, double Range=N2kDoubleNA)
Setting up Message "Water depth" - PGN 128267.
Definition: N2kMessages.h:2432
void SetN2kPGN127507(tN2kMsg &N2kMsg, unsigned char Instance, unsigned char BatteryInstance, tN2kChargeState ChargeState, tN2kChargerMode ChargerMode=N2kCM_Standalone, tN2kOnOff Enabled=N2kOnOff_On, tN2kOnOff EqualizationPending=N2kOnOff_Unavailable, double EqualizationTimeRemaining=N2kDoubleNA)
Setting up PGN 127507 Message "DC Charger Status".
void SetN2kAISClassBStaticPartB(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, uint8_t VesselType, const char *Vendor, const char *Callsign, double Length, double Beam, double PosRefStbd, double PosRefBow, uint32_t MothershipID)
Setting up Message "AIS static data class B part B" - PGN 129810.
Definition: N2kMessages.h:4551
void SetN2kChargerStatus(tN2kMsg &N2kMsg, unsigned char Instance, unsigned char BatteryInstance, tN2kChargeState ChargeState, tN2kChargerMode ChargerMode=N2kCM_Standalone, tN2kOnOff Enabled=N2kOnOff_On, tN2kOnOff EqualizationPending=N2kOnOff_Unavailable, double EqualizationTimeRemaining=N2kDoubleNA)
Setting up Message "DC Charger Status" - PGN 127507.
Definition: N2kMessages.h:2040
void SetN2kPGN128275(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, uint32_t Log, uint32_t TripLog)
Setting up PGN 128275 Message "Distance log".
void SetN2kSetPressure(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance, tN2kPressureSource PressureSource, double SetPressure)
Setting up Message "Set Pressure" - PGN 130315.
Definition: N2kMessages.h:5208
void SetN2kLatLonRapid(tN2kMsg &N2kMsg, double Latitude, double Longitude)
Setting up Message "Position, Rapid Update" - PGN 129025.
Definition: N2kMessages.h:2920
void SetN2kTransmissionParameters(tN2kMsg &N2kMsg, unsigned char EngineInstance, tN2kTransmissionGear TransmissionGear, double OilPressure, double OilTemperature, unsigned char DiscreteStatus1=0)
Setting up Message "Transmission parameters, dynamic" - PGN 127493.
Definition: N2kMessages.h:1430
void SetN2kPGN127257(tN2kMsg &N2kMsg, unsigned char SID, double Yaw, double Pitch, double Roll)
Setting up PGN 127257 Message "Attitude".
void SetN2kDCBatStatus(tN2kMsg &N2kMsg, unsigned char BatteryInstance, double BatteryVoltage, double BatteryCurrent=N2kDoubleNA, double BatteryTemperature=N2kDoubleNA, unsigned char SID=1)
Setting up Message "Battery Status" - PGN 127508.
Definition: N2kMessages.h:2116
void SetN2kPGN127501(tN2kMsg &N2kMsg, unsigned char DeviceBankInstance, tN2kBinaryStatus BankStatus)
Setting up PGN 127501 Message "Universal Binary Status Report".
void SetN2kAISClassAStatic(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, uint32_t IMOnumber, const char *Callsign, const char *Name, uint8_t VesselType, double Length, double Beam, double PosRefStbd, double PosRefBow, uint16_t ETAdate, double ETAtime, double Draught, char const *Destination, tN2kAISVersion AISversion, tN2kGNSStype GNSStype, tN2kAISDTE DTE, tN2kAISTransceiverInformation AISinfo)
Setting up Message "AIS static data class A" - PGN 129794.
Definition: N2kMessages.h:4334
void SetN2kPGN127250(tN2kMsg &N2kMsg, unsigned char SID, double Heading, double Deviation, double Variation, tN2kHeadingReference ref)
Setting up PGN127250 Message "Vessel Heading".
void SetN2kPGN127508(tN2kMsg &N2kMsg, unsigned char BatteryInstance, double BatteryVoltage, double BatteryCurrent=N2kDoubleNA, double BatteryTemperature=N2kDoubleNA, unsigned char SID=0xff)
Setting up PGN 127508 Message "Battery Status".
void SetN2kMOBNotification(tN2kMsg &N2kMsg, unsigned char SID, uint32_t MobEmitterId, tN2kMOBStatus MOBStatus, double ActivationTime, tN2kMOBPositionSource PositionSource, uint16_t PositionDate, double PositionTime, double Latitude, double Longitude, tN2kHeadingReference COGReference, double COG, double SOG, uint32_t MMSI, tN2kMOBEmitterBatteryStatus MOBEmitterBatteryStatus)
Setting up Message "Man Overboard Notification" - PGN 127233.
Definition: N2kMessages.h:379
void SetN2kGNSS(tN2kMsg &N2kMsg, unsigned char SID, uint16_t DaysSince1970, double SecondsSinceMidnight, double Latitude, double Longitude, double Altitude, tN2kGNSStype GNSStype, tN2kGNSSmethod GNSSmethod, unsigned char nSatellites, double HDOP, double PDOP=0, double GeoidalSeparation=0, unsigned char nReferenceStations=0, tN2kGNSStype ReferenceStationType=N2kGNSSt_GPS, uint16_t ReferenceSationID=0, double AgeOfCorrection=0)
Setting up Message "GNSS Position Data" - PGN 129029.
Definition: N2kMessages.h:3065
void SetN2kPGN130310(tN2kMsg &N2kMsg, unsigned char SID, double WaterTemperature, double OutsideAmbientAirTemperature=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA)
Setting up PGN 130310 Message " Environmental Parameters - DEPRECATED".
void SetN2kPGN127513(tN2kMsg &N2kMsg, unsigned char BatInstance, tN2kBatType BatType, tN2kBatEqSupport SupportsEqual, tN2kBatNomVolt BatNominalVoltage, tN2kBatChem BatChemistry, double BatCapacity, int8_t BatTemperatureCoefficient, double PeukertExponent, int8_t ChargeEfficiencyFactor)
Setting up PGN 127513 Message "Battery Configuration Status".
bool AppendN2kPGN129540(tN2kMsg &N2kMsg, const tSatelliteInfo &SatelliteInfo)
Append a new satellite info to PGN 129540 Message "GNSS Satellites in View".
void SetN2kDirectionData(tN2kMsg &N2kMsg, tN2kDataMode DataMode, tN2kHeadingReference CogReference, unsigned char SID, double COG, double SOG, double Heading, double SpeedThroughWater, double Set, double Drift)
Setting up Message "Direction Data" - PGN 130577.
Definition: N2kMessages.h:5513
void SetN2kTemperature(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource, double ActualTemperature, double SetTemperature=N2kDoubleNA)
Setting up Message "Temperature - DEPRECATED" - PGN 130312.
Definition: N2kMessages.h:4962
void SetN2kMagneticHeading(tN2kMsg &N2kMsg, unsigned char SID, double Heading, double Deviation=N2kDoubleNA, double Variation=N2kDoubleNA)
Setting up Message "Vessel Heading" - PGN 127250.
Definition: N2kMessages.h:754
void SetN2kPGN129026(tN2kMsg &N2kMsg, unsigned char SID, tN2kHeadingReference ref, double COG, double SOG)
Setting up PGN 129026 Message "COG SOG rapid update".
void SetN2kPGN130323(tN2kMsg &N2kMsg, const tN2kMeteorlogicalStationData &N2kData)
Setting up PGN 130323 Message "Meterological Station Data".
void SetN2kPGN129285(tN2kMsg &N2kMsg, uint16_t Start, uint16_t Database, uint16_t Route, tN2kNavigationDirection NavDirection, const char *RouteName, tN2kGenericStatusPair SupplementaryData=N2kDD002_No)
Setting up PGN 129285 Message "Route/WP information".
void SetN2kGNSSSatellitesInView(tN2kMsg &N2kMsg, unsigned char SID=0xff, tN2kRangeResidualMode Mode=N2kDD072_Unavailable)
Setting up Message "GNSS DOP data" - PGN 129540.
Definition: N2kMessages.h:4185
void SetN2kPGN129794(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, uint32_t IMOnumber, const char *Callsign, const char *Name, uint8_t VesselType, double Length, double Beam, double PosRefStbd, double PosRefBow, uint16_t ETAdate, double ETAtime, double Draught, const char *Destination, tN2kAISVersion AISversion, tN2kGNSStype GNSStype, tN2kAISDTE DTE, tN2kAISTransceiverInformation AISinfo)
Setting up PGN 129794 Message "AIS static data class A".
void SetN2kPGN127251(tN2kMsg &N2kMsg, unsigned char SID, double RateOfTurn)
Setting up PGN 127251 Message "Rate of Turn".
void SetN2kPGN129802(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t SourceID, tN2kAISTransceiverInformation AISTransceiverInformation, char *SafetyRelatedText)
Setting up PGN129802 Message "AIS Safety Related Broadcast Message".
Definition: N2kMessages.cpp:55
bool AppendN2kRouteWPInfo(tN2kMsg &N2kMsg, uint16_t WPID, const char *WPName, double Latitude, double Longitude)
Append another Waypoint to "Route/WP information"- PGN 129285.
Definition: N2kMessages.h:4038
void SetN2kPGN127233(tN2kMsg &N2kMsg, unsigned char SID, uint32_t MobEmitterId, tN2kMOBStatus MOBStatus, double ActivationTime, tN2kMOBPositionSource PositionSource, uint16_t PositionDate, double PositionTime, double Latitude, double Longitude, tN2kHeadingReference COGReference, double COG, double SOG, uint32_t MMSI, tN2kMOBEmitterBatteryStatus MOBEmitterBatteryStatus)
Setting up PGN127233 Message "Man Overboard Notification".
Definition: N2kMessages.cpp:87
void SetN2kEnvironmentalParameters(tN2kMsg &N2kMsg, unsigned char SID, tN2kTempSource TempSource, double Temperature, tN2kHumiditySource HumiditySource=N2khs_Undef, double Humidity=N2kDoubleNA, double AtmosphericPressure=N2kDoubleNA)
Setting up Message "Environmental Parameters - DEPRECATED" - PGN 130311.
Definition: N2kMessages.h:4876
void SetN2kPGN127506(tN2kMsg &N2kMsg, unsigned char SID, unsigned char DCInstance, tN2kDCType DCType, unsigned char StateOfCharge, unsigned char StateOfHealth, double TimeRemaining, double RippleVoltage=N2kDoubleNA, double Capacity=N2kDoubleNA)
Setting up PGN 127506 Message "DC Detailed Status".
void SetN2kRudder(tN2kMsg &N2kMsg, double RudderPosition, unsigned char Instance=0, tN2kRudderDirectionOrder RudderDirectionOrder=N2kRDO_NoDirectionOrder, double AngleOrder=N2kDoubleNA)
Setting up Message "Rudder" - PGN 127245.
Definition: N2kMessages.h:657
void SetN2kFluidLevel(tN2kMsg &N2kMsg, unsigned char Instance, tN2kFluidType FluidType, double Level, double Capacity)
Setting up Message "Fluid level" - PGN 127505.
Definition: N2kMessages.h:1894
void SetN2kPGN129033(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, int16_t LocalOffset)
Setting up PGN 129033 Message "Date,Time & Local offset".
void SetN2kPGN129810(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, uint8_t VesselType, const char *Vendor, const char *Callsign, double Length, double Beam, double PosRefStbd, double PosRefBow, uint32_t MothershipID)
Setting up PGN 129810 Message "AIS static data class B part B".
void SetN2kHumidity(tN2kMsg &N2kMsg, unsigned char SID, unsigned char HumidityInstance, tN2kHumiditySource HumiditySource, double ActualHumidity, double SetHumidity=N2kDoubleNA)
Setting up Message "Humidity" - PGN 130313.
Definition: N2kMessages.h:5040
void SetN2kPGN130316(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource, double ActualTemperature, double SetTemperature=N2kDoubleNA)
Setting up PGN 130316 Message "Temperature, Extended Range".
void SetN2kPGN127237(tN2kMsg &N2kMsg, tN2kOnOff RudderLimitExceeded, tN2kOnOff OffHeadingLimitExceeded, tN2kOnOff OffTrackLimitExceeded, tN2kOnOff Override, tN2kSteeringMode SteeringMode, tN2kTurnMode TurnMode, tN2kHeadingReference HeadingReference, tN2kRudderDirectionOrder CommandedRudderDirection, double CommandedRudderAngle, double HeadingToSteerCourse, double Track, double RudderLimit, double OffHeadingLimit, double RadiusOfTurnOrder, double RateOfTurnOrder, double OffTrackLimit, double VesselHeading)
Setting up PGN127237 Message "Heading/Track control".
void SetN2kWaypointList(tN2kMsg &N2kMsg, uint16_t Start, uint16_t NumWaypoints, uint16_t Database)
Setting up Message "Route and WP Service - WP List - WP Name & Position" - PGN 130074.
Definition: N2kMessages.h:4646
void SetN2kRateOfTurn(tN2kMsg &N2kMsg, unsigned char SID, double RateOfTurn)
Setting up Message "Rate of Turn" - PGN 127251.
Definition: N2kMessages.h:819
bool AppendN2kWaypointList(tN2kMsg &N2kMsg, uint16_t ID, char *Name, double Latitude, double Longitude)
Append a Waypoint to Message "Route and WP Service - WP List - WP Name & Position" - PGN 1300...
Definition: N2kMessages.h:4680
void SetN2kPGN129041(tN2kMsg &N2kMsg, const tN2kAISAtoNReportData &N2kData)
Setting up PGN 129041 Message "AIS Aids to Navigation (AtoN) Report".
void SetN2kPGN129038(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, double Latitude, double Longitude, bool Accuracy, bool RAIM, uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation, double Heading, double ROT, tN2kAISNavStatus NavStatus)
Setting up PGN 129038 Message "AIS position reports for Class A".
void SetN2kPGN129283(tN2kMsg &N2kMsg, unsigned char SID, tN2kXTEMode XTEMode, bool NavigationTerminated, double XTE)
Setting up PGN 129283 Message "Cross Track Error".
void SetN2kCOGSOGRapid(tN2kMsg &N2kMsg, unsigned char SID, tN2kHeadingReference ref, double COG, double SOG)
Setting up Message "COG SOG rapid update" - PGN 129026.
Definition: N2kMessages.h:2985
void SetN2kMagneticVariation(tN2kMsg &N2kMsg, unsigned char SID, tN2kMagneticVariation Source, uint16_t DaysSince1970, double Variation)
Setting up Message "Magnetic Variation" - PGN 127258.
Definition: N2kMessages.h:1024
void SetN2kPGN130313(tN2kMsg &N2kMsg, unsigned char SID, unsigned char HumidityInstance, tN2kHumiditySource HumiditySource, double ActualHumidity, double SetHumidity=N2kDoubleNA)
Setting up PGN 130313 Message "Humidity".
void SetN2kPGN127505(tN2kMsg &N2kMsg, unsigned char Instance, tN2kFluidType FluidType, double Level, double Capacity)
Setting up PGN 127505 Message "Fluid level".
void SetN2kEngineTripParameters(tN2kMsg &N2kMsg, unsigned char EngineInstance, double TripFuelUsed, double FuelRateAverage, double FuelRateEconomy=N2kDoubleNA, double InstantaneousFuelEconomy=N2kDoubleNA)
Setting up Message "Trip Parameters, Engine" - PGN 127497.
Definition: N2kMessages.h:1542
bool AppendN2kPGN130074(tN2kMsg &N2kMsg, uint16_t ID, char *Name, double Latitude, double Longitude)
Append a Waypoint to PGN 130074 Message " Route and WP Service - WP List - WP Name & Position...
void SetN2kPGN128267(tN2kMsg &N2kMsg, unsigned char SID, double DepthBelowTransducer, double Offset, double Range=N2kDoubleNA)
Setting up PGN 128267 Message "Water depth".
void SetN2kPGN130577(tN2kMsg &N2kMsg, tN2kDataMode DataMode, tN2kHeadingReference CogReference, unsigned char SID, double COG, double SOG, double Heading, double SpeedThroughWater, double Set, double Drift)
Setting up PGN 130577 Message "Direction Data".
void SetN2kSwitchbankControl(tN2kMsg &N2kMsg, unsigned char TargetBankInstance, tN2kBinaryStatus BankStatus)
Set up PGN 127502 "Switch Bank Control" message.
Definition: N2kMessages.h:1862
void SetN2kDistanceLog(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, uint32_t Log, uint32_t TripLog)
Setting up Message "Distance log" - PGN 128275.
Definition: N2kMessages.h:2512
void SetN2kAISClassAPosition(tN2kMsg &N2kMsg, uint8_t MessageID, tN2kAISRepeat Repeat, uint32_t UserID, double Latitude, double Longitude, bool Accuracy, bool RAIM, uint8_t Seconds, double COG, double SOG, tN2kAISTransceiverInformation AISTransceiverInformation, double Heading, double ROT, tN2kAISNavStatus NavStatus)
Setting up Message "AIS position reports for Class A" - PGN 129038.
Definition: N2kMessages.h:3267
void SetN2kTemperatureExt(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource, double ActualTemperature, double SetTemperature=N2kDoubleNA)
Setting up Message "Temperature, Extended Range" - PGN 130316.
Definition: N2kMessages.h:5246
void SetN2kPGN129025(tN2kMsg &N2kMsg, double Latitude, double Longitude)
Setting up PGN 129025 Message "Position, Rapid Update".
void SetN2kWindSpeed(tN2kMsg &N2kMsg, unsigned char SID, double WindSpeed, double WindAngle, tN2kWindReference WindReference)
Setting up Message "Wind Data" - PGN 130306.
Definition: N2kMessages.h:4717
void SetN2kGNSSDOPData(tN2kMsg &N2kMsg, unsigned char SID, tN2kGNSSDOPmode DesiredMode, tN2kGNSSDOPmode ActualMode, double HDOP, double VDOP, double TDOP)
Setting up Message "GNSS DOP data - PGN 129539.
Definition: N2kMessages.h:4076
void SetN2kPGN130315(tN2kMsg &N2kMsg, unsigned char SID, unsigned char PressureInstance, tN2kPressureSource PressureSource, double SetPressure)
Setting up PGN 130315 Message "Set Pressure".
void SetN2kAttitude(tN2kMsg &N2kMsg, unsigned char SID, double Yaw, double Pitch, double Roll)
Setting up Message "Attitude" - PGN 127257.
Definition: N2kMessages.h:957
void SetN2kPGN127258(tN2kMsg &N2kMsg, unsigned char SID, tN2kMagneticVariation Source, uint16_t DaysSince1970, double Variation)
Setting up PGN 127258 Message "Magnetic Variation".
void SetN2kPGN130312(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource, double ActualTemperature, double SetTemperature=N2kDoubleNA)
Setting up PGN 130312 Message "Temperature - DEPRECATED".
void SetN2kPGN128000(tN2kMsg &N2kMsg, unsigned char SID, double Leeway)
Setting up PGN 128000 Message "Nautical Leeway Angle".
void SetN2kBinaryStatus(tN2kMsg &N2kMsg, unsigned char DeviceBankInstance, tN2kBinaryStatus BankStatus)
Setting up Message "Universal Binary Status Report" - PGN 127501.
Definition: N2kMessages.h:1655
void SetN2kPGN130074(tN2kMsg &N2kMsg, uint16_t Start, uint16_t NumWaypoints, uint16_t Database)
Setting up PGN 130074 Message " Route and WP Service - WP List - WP Name & Position".
void SetN2kTrueHeading(tN2kMsg &N2kMsg, unsigned char SID, double Heading)
Setting up Message "Vessel Heading" - PGN 127250.
Definition: N2kMessages.h:743
void SetN2kLocalOffset(tN2kMsg &N2kMsg, uint16_t DaysSince1970, double SecondsSinceMidnight, int16_t LocalOffset)
Setting up Message "Date,Time & Local offset" - PGN 129033.
Definition: N2kMessages.h:3173
void SetN2kSystemTime(tN2kMsg &N2kMsg, unsigned char SID, uint16_t SystemDate, double SystemTime, tN2kTimeSource TimeSource=N2ktimes_GPS)
Setting up Message "System date/time" - PGN 126992.
Definition: N2kMessages.h:208
tN2kDistanceCalculationType
Enumeration of distance calculation types for navigation according to PGN129284.
Definition: N2kTypes.h:83
tN2kDD481
DD481 - Rode Type States according to PGN 128777.
tN2kDD483 tN2kWindlassOperatingEvents
Alias easier for humans to read for tN2kDD483.
Definition: N2kTypes.h:742
tN2kChargerMode
Enumeration of charger modes according to PGN 127507.
Definition: N2kTypes.h:518
tN2kHeadingReference
Enumeration of the heading type according to PGN129233, PGN129237 , PGN129250, PGN129026 and PGN12928...
Definition: N2kTypes.h:62
tN2kAISMode
Enumeration of AIS mode type according to PGN 129039.
Definition: N2kTypes.h:451
tN2kAISDTE
Enumeration of Data Terminal Equipment according to PNG 129794.
Definition: N2kTypes.h:416
tN2kBatNomVolt
Enumeration of nominal battery voltage according to PGN 127513.
Definition: N2kTypes.h:345
tN2kNavigationDirection
Enumeration of the navigation direction according to PGN129285.
Definition: N2kTypes.h:47
tN2kTimeSource
Enumeration of sources for the system time according to PGN126992.
Definition: N2kTypes.h:222
tN2kChargeState
Enumeration of state of the battery charger operation according to PGN127507.
Definition: N2kTypes.h:500
tN2kMagneticVariation
Enumeration of magnetic variation according to PGN 127258.
Definition: N2kTypes.h:473
tN2kDD477 tN2kWindlassMonitoringEvents
Alias easier for humans to read for tN2kDD477.
Definition: N2kTypes.h:706
tN2kRudderDirectionOrder
Enumeration of Rudder Direction Order according to PGN127237, 127245.
Definition: N2kTypes.h:279
tN2kDD482
DD482 - Anchor Docking States according to PGN 128777.
tN2kDD124
DD124 - PRN Usage Status.
tN2kDD305
Enumeration of Aid to Navigation (AtoN) Type according to PGN129041.
tN2kMOBPositionSource
Enumeration of ManOverBoard position source according to PGN127233.
Definition: N2kTypes.h:564
tN2kGNSSmethod
Enumeration of GNSS working methods according to PGN129029.
Definition: N2kTypes.h:126
tN2kTransmissionGear
Enumeration of transmission state according to PGN 127493.
Definition: N2kTypes.h:358
tN2kDCType
Enumeration of DC power sources according to PGN 127506.
Definition: N2kTypes.h:292
tN2kDD072
DD072 - Range Residual Mode.
tN2kDD025
DD025 - Mode, Data.
tN2kMOBEmitterBatteryStatus
Enumeration of MOB emitter battery status according to PGN127233.
Definition: N2kTypes.h:572
tN2kTurnMode
Enumeration of tunr control modes according to PGN127237.
Definition: N2kTypes.h:544
tN2kOnOff
Enumeration of On/Off status at a NMEA 2000 network.
Definition: N2kTypes.h:488
tN2kWindReference
Enumeration of wind reference types according to PGN130306.
Definition: N2kTypes.h:252
tN2kSteeringMode
Enumeration of the steering mode according to PGN127237.
Definition: N2kTypes.h:530
tN2kAISUnit
Enumeration of AIS unit (transmission) type according to PGN 129039.
Definition: N2kTypes.h:424
tN2kDD374
Measurement delay source.
tN2kTempSource
Enumeration of sources for a temperature value according to PGN130311, PGN130312 and PGN130316.
Definition: N2kTypes.h:171
tN2kMOBStatus
Enumeration of ManOverBoard state according to PGN127233.
Definition: N2kTypes.h:554
tN2kGNSSDOPmode
Enumeration of GNSS DOP Mode according to PGN129539.
Definition: N2kTypes.h:156
tN2kDD002
DD002 - Generic Status Pair.
tN2kBatChem
Enumeration of battery chemistries according to PGN 127513.
Definition: N2kTypes.h:332
tN2kBatType
Enumeration of Battery types according to PGN 127513.
Definition: N2kTypes.h:306
tN2kGNSStype
Enumeration of the GPS system which is in use according to PGN129029, PGN129041 and PGN129794.
Definition: N2kTypes.h:108
tN2kAISNavStatus
Enumeration of navigational status of an ship sending out an AIS signal according to PGN 129038.
Definition: N2kTypes.h:398
tN2kSpeedWaterReferenceType
Enumeration of speed thru water sensors types according to PGN128259.
Definition: N2kTypes.h:266
tN2kDD478 tN2kWindlassControlEvents
Alias easier for humans to read for tN2kDD478.
Definition: N2kTypes.h:713
tN2kDD488
DD488 - Speed Control Type according to PGN 128776.
tN2kBatEqSupport
Enumeration of Supports Equalization according to PGN 127513.
Definition: N2kTypes.h:318
tN2kHumiditySource
Enumeration of sources for a humidity value according to PGN130311 and PGN130313.
Definition: N2kTypes.h:194
tN2kDD480
DD480 - Windlass Motion States according to PGN 128777.
tN2kAISTransceiverInformation
Enumeration of 129039, 129041, 129802.
Definition: N2kTypes.h:459
tN2kAISRepeat
Enumeration of AIS repeat indicator according to PGN129802, PGN129809, PGN129810, PGN129038,...
Definition: N2kTypes.h:368
tN2kPressureSource
Enumeration of sources for a pressure value according to PGN130314 and PGN130315.
Definition: N2kTypes.h:204
tN2kFluidType
Enumeration of fluid types according to PGN127505.
Definition: N2kTypes.h:234
tN2kDD484
DD484 - Windlass Direction Control according to PGN 128776.
tN2kXTEMode
Enumeration of Cross Track Error modes according to PGN129283.
Definition: N2kTypes.h:95
tN2kAISVersion
Enumeration of AIS version which is used in PGN 129794.
Definition: N2kTypes.h:388
Dedicated structure to handle AIS Aids to Navigation (AtoN) Report.
Definition: N2kMessages.h:3577
tN2kGNSStype GNSSType
Type of electronic position fixing device See tN2kGNSStype.
Definition: N2kMessages.h:3656
bool OffPositionIndicator
Off Position Indicator For floating AtoN, only.
Definition: N2kMessages.h:3636
double Length
AtoN Structure Length/Diameter in meters.
Definition: N2kMessages.h:3615
double PositionReferenceStarboard
Position Reference Point from Starboard Structure Edge/Radius.
Definition: N2kMessages.h:3619
double Beam
AtoN Structure Beam/Diameter in meters.
Definition: N2kMessages.h:3617
double PositionReferenceTrueNorth
Position Reference Point from True North facing Structure Edge/Radius.
Definition: N2kMessages.h:3622
char AtoNName[34+1]
Name of AtoN Object.
Definition: N2kMessages.h:3682
tN2kAISAtoNType AtoNType
Aid to Navigation (AtoN) Type, see tN2kAISAtoNType.
Definition: N2kMessages.h:3624
double Latitude
latitude of position [degree]
Definition: N2kMessages.h:3587
bool VirtualAtoNFlag
Virtual AtoN flag.
Definition: N2kMessages.h:3643
uint8_t AtoNStatus
AtoN Status byte Reserved for the indication of the AtoN status 00000000 = default.
Definition: N2kMessages.h:3662
uint32_t UserID
MMSI number.
Definition: N2kMessages.h:3583
bool AssignedModeFlag
Assigned Mode Flag.
Definition: N2kMessages.h:3650
uint8_t Seconds
TimeStamp UTC second when the report was generated.
Definition: N2kMessages.h:3613
bool RAIM
Receiver autonomous integrity monitoring (RAIM) flag of electronic position fixing device.
Definition: N2kMessages.h:3601
tN2kAISRepeat Repeat
Repeat indicator, Used by the repeater to indicate how many times a message has been repeated....
Definition: N2kMessages.h:3581
tN2kAISAtoNReportData()
Construct a new t N2k AIS AtoN Report Data object.
Definition: N2kMessages.h:3689
tN2kAISTransceiverInformation AISTransceiverInformation
AIS Transceiver Information see tN2kAISTransceiverInformation.
Definition: N2kMessages.h:3667
void SetAtoNName(const char *name)
Set the AtoN Name.
Definition: N2kMessages.h:3717
double Longitude
longitude of position [degree]
Definition: N2kMessages.h:3585
uint8_t MessageID
Message Type ID according to e ITU-R M.1371.
Definition: N2kMessages.h:3579
bool Accuracy
position accuracy
Definition: N2kMessages.h:3594
Dedicated structure to handle Data of a meterological station.
Definition: N2kMessages.h:5301
double AtmosphericPressure
Atmospheric pressure in Pascals. Use mBarToPascal, if you like to use mBar.
Definition: N2kMessages.h:5323
double WindDirection
Measured wind direction in radians. If you have value in degrees, use DegToRad() in call.
Definition: N2kMessages.h:5316
double OutsideAmbientAirTemperature
Outside ambient temperature in K. Use CToKelvin, if you want to use °C.
Definition: N2kMessages.h:5326
double WindSpeed
Measured wind speed in m/s.
Definition: N2kMessages.h:5313
double Longitude
The longitude of the current waypoint [degree].
Definition: N2kMessages.h:5311
char StationID[15+1]
Identifier of the transmitting weather station. (15 bytes max)
Definition: N2kMessages.h:5329
double WindGusts
Measured wind gusts speed in m/s.
Definition: N2kMessages.h:5320
void SetStationID(const char *id)
Set the StationID object.
Definition: N2kMessages.h:5356
double Latitude
The latitude of the current waypoint [degree].
Definition: N2kMessages.h:5309
void SetStationName(const char *name)
Set the Station Name object.
Definition: N2kMessages.h:5367
char StationName[50+1]
Friendly name of the transmitting weather station. ( 50 bytes max)
Definition: N2kMessages.h:5332
tN2kWindReference WindReference
Wind reference, see definition tN2kWindReference.
Definition: N2kMessages.h:5318
double SystemTime
seconds since midnight
Definition: N2kMessages.h:5307
uint16_t SystemDate
Days since 1970-01-01.
Definition: N2kMessages.h:5305
Dedicated structure to handle GNSS satellite information.
Definition: N2kMessages.h:4130
double Azimuth
Azimuth of the satellite.
Definition: N2kMessages.h:4133
tN2kPRNUsageStatus UsageStatus
Usage Status, see tN2kPRNUsageStatus.
Definition: N2kMessages.h:4136
double RangeResiduals
Range Residual.
Definition: N2kMessages.h:4135
unsigned char PRN
PRN number [ 01 .. 32] of the satellite.
Definition: N2kMessages.h:4131
double SNR
SignalToNoiseRatio of the satellite.
Definition: N2kMessages.h:4134
double Elevation
Elevation of the satellite.
Definition: N2kMessages.h:4132
DD206 - Engine Discrete Warning Status.
uint16_t EngineEmergencyStopMode
engine emergency stop mode status bit
uint16_t PreheatIndicator
pre heat indicator status bit
uint16_t WaterInFuel
water in fuel status bit
uint16_t LowOilPressure
low oil pressure status bit
uint16_t LowFuelPressure
low fuel pressure status bit
uint16_t RevLimitExceeded
rev limit exceeded status bit
uint16_t LowSystemVoltage
low system voltage status bit
uint16_t HighBoostPressure
high boost pressure status bit
uint16_t WaterFlow
water flow status bit
struct tN2kDD206::@2 Bits
uint16_t CheckEngine
check engine status bit
uint16_t LowOilLevel
low oil level status bit
uint16_t EGRSystem
egr system status bit
uint16_t LowCoolantLevel
low coolant status bit
uint16_t ThrottlePositionSensor
throttle position sensor status bit
uint16_t OverTemperature
over temperature status bit
uint16_t ChargeIndicator
charge indicator status bit
DD223 - Engine Discrete Warning Status.
uint16_t EngineShuttingDown
engine shuting down status bit
uint16_t EngineCommError
engine communication error status bit
uint16_t SubOrSecondaryThrottle
sub or secondary throttle is used status bit
struct tN2kDD223::@3 Bits
uint16_t LowOiPowerReduction
engine power reduction due to low oil pressure status bit
uint16_t WarningLevel2
engine warning level 2 status bit
uint16_t WarningLevel1
engine warning level 1 status bit
uint16_t MaintenanceNeeded
engine maintenance needed status bit
uint16_t NeutralStartProtect
neutral start protection status bit
DD477 - Windlass Monitoring Events according to PGN 128778.
DD478 - Windlass Control Events according to PGN 128776.
DD483 - Windlass Operating Events according to PGN 128777.