NMEA2000 Library  0.1
Library to handle NMEA 2000 Communication written in C++
N2kMaretron.cpp File Reference
#include "N2kTypes.h"
#include "N2kMaretron.h"
#include <string.h>
Include dependency graph for N2kMaretron.cpp:

Go to the source code of this file.

Macros

#define MaretronProprietary   0x9889
 

Functions

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". More...
 
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". More...
 
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". More...
 
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". More...
 
void SetN2kMaretronPGN65286 (tN2kMsg &N2kMsg, unsigned char SID, unsigned char FlowRateInstance, tN2kFluidType FluidType, double FluidFlowRate)
 Setting up PGN 65286 for Maretron Message "Fluid Flow Rate". More...
 
void SetN2kMaretronPGN65287 (tN2kMsg &N2kMsg, unsigned char SID, unsigned char VolumeInstance, tN2kFluidType FluidType, double TripVolume)
 Setting up PGN 65287 for Maretron Message "Trip Volume". More...
 

Macro Definition Documentation

◆ MaretronProprietary

#define MaretronProprietary   0x9889

Definition at line 32 of file N2kMaretron.cpp.

Function Documentation

◆ ParseN2kMaretronPGN130823()

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".

This Temperature High Range Message is used e.g. by MARETRON TMP100. The wide range is required for very high temperature values (e.g. Exhaust Gas Temperatures). see [Maretron TMP100] (https://www.maretron.com/products/tmp100.php)

Note
Temperatures should be in Kelvin
Parameters
N2kMsgReference to a N2kMsg Object, Output: NMEA2000 message ready to be send.
SIDSequence ID. Normally you can just forget its value. See SID.
TempInstanceThis should be unique at least on one device. May be best to have it unique over all devices sending this PGN.
TempSourceSource of the temperature, see tN2kTempSource
ActualTemperatureTemperature in K. Use function CToKelvin, if you want to use °C.
SetTemperatureSet temperature in K. Use function CToKelvin, if you want to use °C. This is meaningful for temperatures which can be controlled like cabin, freezer, refrigeration temperature.
Returns
true Parsing of PGN Message successful
false Parsing of PGN Message aborted

Definition at line 50 of file N2kMaretron.cpp.

◆ ParseN2kMaretronPGN65286()

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".

This Fluid Flow Rate Message is used e.g. by MARETRON FFM100. With this fuel flow rate it is possible to monitor Diesel Fuel , Gasoline/Petrol Fuel Flow and Cooling Water Flow.

see [Maretron FFM100] (https://www.maretron.com/products/ffm100.php)

Note
Flow Rate should be in lt/hour
Parameters
N2kMsgReference to a N2kMsg Object, Output: NMEA2000 message ready to be send.
SIDSequence ID. Normally you can just forget its value. See SID.
FlowRateInstanceThis should be unique at least on one device. May be best to have it unique over all devices sending this PGN.
FluidTypeType of Fluid, see tN2kFluidType [possible values for this field include Fuel, Fresh Water, Waste Water, Live Well, Oil, and Black Water]
FluidFlowRateThis field is used to indicate the rate of fluid flow in units litres/hour.
Returns
true Parsing of PGN Message successful
false Parsing of PGN Message aborted

Definition at line 77 of file N2kMaretron.cpp.

◆ ParseN2kMaretronPGN65287()

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".

This Trip Volume Message is used e.g. by MARETRON FFM100. With this Trip Volume it is possible to monitor Diesel Fuel , Gasoline/Petrol Fuel Flow and Cooling Water Flow.

see [Maretron FFM100] (https://www.maretron.com/products/ffm100.php)

Note
Volume should be in litres
Parameters
N2kMsgReference to a N2kMsg Object, Output: NMEA2000 message ready to be send.
SIDSequence ID. Normally you can just forget its value. See SID.
VolumeInstanceThis should be unique at least on one device. May be best to have it unique over all devices sending this PGN.
FluidTypeType of Fluid, see tN2kFluidType [possible values for this field include Fuel, Fresh Water, Waste Water, Live Well, Oil, and Black Water]
TripVolumeThis field is used to indicate the trip volume units of litres.
Returns
true Parsing of PGN Message successful
false Parsing of PGN Message aborted

Definition at line 103 of file N2kMaretron.cpp.

◆ SetN2kMaretronPGN130823()

void SetN2kMaretronPGN130823 ( tN2kMsg N2kMsg,
unsigned char  SID,
unsigned char  TempInstance,
tN2kTempSource  TempSource,
double  ActualTemperature,
double  SetTemperature = N2kDoubleNA 
)

Setting up PGN 130823 for Maretron Message "Temperature High Range".

This Temperature High Range Message is used e.g. by MARETRON TMP100. The wide range is required for very high temperature values (e.g. Exhaust Gas Temperatures). see [Maretron TMP100] (https://www.maretron.com/products/tmp100.php)

Note
Temperatures should be in Kelvin
Parameters
N2kMsgReference to a N2kMsg Object, Output: NMEA2000 message ready to be send.
SIDSequence identifier. In most cases you can use just 0xff for SID. See SID.

The sequence identifier field is used to tie different PGNs data together to same sampling or calculation time.
TempInstanceThis should be unique at least on one device. May be best to have it unique over all devices sending this PGN.
TempSourceSource of the temperature, see tN2kTempSource
ActualTemperatureTemperature in K. Use function CToKelvin, if you want to use °C.
SetTemperatureSet temperature in K. Use function CToKelvin, if you want to use °C. This is meaningful for temperatures which can be controlled like cabin, freezer, refrigeration temperature.

Definition at line 38 of file N2kMaretron.cpp.

◆ SetN2kMaretronPGN65286()

void SetN2kMaretronPGN65286 ( tN2kMsg N2kMsg,
unsigned char  SID,
unsigned char  FlowRateInstance,
tN2kFluidType  FluidType,
double  FluidFlowRate 
)

Setting up PGN 65286 for Maretron Message "Fluid Flow Rate".

This Fluid Flow Rate Message is used e.g. by MARETRON FFM100. With this fuel flow rate it is possible to monitor Diesel Fuel , Gasoline/Petrol Fuel Flow and Cooling Water Flow.

see [Maretron FFM100] (https://www.maretron.com/products/ffm100.php)

Note
Flow Rate should be in lt/hour
Parameters
N2kMsgReference to a N2kMsg Object, Output: NMEA2000 message ready to be send.
SIDSequence identifier. In most cases you can use just 0xff for SID. See SID.

The sequence identifier field is used to tie different PGNs data together to same sampling or calculation time.
FlowRateInstanceThis should be unique at least on one device. May be best to have it unique over all devices sending this PGN.
FluidTypeType of Fluid, see tN2kFluidType [possible values for this field include Fuel, Fresh Water, Waste Water, Live Well, Oil, and Black Water]
FluidFlowRateThis field is used to indicate the rate of fluid flow in units litres/hour.

Definition at line 66 of file N2kMaretron.cpp.

◆ SetN2kMaretronPGN65287()

void SetN2kMaretronPGN65287 ( tN2kMsg N2kMsg,
unsigned char  SID,
unsigned char  VolumeInstance,
tN2kFluidType  FluidType,
double  TripVolume 
)

Setting up PGN 65287 for Maretron Message "Trip Volume".

This Trip Volume Message is used e.g. by MARETRON FFM100. With this Trip Volume it is possible to monitor Diesel Fuel , Gasoline/Petrol Fuel Flow and Cooling Water Flow.

see [Maretron FFM100] (https://www.maretron.com/products/ffm100.php)

Note
Volume should be in litres
Parameters
N2kMsgReference to a N2kMsg Object, Output: NMEA2000 message ready to be send.
SIDSequence identifier. In most cases you can use just 0xff for SID. See SID.

The sequence identifier field is used to tie different PGNs data together to same sampling or calculation time.
VolumeInstanceThis should be unique at least on one device. May be best to have it unique over all devices sending this PGN.
FluidTypeType of Fluid, see tN2kFluidType [possible values for this field include Fuel, Fresh Water, Waste Water, Live Well, Oil, and Black Water]
TripVolumeThis field is used to indicate the trip volume units of litres.

Definition at line 92 of file N2kMaretron.cpp.