32#define MaretronProprietary 0x9889
39 double ActualTemperature,
double SetTemperature) {
44 N2kMsg.
AddByte((
unsigned char)TempInstance);
45 N2kMsg.
AddByte((
unsigned char)TempSource);
51 double &ActualTemperature,
double &SetTemperature) {
52 if (N2kMsg.
PGN!=130823L)
return false;
56 TempInstance=N2kMsg.
GetByte(Index);
67 double FluidFlowRate) {
72 N2kMsg.
AddByte((
unsigned char)FlowRateInstance);
73 N2kMsg.
AddByte((
unsigned char)FluidType);
78 double &FluidFlowRate) {
79 if (N2kMsg.
PGN!=65286L)
return false;
83 FlowRateInstance=N2kMsg.
GetByte(Index);
98 N2kMsg.
AddByte((
unsigned char)VolumeInstance);
99 N2kMsg.
AddByte((
unsigned char)FluidType);
104 double &TripVolume) {
105 if (N2kMsg.
PGN!=65287L)
return false;
109 VolumeInstance=N2kMsg.
GetByte(Index);
void SetN2kMaretronPGN130823(tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource, double ActualTemperature, double SetTemperature)
Setting up PGN 130823 for Maretron Message "Temperature High Range".
bool ParseN2kMaretronPGN130823(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource, double &ActualTemperature, double &SetTemperature)
Parsing the content of Maretron Message PGN 130823 "Temperature High Range".
void SetN2kMaretronPGN65286(tN2kMsg &N2kMsg, unsigned char SID, unsigned char FlowRateInstance, tN2kFluidType FluidType, double FluidFlowRate)
Setting up PGN 65286 for Maretron Message "Fluid Flow Rate".
void SetN2kMaretronPGN65287(tN2kMsg &N2kMsg, unsigned char SID, unsigned char VolumeInstance, tN2kFluidType FluidType, double TripVolume)
Setting up PGN 65287 for Maretron Message "Trip Volume".
#define MaretronProprietary
bool ParseN2kMaretronPGN65287(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &VolumeInstance, tN2kFluidType &FluidType, double &TripVolume)
Parsing the content of Maretron Message PGN 65287 "Trip Volume".
bool ParseN2kMaretronPGN65286(const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &FlowRateInstance, tN2kFluidType &FluidType, double &FluidFlowRate)
Parsing the content of Maretron Message PGN 65286 "Fluid Flow Rate".
Collection of functions for handling NMEA2000 bus Maretron messages.
This File contains all specific Enumerations to make NMEA2000 Messages easier for humans to read.
This class contains all the data of an NMEA2000 message.
void Add2ByteUDouble(double v, double precision, double UndefVal=N2kDoubleNA)
Add double value to the buffer using 2 bytes.
void Add2ByteUInt(uint16_t v)
Add unsigned integer value to the buffer using 2 bytes The value will be added to the end (indicated ...
double Get3ByteDouble(double precision, int &Index, double def=N2kDoubleNA) const
Get a double from 3 bytes out of Data The fixed point integer mechanism is used.
void Add3ByteDouble(double v, double precision, double UndefVal=N2kDoubleNA)
Add double value to the buffer using 3 bytes.
void AddByte(unsigned char v)
Add byte value to the buffer The byte will be added to the end (indicated by DataLen) of the byte arr...
uint16_t Get2ByteUInt(int &Index, uint16_t def=0xffff) const
Get an unsigned integer from 2 bytes out of Data.
double Get2ByteUDouble(double precision, int &Index, double def=N2kDoubleNA) const
Get a double from 2 bytes out of Data The fixed point integer mechanism is used.
unsigned char Priority
Priority of the NMEA2000 message.
void SetPGN(unsigned long _PGN)
Set the Parameter Group Number of the message *.
unsigned char GetByte(int &Index) const
Get the value from a byte out of Data.
unsigned long PGN
Parameter Group Number (PGN) of the NMEA2000 message.
tN2kTempSource
Enumeration of sources for a temperature value according to PGN130311, PGN130312 and PGN130316.
tN2kFluidType
Enumeration of fluid types according to PGN127505.