27 if (this->
co_ ==
nullptr || this->
co_->NMT ==
nullptr || this->is_failed() || node_id > 127) {
28 ESP_LOGW(TAG,
"NMT command %u to node 0x%02x rejected", (
unsigned) command, node_id);
31 ESP_LOGD(TAG,
"NMT command %u to node 0x%02x", (
unsigned) command, node_id);
32 CO_NMT_t *nmt = this->
co_->NMT;
33 const bool for_us = node_id == 0 || node_id == this->
node_id_;
37 if (nmt->NMT_TXbuff->bufferFull || (for_us && this->nmt_command_pending_())) {
38 ESP_LOGW(TAG,
"NMT command %u to node 0x%02x rejected: the previous command is still pending", (
unsigned) command,
43 CO_ReturnError_t err = CO_NMT_sendCommand(nmt,
static_cast<CO_NMT_command_t
>(command), node_id);
45 if (err != CO_ERROR_NO) {
46 ESP_LOGW(TAG,
"NMT command %u to node 0x%02x failed: %d", (
unsigned) command, node_id, err);