NMEA2000 Library  0.1
Library to handle NMEA 2000 Communication written in C++
N2kMaretron.h File Reference

Collection of functions for handling NMEA2000 bus Maretron messages. More...

#include "N2kMsg.h"
#include "N2kTypes.h"
#include <stdint.h>
Include dependency graph for N2kMaretron.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool ParseN2kMaretronFluidFR (const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &FlowRateInstance, tN2kFluidType &FluidType, double &FluidFlowRate)
 Parsing the content of Maretron Message "Fluid Flow Rate" - PGN 65286. More...
 
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...
 
bool ParseN2kMaretronTempHR (const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &TempInstance, tN2kTempSource &TempSource, double &ActualTemperature, double &SetTemperature)
 Parsing the content of Maretron Message "Temperature High Range" - PGN 130823. More...
 
bool ParseN2kMaretronTripVolume (const tN2kMsg &N2kMsg, unsigned char &SID, unsigned char &VolumeInstance, tN2kFluidType &FluidType, double &TripVolume)
 Parsing the content of Maretron Message "Trip Volume" - PGN 65287. More...
 
void SetN2kMaretronFluidFR (tN2kMsg &N2kMsg, unsigned char SID, unsigned char FlowRateInstance, tN2kFluidType FluidType, double FluidFlowRate)
 Setting up Maretron Message "Fluid Flow Rate" - PGN 65286. More...
 
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". 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...
 
void SetN2kMaretronTempHR (tN2kMsg &N2kMsg, unsigned char SID, unsigned char TempInstance, tN2kTempSource TempSource, double ActualTemperature, double SetTemperature=N2kDoubleNA)
 Setting up Maretron Message "Temperature High Range" - PGN 130823. More...
 
void SetN2kMaretronTripVolume (tN2kMsg &N2kMsg, unsigned char SID, unsigned char VolumeInstance, tN2kFluidType FluidType, double TripVolume)
 Setting up Maretron Message "Trip Volume" - PGN 65287. More...
 

Detailed Description

Collection of functions for handling NMEA2000 bus Maretron messages.

This is collection of functions for handling NMEA2000 bus Maretron messages. Library contains functions to e.g. create message named with PGN like SetN2kPGN130823 and inline alias for them like SetN2kLatLonRapid. Each Setxxx funtion sets related message PGN and its default priority. So if you want to change priority on function, you have to do it after Setxxx call.

If you do not send any Maretron messages to NMEA2000 bus, you do not need this library.

Note
These are proprietary Message Numbers created and used by Maretron! see [Maretron Website] (https://www.maretron.com/)
Authors
Vassilis Bourdakis, Timo Lappalainen

Definition in file N2kMaretron.h.

Function Documentation

◆ ParseN2kMaretronFluidFR()

bool ParseN2kMaretronFluidFR ( const tN2kMsg N2kMsg,
unsigned char &  SID,
unsigned char &  FlowRateInstance,
tN2kFluidType FluidType,
double &  FluidFlowRate 
)
inline

Parsing the content of Maretron Message "Fluid Flow Rate" - PGN 65286.

Alias of PGN 65286. This alias was introduced to improve the readability of the source code. See parameter details on ParseN2kMaretronPGN65286

Definition at line 218 of file N2kMaretron.h.

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

◆ ParseN2kMaretronTempHR()

bool ParseN2kMaretronTempHR ( const tN2kMsg N2kMsg,
unsigned char &  SID,
unsigned char &  TempInstance,
tN2kTempSource TempSource,
double &  ActualTemperature,
double &  SetTemperature 
)
inline

Parsing the content of Maretron Message "Temperature High Range" - PGN 130823.

Alias of PGN 130823. This alias was introduced to improve the readability of the source code. See parameter details on ParseN2kMaretronPGN130823

Definition at line 134 of file N2kMaretron.h.

◆ ParseN2kMaretronTripVolume()

bool ParseN2kMaretronTripVolume ( const tN2kMsg N2kMsg,
unsigned char &  SID,
unsigned char &  VolumeInstance,
tN2kFluidType FluidType,
double &  TripVolume 
)
inline

Parsing the content of Maretron Message "Trip Volume" - PGN 65287.

Alias of PGN 65287. This alias was introduced to improve the readability of the source code. See parameter details on ParseN2kMaretronPGN65287

Definition at line 300 of file N2kMaretron.h.

◆ SetN2kMaretronFluidFR()

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

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

Alias of PGN 65286. This alias was introduced to improve the readability of the source code. See parameter details on SetN2kMaretronPGN65286

Definition at line 176 of file N2kMaretron.h.

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

◆ SetN2kMaretronTempHR()

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

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

Alias of PGN 130823. This alias was introduced to improve the readability of the source code. See parameter details on SetN2kMaretronPGN130823

Definition at line 89 of file N2kMaretron.h.

◆ SetN2kMaretronTripVolume()

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

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

Alias of PGN 65287. This alias was introduced to improve the readability of the source code. See parameter details on SetN2kMaretronPGN65287

Definition at line 259 of file N2kMaretron.h.