Skip to content

CustomSentence

struct nmeasim::core::simulation::CustomSentence ยท Library API

One operator-defined sentence and its schedule.

#include <nmeasim/core/simulation/custom_sentence.hpp>

Declared in src/core/include/nmeasim/core/simulation/custom_sentence.hpp (line 29)

The values are taken as typed; SentenceScheduler::set_custom_sentences fills in an empty id, replaces a non-positive period and drops the sentence when its body cannot be framed or its id clashes with a registry id or with the id of an earlier custom sentence.

Summary

Public data members

Name Description
id Identifier used by the output filters and the console, and as EmittedSentence::id.
body The sentence body as typed: an optional $ or !, the address, then the fields.
period Interval between emissions in simulated time; the scheduler replaces zero or a negative value by one second.
enabled Whether the sentence is sent; a disabled sentence is kept in the list but not sent.

Public data members

id

std::string id

Identifier used by the output filters and the console, and as EmittedSentence::id.

Must not equal a registry id such as RMC, nor the id of another sentence of the same list, or the scheduler drops the sentence. An empty id is replaced by CUSTOM-n, where n is the 1-based position of the sentence in the list given to the scheduler (see effective_custom_id); an explicit id such as CUSTOM-2 counts as taken by the sentence it names as well.

Declared in src/core/include/nmeasim/core/simulation/custom_sentence.hpp:37

body

std::string body

The sentence body as typed: an optional $ or !, the address, then the fields.

A trailing *hh checksum, surrounding white space and a line terminator are allowed and ignored, because the checksum is always recomputed. Examples: $PXYZ,1,2,3, PXYZ,1,2,3 and $PXYZ,1,2,3*00. validate_custom_sentence lists what is refused.

Declared in src/core/include/nmeasim/core/simulation/custom_sentence.hpp:43

period

std::chrono::milliseconds period{1000}

Interval between emissions in simulated time; the scheduler replaces zero or a negative value by one second.

Declared in src/core/include/nmeasim/core/simulation/custom_sentence.hpp:46

enabled

bool enabled{true}

Whether the sentence is sent; a disabled sentence is kept in the list but not sent.

Declared in src/core/include/nmeasim/core/simulation/custom_sentence.hpp:48