Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct multiple spelling errors in comments #385

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/N2kDeviceList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void tN2kDeviceList::HandleOther(const tN2kMsg &N2kMsg) {
}
}
if ( HasPendingRequests ) return;
// We come up to here, if have requested all product infromation
// We come up to here, if have requested all product information
// Start to request configuration information for devices.
for ( int i=0; i<MaxDevices; i++) {
if ( Sources[i]!=0 ) {
Expand Down Expand Up @@ -234,7 +234,7 @@ void tN2kDeviceList::HandleOther(const tN2kMsg &N2kMsg) {
//*****************************************************************************
void tN2kDeviceList::AddDevice(uint8_t Source){
if ( RequestIsoAddressClaim(Source) ) { // Request device information
SaveDevice(new tInternalDevice(0),Source); // We have now device on this source, so we will not do continuos query.
SaveDevice(new tInternalDevice(0),Source); // We have now device on this source, so we will not do continuous query.
HasPendingRequests=true;
}
}
Expand Down
26 changes: 13 additions & 13 deletions src/N2kDeviceList.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ class tN2kDeviceList : public tNMEA2000::tMsgHandler {
*/
class tInternalDevice : public tNMEA2000::tDevice {
protected:
/** \brief Product Infomation has bee loaded */
/** \brief Product Information has been loaded */
bool ProdILoaded;
/** \brief Product Information of this device*/
tNMEA2000::tProductInformation ProdI;

/** \brief Product Infomation has bee loaded */
/** \brief Product Information has been loaded */
bool ConfILoaded;
/** \brief Size of the Config Information (number of bytes)*/
uint16_t ConfISize;
Expand Down Expand Up @@ -452,9 +452,9 @@ class tN2kDeviceList : public tNMEA2000::tMsgHandler {

protected:
/********************************************************************//**
* \brief Handle Iso Address Claim Message - PGN 60928
* \brief Handle ISO Address Claim Message - PGN 60928
*
* This function handle an iso address claim message. It check whether
* This function handle an ISO address claim message. It checks whether
* the caller device is already listed at \ref Sources or not.
* If it is already listed, it checks also if the name at this source
* position still matches. When the name doesn't match, it moves the
Expand Down Expand Up @@ -552,42 +552,42 @@ class tN2kDeviceList : public tNMEA2000::tMsgHandler {
/********************************************************************//**
* \brief Request the product information of a specific device on the bus
*
* This function sends out an Iso Request message in order to obtain
* This function sends out an ISO Request message in order to obtain
* more information about a specific device on the bus.
*
* \param Source Destination address of the target device
* \return true -> Message was sended successfully
* \return true -> Message was sent successfully
* \return false
*/
bool RequestProductInformation(uint8_t Source);
/********************************************************************//**
* \brief Request the configuration information of a specific
* device on the bus
*
* This function sends out an Iso Request message in order to obtain
* This function sends out an ISO Request message in order to obtain
* more information about a specific device on the bus.
*
* \param Source Destination address of the target device
* \return true -> Message was sended successfully
* \return true -> Message was sent successfully
* \return false
*/
bool RequestConfigurationInformation(uint8_t Source);
/********************************************************************//**
* \brief Request the supported PGNs of a specific device on the bus
*
* This function sends out an Iso Request message in order to obtain
* This function sends out an ISO Request message in order to obtain
* more information about a specific device on the bus.
*
* \param Source Destination address of the target device
* \return true -> Message was sended successfully
* \return true -> Message was sent successfully
* \return false
*/
bool RequestSupportedPGNList(uint8_t Source);
/********************************************************************//**
* \brief Request the ISO AddressClaim for a specific device on the bus
*
* \param Source Destination address of the target device
* \return true -> Message was sended successfully
* \return true -> Message was sent successfully
* \return false
*/
bool RequestIsoAddressClaim(uint8_t Source);
Expand Down Expand Up @@ -621,7 +621,7 @@ class tN2kDeviceList : public tNMEA2000::tMsgHandler {
* HandleIsoAddressClaim, \ref HandleProductInformation,
* \ref HandleConfigurationInformation, \ref HandleSupportedPGNList,
* \ref HandleOther) is chosen.
* If ther e is now device with this source address is listed in \ref
* If there is now device with this source address is listed in \ref
* Sources, a new device is added ( \ref AddDevice).
*
* \param N2kMsg Reference to a N2kMsg Object,
Expand All @@ -633,7 +633,7 @@ class tN2kDeviceList : public tNMEA2000::tMsgHandler {
* \brief Return device by it's bus source address
*
* Return device by it's bus source address. If there is no device
* with given source, function returns nul
* with given source, function returns null
* \param Source Source address of the device to be searched for
* \return const tNMEA2000::tDevice*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/N2kGroupFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ bool tN2kGroupFunctionHandler::HandleRequest(const tN2kMsg &N2kMsg,
tN2kGroupFunctionPGNErrorCode PGNec=(IsTxPGN?N2kgfPGNec_PGNTemporarilyNotAvailable:N2kgfPGNec_PGNNotSupported);
tN2kGroupFunctionParameterErrorCode PARec=N2kgfpec_Acknowledge;

if ( PGNec==N2kgfPGNec_PGNNotSupported ) TORec=N2kgfTPec_Acknowledge; // Always acknoledge for unknown PGN.
if ( PGNec==N2kgfPGNec_PGNNotSupported ) TORec=N2kgfTPec_Acknowledge; // Always acknowledge for unknown PGN.
if ( PGNec==N2kgfPGNec_PGNTemporarilyNotAvailable ) {
if ( TORec==N2kgfTPec_TransmitIntervalOrPriorityNotSupported ) { // Acknowledge PGN for known PGN but for invalid priority
PGNec=N2kgfPGNec_Acknowledge;
Expand Down
28 changes: 14 additions & 14 deletions src/N2kGroupFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* \file N2kGroupFunction.h
* \brief Base and default group function PGN 126208 message handler class.
*
* Group functions can be used for requesting, commanding and cofiguring other
* Group functions can be used for requesting, commanding and configuring other
* bus devices. Example setting depth sounder offset can be done by command group
* function. This is standard way and other devices should support it. Other common
* examples are changing device or system information, setting installation description,
Expand All @@ -42,7 +42,7 @@
* - Write fields reply group function is for responding write fields group function.
*
* Request group function is mandatory for all certified devices. The default handler can
* only respond "unsupported" to requests other than system PGNs. To fullfill certification
* only respond "unsupported" to requests other than system PGNs. To fulfill certification
* requirement developer should inherit base class, write supported functions and register
* handler class to library with tNMEA2000::AddGroupFunctionHandler(). One can find examples for
* implementation from N2kGroupFunctionDefaultHandlers.h. See e.g., tN2kGroupFunctionHandlerForPGN126998.
Expand Down Expand Up @@ -167,7 +167,7 @@ enum tN2kGroupFunctionCode {
* Message can be satisfied by the receiving device.
*/
enum tN2kGroupFunctionPGNErrorCode {
/** Acknowledge positiv, no error */
/** Acknowledge positive, no error */
N2kgfPGNec_Acknowledge=0,
/** PGN is not supported */
N2kgfPGNec_PGNNotSupported=1,
Expand All @@ -192,7 +192,7 @@ enum tN2kGroupFunctionPGNErrorCode {
* Message can be satisfied by the receiving device.
*/
enum tN2kGroupFunctionTransmissionOrPriorityErrorCode {
/** Acknowledge positiv, no error */
/** Acknowledge positive, no error */
N2kgfTPec_Acknowledge=0,
/** Transmit Interval /Priority not supported */
N2kgfTPec_TransmitIntervalOrPriorityNotSupported=1,
Expand All @@ -214,7 +214,7 @@ enum tN2kGroupFunctionTransmissionOrPriorityErrorCode {
* Message can be satisfied by the receiving device.
*/
enum tN2kGroupFunctionParameterErrorCode {
/** Acknowledge positiv, no error */
/** Acknowledge positive, no error */
N2kgfpec_Acknowledge=0,
/** Invalid request or command parameter field */
N2kgfpec_InvalidRequestOrCommandParameterField=1,
Expand All @@ -239,7 +239,7 @@ class tNMEA2000;
* This class handles all functions which are needed to respond to group
* function messages. NMEA 2000 definition requires that devices should
* respond group function messages. This class is base class and works also as default handler, which
* simply responds “unsupported” for all group functions. To fullfill certification
* simply responds “unsupported” for all group functions. To fulfill certification
* requirement developer should inherit this base class, write supported functions and register
* handler class to library with tNMEA2000::AddGroupFunctionHandler(). One can find examples for
* implementation from N2kGroupFunctionDefaultHandlers.h. See e.g., tN2kGroupFunctionHandlerForPGN126998.
Expand All @@ -249,21 +249,21 @@ class tNMEA2000;
* PGN group function handlers.
*
* NMEA 2000 library calls each registered handler class until some responses to \ref Handle
* call true, meaning that it handled request. After get true return libray stops requesting
* call true, meaning that it handled request. After get true return library stops requesting
* handling for rest registered handler classes.
*
* \note If your device transmits several e.g., 130316, you must handle them with single inherited
* handler. This is because e.g., if some device request 130316 from your device without parameters,
* you can not return true, since then library does not handle others and you can not return false,
* since then at end library responces with default acknowledge group function with "unsupported".
* since then at end library responses with default acknowledge group function with "unsupported".
*/
class tN2kGroupFunctionHandler {
public:
/**********************************************************************//**
* \brief Template class to test does field on group function match to PGN field value
*
* Some group functions contains filter fields which should match to requested/commanded
* PGN field. E.g., you may receive request group funtion globally addressed (255)
* PGN field. E.g., you may receive request group function globally addressed (255)
* with some group of field filters. Before you respond request all fields must
* match to your PGN. See example tN2kGroupFunctionHandlerForPGN126996::HandleRequest().
*
Expand All @@ -286,7 +286,7 @@ class tN2kGroupFunctionHandler {
* \brief Class to test does string field on group function match to PGN field value
*
* Some group functions contains filter fields which should match to requested/commanded
* PGN field. E.g., you may receive request group funtion globally addressed (255)
* PGN field. E.g., you may receive request group function globally addressed (255)
* with some group of field filters. Before you respond request all fields must
* match to your PGN. See example tN2kGroupFunctionHandlerForPGN126996::HandleRequest().
*
Expand Down Expand Up @@ -325,7 +325,7 @@ class tN2kGroupFunctionHandler {
* Function for resolving transmission or priority error code in tN2kGroupFunctionHandler::HandleRequest
* function according requested input and interval/offset limits requested PGN accepts.
* Function resolves only error code. If result is N2kgfTPec_Acknowledge you have to
* handle also possible change for interval/offset elsewhre on your inherited HandleRequest.
* handle also possible change for interval/offset elsewhere on your inherited HandleRequest.
*
* If you support changing for interval and/or offset for your PGN simply use function
* as is. If you need to set offset limits set UseIntervalLimits and/or UseOffsetLimits
Expand All @@ -342,7 +342,7 @@ class tN2kGroupFunctionHandler {
*
* \param TransmissionInterval Interval for Transmission
* \param TransmissionIntervalOffset Offset for Transmission Interval
* \param UseIntervalLimits Use the Intervall limits
* \param UseIntervalLimits Use the Interval limits
* \param IntervalMax Maximum Interval
* \param IntervalMin Minimum Interval
* \param UseOffsetLimits Use Offset limits
Expand Down Expand Up @@ -864,10 +864,10 @@ class tN2kGroupFunctionHandler {
* \brief Send out an acknowledge group function message
*
* Function builds simple acknowledge group function message with given parameters.
* This is usefull for sending response for no parameters or parameters with same
* This is useful for sending response for no parameters or parameters with same
* error code.
*
* \param pNMEA2000 NMEA2000 oject
* \param pNMEA2000 NMEA2000 object
* \param Destination Destination source address
* \param iDev Index off the device in \ref tNMEA2000::Devices
* \param PGN PGN handled
Expand Down
18 changes: 9 additions & 9 deletions src/N2kGroupFunctionDefaultHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ bool tN2kGroupFunctionHandlerForPGN60928::HandleRequest(const tN2kMsg &N2kMsg,

// Start to build response
SetStartAcknowledge(N2kRMsg,N2kMsg.Source,PGN,
N2kgfPGNec_Acknowledge, // Always acknoledge for mandatory PGN
N2kgfPGNec_Acknowledge, // Always acknowledge for mandatory PGN
pec,
NumberOfParameterPairs);
N2kRMsg.Destination=N2kMsg.Source;

if ( NumberOfParameterPairs>0 ) { // We need to filter accroding to fiels
if ( NumberOfParameterPairs>0 ) { // We need to filter according to fields
int i;
int Index;
uint8_t field;
Expand Down Expand Up @@ -110,7 +110,7 @@ bool tN2kGroupFunctionHandlerForPGN60928::HandleRequest(const tN2kMsg &N2kMsg,
}
} else {
// If there is any invalid field, we can not parse others, since we do not
// know right data length. So fo rest of the fields we can only send response below.
// know right data length. So for rest of the fields we can only send response below.
FieldErrorCode=N2kgfpec_TemporarilyUnableToComply;
}
AddAcknowledgeParameter(N2kRMsg,i,FieldErrorCode);
Expand Down Expand Up @@ -198,7 +198,7 @@ bool tN2kGroupFunctionHandlerForPGN126464::HandleRequest(const tN2kMsg &N2kMsg,
NumberOfParameterPairs);
N2kRMsg.Destination=N2kMsg.Source;

if ( NumberOfParameterPairs>0 ) { // We need to filter accroding to fiels
if ( NumberOfParameterPairs>0 ) { // We need to filter according to fields
int i;
int Index;
uint8_t field;
Expand Down Expand Up @@ -282,7 +282,7 @@ bool tN2kGroupFunctionHandlerForPGN126996::HandleRequest(const tN2kMsg &N2kMsg,
NumberOfParameterPairs);
N2kRMsg.Destination=N2kMsg.Source;

if ( NumberOfParameterPairs>0 ) { // We need to filter accroding to fiels
if ( NumberOfParameterPairs>0 ) { // We need to filter according to fields
int i;
int Index;
uint8_t field;
Expand Down Expand Up @@ -337,7 +337,7 @@ bool tN2kGroupFunctionHandlerForPGN126996::HandleRequest(const tN2kMsg &N2kMsg,
}
} else {
// If there is any invalid field, we can not parse others, since we do not
// know right data length. So fo rest of the fields we can only send response below.
// know right data length. So for rest of the fields we can only send response below.
FieldErrorCode=N2kgfpec_TemporarilyUnableToComply;
}
AddAcknowledgeParameter(N2kRMsg,i,FieldErrorCode);
Expand Down Expand Up @@ -385,7 +385,7 @@ bool tN2kGroupFunctionHandlerForPGN126998::HandleRequest(const tN2kMsg &N2kMsg,
NumberOfParameterPairs);
N2kRMsg.Destination=N2kMsg.Source;

if ( NumberOfParameterPairs>0 ) { // We need to filter accroding to fiels
if ( NumberOfParameterPairs>0 ) { // We need to filter according to fields
int i;
int Index;
uint8_t field;
Expand Down Expand Up @@ -426,7 +426,7 @@ bool tN2kGroupFunctionHandlerForPGN126998::HandleRequest(const tN2kMsg &N2kMsg,
}
} else {
// If there is any invalid field, we can not parse others, since we do not
// know right data length. So fo rest of the fields we can only send response below.
// know right data length. So for rest of the fields we can only send response below.
FieldErrorCode=N2kgfpec_TemporarilyUnableToComply;
}
AddAcknowledgeParameter(N2kRMsg,i,FieldErrorCode);
Expand Down Expand Up @@ -512,7 +512,7 @@ bool tN2kGroupFunctionHandlerForPGN126993::HandleRequest(const tN2kMsg &N2kMsg,

if ( NumberOfParameterPairs==0 ) { // According to doc, there should not be any parameter pairs defined
if ( TransmissionInterval==0xffffffff && TransmissionIntervalOffset==0xffff ) {
// Request for 126993 with 0xffffffff and 0xffff is prohibited so use default reponse.
// Request for 126993 with 0xffffffff and 0xffff is prohibited so use default response.
return tN2kGroupFunctionHandler::HandleRequest(N2kMsg,TransmissionInterval,TransmissionIntervalOffset,NumberOfParameterPairs,iDev);
}
if ( pec==N2kgfTPec_Acknowledge ) {
Expand Down
4 changes: 2 additions & 2 deletions src/N2kGroupFunctionDefaultHandlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class tN2kGroupFunctionHandlerForPGN126993 : public tN2kGroupFunctionHandler {
* Provides product information onto the network that could be important
* for determining quality of data coming from this product.
*
* \note This is not mandatory, but prefered
* \note This is not mandatory, but preferred
*/
class tN2kGroupFunctionHandlerForPGN126996 : public tN2kGroupFunctionHandler {
protected:
Expand All @@ -157,7 +157,7 @@ class tN2kGroupFunctionHandlerForPGN126996 : public tN2kGroupFunctionHandler {
* engine room location) of the device and installation notes (e.g.,
* calibration data).
*
* \note This is not mandatory, but prefered
* \note This is not mandatory, but preferred
*/
class tN2kGroupFunctionHandlerForPGN126998 : public tN2kGroupFunctionHandler {
protected:
Expand Down
2 changes: 1 addition & 1 deletion src/N2kMessagesEnumToStr.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const char *N2kEnumTypeEmpty="";
*
* This function template generation an text output to the defined stream.
* Corresponding to the type of the enum value, the correct function (and
* therefor output text) is chosen.
* therefore output text) is chosen.
*
* @tparam T Type of the enum
* @param a enum value
Expand Down
Loading
Loading