Introduced ec_eoe_request_valid().

This commit is contained in:
Florian Pose
2024-05-14 17:36:49 +02:00
parent 4a1ac80fda
commit 0fb163ea5b
2 changed files with 19 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* Copyright (C) 2006-2014 Florian Pose, Ingenieurgemeinschaft IgH
* Copyright (C) 2006-2024 Florian Pose, Ingenieurgemeinschaft IgH
*
* This file is part of the IgH EtherCAT Master.
*
@@ -61,3 +61,20 @@ void ec_eoe_request_init(
}
/****************************************************************************/
/** Checks if EoE request has something to set.
*/
int ec_eoe_request_valid(
const ec_eoe_request_t *req /**< EoE request. */
)
{
return
req->mac_address_included ||
req->ip_address_included ||
req->subnet_mask_included ||
req->gateway_included ||
req->dns_included ||
req->name_included;
}
/****************************************************************************/

View File

@@ -63,6 +63,7 @@ typedef struct {
/****************************************************************************/
void ec_eoe_request_init(ec_eoe_request_t *);
int ec_eoe_request_valid(const ec_eoe_request_t *);
/****************************************************************************/