12 #include "embot_core_binary.h"
14 #include <yarp/os/Time.h>
31 snprintf(str,
sizeof(str),
" src %s, adr %d,(code 0x%.8x, par16 0x%.4x par64 0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x) -> %s %s %s",
36 p64[7], p64[6], p64[5], p64[4], p64[3], p64[2], p64[1], p64[0],
69 case eoerror_value_CFG_candiscovery_started:
72 eObrd_type_t brdnum =
static_cast<eObrd_type_t
>((
m_dnginfo.
param64 & 0x0000ff0000000000) >> 40);
73 const char *canboardname = eoboards_type2string(brdnum);
75 eObrd_protocolversion_t prot = {0};
76 eObrd_firmwareversion_t appl = {0};
80 prot.major = reqpr >> 8;
81 prot.minor = reqpr & 0xff;
82 appl.major = (reqfw >> 16) & 0xff;
83 appl.minor = (reqfw >> 8) & 0xff;
84 appl.build = reqfw & 0xff;
85 num = eo_common_hlfword_bitsetcount(maskcan1)+eo_common_hlfword_bitsetcount(maskcan2);
87 snprintf(str,
sizeof(str),
" %s %d %s boards on (can1map, can2map) = (0x%.4x, 0x%.4x) with target can protocol ver %d.%d and application ver %d.%d.%d.",
91 prot.major, prot.minor,
92 appl.major, appl.minor, appl.build
97 case eoerror_value_CFG_candiscovery_ok:
100 eObool_t fakesearch = (0x0000 == (
m_dnginfo.
param16 & 0xf000)) ? (eobool_false) : (eobool_true);
102 const char *canboardname = eoboards_type2string(
static_cast<eObrd_type_t
>(brdnum));
104 eObrd_protocolversion_t prot = {0};
105 eObrd_firmwareversion_t appl = {0};
108 char strOK[80] =
"OK";
110 prot.major = reqpr >> 8;
111 prot.minor = reqpr & 0xff;
112 appl.major = (reqfw >> 16) & 0xff;
113 appl.minor = (reqfw >> 8) & 0xff;
114 appl.build = reqfw & 0xff;
117 if(eobool_true == fakesearch)
119 snprintf(strOK,
sizeof(strOK),
"OK but FAKE (without any control on CAN w/ get-fw-version<> message)");
122 snprintf(str,
sizeof(str),
"%s is %s for %d %s boards with target can protocol ver %d.%d and application ver %d.%d.%d. Search time was %d ms",
126 prot.major, prot.minor,
127 appl.major, appl.minor, appl.build,
133 case eoerror_value_CFG_candiscovery_detectedboard:
136 const char *canboardname = eoboards_type2string(
static_cast<eObrd_type_t
>(brdnum));
138 eObrd_protocolversion_t prot = {0};
139 eObrd_firmwareversion_t appl = {0};
143 prot.major = reqpr >> 8;
144 prot.minor = reqpr & 0xff;
145 appl.major = (reqfw >> 16) & 0xff;
146 appl.minor = (reqfw >> 8) & 0xff;
147 appl.build = reqfw & 0xff;
151 snprintf(str,
sizeof(str),
"%s %s board in %s addr %d with can protocol ver %d.%d and application ver %d.%d.%d Search time was %d ms",
155 prot.major, prot.minor,
156 appl.major, appl.minor, appl.build,
162 case eoerror_value_CFG_candiscovery_boardsmissing:
165 const char *canboardname = eoboards_type2string(
static_cast<eObrd_type_t
>((
m_dnginfo.
param16 >> 8)));
172 snprintf(str,
sizeof(str),
"%s %d missing %s boards for %d ms in %s:",
182 if(eobool_true == eo_common_hlfword_bitcheck(maskofmissing, i))
184 snprintf(str,
sizeof(str),
"%d of %d: missing %s BOARD %s:%s:%d",
185 n, numofmissing, canboardname,
196 case eoerror_value_CFG_candiscovery_boardsinvalid:
199 const char *canboardname = eoboards_type2string(
static_cast<eObrd_type_t
>(
m_dnginfo.
param16 >> 8));
203 const char *empty =
"";
204 const char *wrongtype =
"WRONG BOARD TYPE";
205 const char *wrongprot =
"WRONG PROTOCOL VERSION";
206 const char *wrongappl =
"WRONG APPLICATION VERSION";
208 snprintf(str,
sizeof(str),
"%s %d invalid %s boards in %s:\n",
216 for(
int i=1; i<15; i++)
218 uint64_t val = (invalidmask >> (4*i)) & 0x0f;
221 snprintf(str,
sizeof(str),
"\t %d of %d: wrong %s because it has: %s%s%s \n",
222 n, numofinvalid, canboardname,
223 ((val & 0x1) == 0x1) ? (wrongtype) : (empty),
224 ((val & 0x2) == 0x2) ? (wrongappl) : (empty),
225 ((val & 0x4) == 0x4) ? (wrongprot) : (empty)
236 case eoerror_value_CFG_skin_ok:
240 eObrd_protocolversion_t prot = {0};
241 eObrd_firmwareversion_t appl = {0};
244 prot.major = reqpr >> 8;
245 prot.minor = reqpr & 0xff;
246 appl.major = (reqfw >> 8) & 0xff;
247 appl.minor = reqfw & 0xff;
250 snprintf(str,
sizeof(str),
"%s on %d skin patches for boards on (can1map, can2map) = (0x%.4x, 0x%.4x) with target can protocol ver %d.%d and application ver %d.%d",
254 prot.major, prot.minor,
255 appl.major, appl.minor
260 case eoerror_value_CFG_skin_failed_toomanyboards:
261 case eoerror_value_CFG_inertials3_failed_toomanyboards:
262 case eoerror_value_CFG_temperatures_failed_toomanyboards:
270 snprintf(str,
sizeof(str),
" %s for %d boards. Limit of max number of boards is %d. Boards are on (can1map, can2map) = (0x%.4x, 0x%.4x)",
272 numOfReqBoards, numOfMaxBoards,
278 case eoerror_value_CFG_skin_failed_candiscovery:
279 case eoerror_value_CFG_inertials3_failed_candiscovery:
280 case eoerror_value_CFG_temperatures_failed_candiscovery:
288 if (eoerror_value_CFG_skin_failed_candiscovery == value)
290 snprintf(str,
sizeof(str),
"%s for %d skin patches. ",
m_dnginfo.
baseMessage.c_str(), numOfPatches);
299 snprintf(str,
sizeof(str),
"Missing can boards on (can1map, can2map) = (0x%.4x, 0x%.4x) and found but incompatible can boards on (can1map, can2map) = (0x%.4x, 0x%.4x)",
300 missMaskcan1, missMaskcan2,
301 incompMaskcan1, incompMaskcan2
307 case eoerror_value_CFG_strain_ok:
308 case eoerror_value_CFG_strain_failed_candiscovery:
310 eObrd_protocolversion_t prot = {0};
311 eObrd_firmwareversion_t appl = {0};
314 prot.major = reqpr >> 8;
315 prot.minor = reqpr & 0xff;
316 appl.major = (reqfw >> 8) & 0xff;
317 appl.minor = reqfw & 0xff;
322 snprintf(str,
sizeof(str),
"%s for board at addr:%d and port:%d with can protocol ver %d.%d and application ver %d.%d. Strain number is:%d",
325 prot.major, prot.minor,
326 appl.major, appl.minor,
332 case eoerror_value_CFG_mais_ok:
333 case eoerror_value_CFG_mais_failed_candiscovery:
334 case eoerror_value_CFG_psc_ok:
335 case eoerror_value_CFG_psc_failed_candiscovery:
336 case eoerror_value_CFG_pos_ok:
337 case eoerror_value_CFG_pos_failed_candiscovery:
339 eObrd_protocolversion_t prot = {0};
340 eObrd_firmwareversion_t appl = {0};
343 prot.major = reqpr >> 8;
344 prot.minor = reqpr & 0xff;
345 appl.major = (reqfw >> 8) & 0xff;
346 appl.minor = reqfw & 0xff;
350 snprintf(str,
sizeof(str),
"%s on board at addr: %d and port:%d with can protocol ver %d.%d and application ver %d.%d.",
354 prot.major, prot.minor,
355 appl.major, appl.minor
360 case eoerror_value_CFG_mais_failed_verify_because_active:
361 case eoerror_value_CFG_mc_foc_ok:
362 case eoerror_value_CFG_mc_foc_failed_candiscovery_of_foc:
363 case eoerror_value_CFG_mc_foc_failed_encoders_verify:
364 case eoerror_value_CFG_mc_mc4_ok:
365 case eoerror_value_CFG_mc_mc4_failed_candiscovery_of_mc4:
366 case eoerror_value_CFG_mc_mc4_failed_mais_verify:
367 case eoerror_value_CFG_mc_mc4plus_ok:
368 case eoerror_value_CFG_mc_mc4plus_failed_encoders_verify:
369 case eoerror_value_CFG_comm_cannotloadaregularrop:
370 case eoerror_value_CFG_mc_mc4plusmais_ok:
371 case eoerror_value_CFG_mc_mc4plusmais_failed_encoders_verify:
372 case eoerror_value_CFG_mc_mc4plusmais_failed_candiscovery_of_mais:
373 case eoerror_value_CFG_services_not_verified_yet:
374 case eoerror_value_CFG_mc_not_verified_yet:
375 case eoerror_value_CFG_strain_not_verified_yet:
376 case eoerror_value_CFG_mais_not_verified_yet:
377 case eoerror_value_CFG_skin_not_verified_yet:
378 case eoerror_value_CFG_inertials3_not_verified_yet:
379 case eoerror_value_CFG_encoders_not_verified_yet:
380 case eoerror_value_CFG_mc_using_onboard_config:
381 case eoerror_value_CFG_strain_using_onboard_config:
382 case eoerror_value_CFG_mais_using_onboard_config:
383 case eoerror_value_CFG_inertials3_using_onboard_config:
384 case eoerror_value_CFG_skin_using_onboard_config:
385 case eoerror_value_CFG_inertials3_ok:
386 case eoerror_value_CFG_temperatures_not_verified_yet:
387 case eoerror_value_CFG_temperatures_ok:
388 case eoerror_value_CFG_temperatures_using_onboard_config:
389 case eoerror_value_CFG_psc_failed_verify_because_active:
390 case eoerror_value_CFG_psc_not_verified_yet:
391 case eoerror_value_CFG_psc_using_onboard_config:
392 case eoerror_value_CFG_mc_mc2pluspsc_ok:
393 case eoerror_value_CFG_mc_mc2pluspsc_failed_encoders_verify:
394 case eoerror_value_CFG_mc_mc2pluspsc_failed_candiscovery_of_pscs:
395 case eoerror_value_CFG_inertials3_failed_notsupported:
396 case eoerror_value_CFG_temperatures_failed_notsupported:
397 case eoerror_value_CFG_mais_failed_notsupported:
398 case eoerror_value_CFG_strain_failed_notsupported:
399 case eoerror_value_CFG_skin_failed_notsupported:
400 case eoerror_value_CFG_psc_failed_notsupported:
401 case eoerror_value_CFG_mc_failed_notsupported:
402 case eoerror_value_CFG_encoders_failed_notsupported:
403 case eoerror_value_CFG_pos_not_verified_yet:
404 case eoerror_value_CFG_pos_using_onboard_config:
405 case eoerror_value_CFG_pos_failed_notsupported:
406 case eoerror_value_CFG_mc_mc4plusfaps_ok:
407 case eoerror_value_CFG_mc_mc4plusfaps_failed_encoders_verify:
408 case eoerror_value_CFG_mc_mc4plusfaps_failed_candiscovery:
409 case eoerror_value_CFG_mc_mc4pluspmc_ok:
410 case eoerror_value_CFG_mc_mc4pluspmc_failed_encoders_verify:
411 case eoerror_value_CFG_mc_mc4pluspmc_failed_candiscovery_of_pmc:
412 case eoerror_value_CFG_ft_ok:
413 case eoerror_value_CFG_ft_failed_candiscovery:
414 case eoerror_value_CFG_ft_not_verified_yet:
415 case eoerror_value_CFG_ft_using_onboard_config:
416 case eoerror_value_CFG_ft_failed_notsupported:
417 case eoerror_value_CFG_ft_failed_fullscales:
418 case eoerror_value_CFG_bat_ok:
419 case eoerror_value_CFG_bat_failed_candiscovery:
420 case eoerror_value_CFG_bat_not_verified_yet:
421 case eoerror_value_CFG_bat_using_onboard_config:
422 case eoerror_value_CFG_bat_failed_notsupported:
428 case eoerror_value_CFG_encoders_ok:
429 case eoerror_value_CFG_encoders_failed_verify:
437 int16_t rawerror1 = errorenc1 & failmaskenc1;
438 int16_t rawerror2 = errorenc2 & failmaskenc2;
442 for(
auto i=0; i < numOfJoints; i++)
445 auto primary_enc_with_error = (failmaskenc1 & (1<<i));
446 auto secondary_enc_with_error = (failmaskenc2 & (1<<i));
447 auto primary_error_code = 0;
448 auto secondary_error_code = 0;
449 if(primary_enc_with_error)
451 primary_error_code = ( (errorenc1 & (0xf <<i)) >> 4*i);
453 snprintf(str,
sizeof(str),
" joint %d (%s) has error on primary encoder (code=%d). ",
458 if(secondary_enc_with_error)
460 secondary_error_code = ( (errorenc2 & (0xf <<i)) >> 4*i);
462 snprintf(str,
sizeof(str),
" joint %d (%s) has error on secodary encoder (code=%d)",
472 case eoerror_value_CFG_inertials3_failed_unsupportedsensor:
476 snprintf(str,
sizeof(str),
"%s. Number of unsupported sens is %d",
483 case eoerror_value_CFG_inertials3_changed_requestedrate:
484 case eoerror_value_CFG_temperatures_changed_requestedrate:
485 case eoerror_value_CFG_psc_changed_requestedrate:
486 case eoerror_value_CFG_pos_changed_requestedrate:
491 snprintf(str,
sizeof(str),
"%s. Requested rate %u and Assigned rate %u",
499 case eoerror_value_CFG_inertials3_failed_generic:
500 case eoerror_value_CFG_temperatures_failed_generic:
504 snprintf(str,
sizeof(str),
"%s for %d sensors",
511 case EOERROR_VALUE_DUMMY:
538 std::string MotionControlParser::motorStatusBitsToString(eOmc_motorFaultState_t motorstatus)
541 static const std::array<std::string_view, eOmc_motorFaultState_numberof> s_motor_fault_status =
544 "ExternalFaultAsserted",
545 "UnderVoltageFailure",
546 "OverVoltageFailure",
547 "OverCurrentFailure",
551 "DHESInvalidSequence",
552 "CANInvalidProtocol",
561 "OverHeatingFailure",
570 "FirmwareSPITimingError",
572 "FirmwarePWMFatalError",
580 "SiliconRevisionFault",
581 "PositionLimitUpper",
585 std::string statusstring = {};
586 statusstring.reserve(256);
588 for (uint8_t i = 0; i < eOmc_motorFaultState_numberof; i++)
591 if(embot::core::binary::bit::check(motorstatus.bitmask, i))
593 statusstring.append(
static_cast<const char*
>(s_motor_fault_status.at(i).data()));
594 statusstring.append(
" ");
611 case eoerror_value_MC_motor_external_fault:
612 case eoerror_value_MC_motor_qencoder_phase_disappeared:
618 case eoerror_value_MC_motor_overcurrent:
619 case eoerror_value_MC_motor_i2t_limit:
620 case eoerror_value_MC_motor_hallsensors:
621 case eoerror_value_MC_motor_can_invalid_prot:
622 case eoerror_value_MC_motor_can_generic:
623 case eoerror_value_MC_motor_can_no_answer:
624 case eoerror_value_MC_axis_torque_sens:
625 case eoerror_value_MC_joint_hard_limit:
634 case eoerror_value_MC_aea_abs_enc_invalid:
635 case eoerror_value_MC_aea_abs_enc_spikes:
636 case eoerror_value_MC_aea_abs_enc_timeout:
642 snprintf(str,
sizeof(str),
" %s (Joint=%s (NIB=%d), encoderPort=%d)",
650 case eoerror_value_MC_motor_qencoder_phase:
656 snprintf(str,
sizeof(str),
" %s (Joint=%s (NIB=%d), Raw_quad_encoder_value=%d)",
662 case eoerror_value_MC_motor_qencoder_dirty:
670 snprintf(str,
sizeof(str),
" %s (Joint=%s (NIB=%d), index=%d, dirty=%d, phase=%d)",
676 case eoerror_value_MC_generic_error:
678 eOmc_motorFaultState_t motor_status;
682 std::string motorStatusString = motorStatusBitsToString(motor_status);
683 snprintf(str,
sizeof(str),
" %s (Joint=%s (NIB=%d) (Errors:%s)",
689 case eoerror_value_MC_motor_wrong_state:
698 snprintf(str,
sizeof(str),
" %s Joint=%s (NIB=%d). The requested state is %d, but the current is %d)",
704 case eoerror_value_MC_motor_overheating:
711 snprintf(str,
sizeof(str),
" %s (Joint=%s (NIB=%d), Raw_temperature_value=%d)",
717 case EOERROR_VALUE_DUMMY:
755 case eoerror_value_SK_unspecified:
756 case eoerror_value_SK_obsoletecommand:
761 case eoerror_value_SK_arrayofcandataoverflow:
767 snprintf(str,
sizeof(str),
" %s. Frame.ID=%d, Frame.Size=%d Frame.Data=0x%lx",
773 case eoerror_value_SK_onoroff:
775 std::string emsboardstate =
"unknown";
778 case 0: emsboardstate =
"OFF";
break;
779 case 1: emsboardstate =
"ON";
break;
786 case eoerror_value_SK_unexpecteddata:
788 std::string emsboardstate =
"unknown";
791 case 0: emsboardstate =
"CFG";
break;
792 case 1: emsboardstate =
"RUN";
break;
799 case EOERROR_VALUE_DUMMY:
829 case eoerror_value_HW_strain_saturation:
833 uint32_t upper_saturation_counts = (
m_dnginfo.
param64 & 0xffffffff00000000)>>32;
834 snprintf(str,
sizeof(str),
" %s %d is the channel involved. In the last second, the lower saturation counts is %d and the upper one is %d",
837 lower_saturation_counts,
838 upper_saturation_counts);
842 case eoerror_value_HW_encoder_invalid_value:
843 case eoerror_value_HW_encoder_close_to_limits:
844 case eoerror_value_HW_encoder_crc:
845 case eoerror_value_HW_encoder_not_connected:
851 snprintf(str,
sizeof(str),
" %s (Joint=%s (NIB=%d) Number of error in 10 seconds is: %d)",
859 case EOERROR_VALUE_DUMMY:
885 void SysParser::canMask2canBoardsStr(uint16_t canmask,
diagstr canboardsstr)
887 for(
int i=1; i<15; i++)
890 if ( (canmask & (1<<i)) == (1<<i))
893 strcat(canboardsstr, tmpstr);
898 void SysParser::getCanMonitorInfo(eOmn_serv_category_t &serv_category,
diagstr boardsOnCan1,
diagstr boardsOnCan2)
904 canMask2canBoardsStr(boardsMaskCan1, boardsOnCan1);
905 canMask2canBoardsStr(boardsMaskCan2, boardsOnCan2);
909 void SysParser::getCanMonitorInfoWithTime(eOmn_serv_category_t &serv_category,
diagstr boardsOnCan1,
diagstr boardsOnCan2, uint32_t &
time)
911 getCanMonitorInfo(serv_category, boardsOnCan1, boardsOnCan2);
925 case eoerror_value_SYS_runninghappily:
927 std::string appstate =
"unknown";
930 case 0: appstate=
"just restarted";
break;
931 case 1: appstate=
"idle";
break;
932 case 2: appstate=
"running";
break;
934 snprintf(str,
sizeof(str),
" %s Application state is %s.",
m_dnginfo.
baseMessage.c_str(), appstate.c_str());
938 case eoerror_value_SYS_ctrloop_execoverflowRX:
948 snprintf(str,
sizeof(str),
" %s RX execution time %d[usec]. Latest previous execution times[usec] (..., Tx=%d);(RX=%d, DO=%d, TX=%d);",
953 case eoerror_value_SYS_ctrloop_execoverflowDO:
962 snprintf(str,
sizeof(str),
" %s DO execution time %d[usec]. Latest previous execution times[usec] (..., Tx=%s);(RX=%d, DO=%d, TX=%d); (Rx=%d, ...);",
967 case eoerror_value_SYS_ctrloop_execoverflowTX:
977 snprintf(str,
sizeof(str),
" %s TX execution time %d[usec]. Latest previous execution times[usec] (RX=%s, DO=%s, TX=%d); (Rx=%d, DO=%d, ...). Num of CAN frames[CAN1,CAN2]=[%u %u]",
982 case eoerror_value_SYS_ropparsingerror:
988 case eoerror_value_SYS_halerror:
994 case eoerror_value_SYS_osalerror:
1000 case eoerror_value_SYS_ipalerror:
1006 case eoerror_value_SYS_dispatcherfifooverflow:
1012 case eoerror_value_SYS_canservices_txfifooverflow:
1014 snprintf(str,
sizeof(str),
" %s CanPort=%s Frame.ID=%d, Frame.Size=%d Frame.Data=0x%lx",
1019 case eoerror_value_SYS_canservices_txbusfailure:
1025 case eoerror_value_SYS_canservices_formingfailure:
1031 case eoerror_value_SYS_canservices_parsingfailure:
1037 case eoerror_value_SYS_canservices_genericerror:
1044 case eoerror_value_SYS_ctrloop_rxphasemin:
1045 case eoerror_value_SYS_ctrloop_dophasemin:
1046 case eoerror_value_SYS_ctrloop_txphasemin:
1047 case eoerror_value_SYS_ctrloop_rxphaseaverage:
1048 case eoerror_value_SYS_ctrloop_dophaseaverage:
1049 case eoerror_value_SYS_ctrloop_txphaseaverage:
1050 case eoerror_value_SYS_ctrloop_rxphasemax:
1051 case eoerror_value_SYS_ctrloop_dophasemax:
1052 case eoerror_value_SYS_ctrloop_txphasemax:
1054 snprintf(str,
sizeof(str),
" %s, monitored over %f sec is %d microsec",
m_dnginfo.
baseMessage.c_str(),
1061 case eoerror_value_SYS_exec_time_stats:
1063 static constexpr
const char *
const names[4] = {
"runner.RX()",
"runner.DO()",
"runner.TX()",
"other.ID = " };
1064 std::string actor = {};
1074 snprintf(str,
sizeof(str),
" %s: %s -> (%d, %d, %d) us over %f sec",
1085 case eoerror_value_SYS_proxy_forward_fails:
1087 snprintf(str,
sizeof(str),
" %s. ROP.sign=%d, ROP.id=%d. Proxy list capacity is %d, size is %d ",
1096 case eoerror_value_SYS_proxy_ropdes_notfound:
1103 case eoerror_value_SYS_canservices_canprint:
1109 case eoerror_value_SYS_canservices_rxmaisbug:
1115 case eoerror_value_SYS_canservices_rxfromwrongboard:
1121 case eoerror_value_SYS_transceiver_rxseqnumber_error:
1128 case eoerror_value_SYS_transceiver_rxseqnumber_restarted:
1134 case eoerror_value_SYS_canservices_board_detected:
1175 snprintf(str,
sizeof(str),
" %s on CAN port=%s with address %d. Fw ver is %d.%d.%d. Proto ver is %d.%d",
1177 fw_build, fw_major, fw_minor, proto_major, proto_minor );
1181 case eoerror_value_SYS_canservices_board_wrongprotversion:
1210 snprintf(str,
sizeof(str),
" %s on CAN port=%s with address %d. Fw ver is %d.%d.%d. Proto ver is %d.%d. Required Version is %d.%d",
1212 fw_build, fw_major, fw_minor, proto_major, proto_minor, req_proto_major, req_proto_minor );
1216 case eoerror_value_SYS_canservices_board_notfound:
1218 eObrd_type_t general_brd_type = eoboards_cantype2type((eObrd_cantype_t)
m_dnginfo.
param16);
1219 snprintf(str,
sizeof(str),
" %s The board is on CAN port=%s with address %d. Board type is %s.",
1226 case eoerror_value_SYS_canservices_boards_lostcontact:
1228 eOmn_serv_category_t serv_category;
1231 getCanMonitorInfo(serv_category, lostCanBoards1, lostCanBoards2);
1233 snprintf(str,
sizeof(str),
"%s Type of service category is %s. Lost can boards on (can1map, can2map) = ([ %s ], [ %s ] ).",
1235 eomn_servicecategory2string(serv_category),
1236 lostCanBoards1, lostCanBoards2
1243 case eoerror_value_SYS_canservices_boards_retrievedcontact:
1245 eOmn_serv_category_t serv_category;
1246 diagstr retrievedCanBoards1 = {0};
1247 diagstr retrievedCanBoards2 = {0};
1248 getCanMonitorInfo(serv_category, retrievedCanBoards1, retrievedCanBoards2);
1250 snprintf(str,
sizeof(str),
"%s Type of service category is %s. Retrieved can boards on (can1map, can2map) = ([ %s ], [ %s ] ).",
1252 eomn_servicecategory2string(serv_category),
1253 retrievedCanBoards1, retrievedCanBoards2
1260 case eoerror_value_SYS_canservices_monitor_regularcontact:
1262 eOmn_serv_category_t serv_category;
1263 diagstr foundCanBoards1 = {0};
1264 diagstr foundCanBoards2 = {0};
1265 getCanMonitorInfo(serv_category, foundCanBoards1, foundCanBoards2);
1267 snprintf(str,
sizeof(str),
"%s Type of service category is %s. CAN boards are on (can1map, can2map) = ([ %s ], [ %s ])",
1269 eomn_servicecategory2string(serv_category),
1276 case eoerror_value_SYS_canservices_monitor_lostcontact:
1278 eOmn_serv_category_t serv_category;
1281 getCanMonitorInfo(serv_category, lostCanBoards1, lostCanBoards2);
1283 snprintf(str,
sizeof(str),
"%s Type of service category is %s. Lost CAN boards are on (can1map, can2map) = ([ %s ], [ %s ]).",
1285 eomn_servicecategory2string(serv_category),
1292 case eoerror_value_SYS_canservices_monitor_retrievedcontact:
1294 eOmn_serv_category_t serv_category;
1295 uint32_t totRetrvTime;
1296 diagstr retrievedCanBoards1 = {0};
1297 diagstr retrievedCanBoards2 = {0};
1298 getCanMonitorInfoWithTime(serv_category, retrievedCanBoards1, retrievedCanBoards2, totRetrvTime);
1301 snprintf(str,
sizeof(str),
"%s Type of service category is %s. CAN boards are on (can1map, can2map) = ([ %s ], [ %s ]). Total retrieving time: %d [ms]",
1303 eomn_servicecategory2string(serv_category),
1304 retrievedCanBoards1,
1305 retrievedCanBoards2,
1312 case eoerror_value_SYS_canservices_monitor_stillnocontact:
1314 eOmn_serv_category_t serv_category;
1315 uint32_t totDisappTime;
1318 getCanMonitorInfoWithTime(serv_category, lostCanBoards1, lostCanBoards2, totDisappTime);
1320 snprintf(str,
sizeof(str),
"%s Type of service category is %s. Lost CAN boards are on (can1map, can2map) = ([ %s ] , [ %s ]). Total disappearance time: %d [ms]",
1322 eomn_servicecategory2string(serv_category),
1331 case eoerror_value_SYS_unspecified:
1332 case eoerror_value_SYS_tobedecided:
1333 case eoerror_value_SYS_memory_zerorequested:
1334 case eoerror_value_SYS_memory_notinitialised:
1335 case eoerror_value_SYS_memory_missing:
1336 case eoerror_value_SYS_mutex_timeout:
1337 case eoerror_value_SYS_wrongparam:
1338 case eoerror_value_SYS_wrongusage:
1339 case eoerror_value_SYS_runtimeerror:
1340 case eoerror_value_SYS_runninginfatalerrorstate:
1341 case eoerror_value_SYS_udptxfailure:
1342 case eoerror_value_SYS_configurator_udptxfailure:
1343 case eoerror_value_SYS_runner_udptxfailure:
1344 case eoerror_value_SYS_runner_transceivererror:
1345 case eoerror_value_SYS_canservices_rxfifooverflow:
1346 case eoerror_value_SYS_proxy_forward_ok:
1347 case eoerror_value_SYS_proxy_forward_callback_fails:
1348 case eoerror_value_SYS_proxy_reply_ok:
1349 case eoerror_value_SYS_proxy_reply_fails:
1350 case eoerror_value_SYS_canservices_boards_missing:
1351 case eoerror_value_SYS_canservices_boards_searched:
1352 case eoerror_value_SYS_canservices_boards_found:
1353 case eoerror_value_SYS_transceiver_rxinvalidframe_error:
1359 case EOERROR_VALUE_DUMMY:
1393 char str[512] = {0};
1400 case eoerror_value_ETHMON_link_goes_up:
1401 case eoerror_value_ETHMON_link_goes_down:
1402 case eoerror_value_ETHMON_error_rxcrc:
1404 std::string appstate =
"unknown";
1407 case 0: appstate=
"N/A";
break;
1408 case 1: appstate=
"idle";
break;
1409 case 3: appstate=
"running";
break;
1412 std::string ethport =
"unknown";
1415 case 0: ethport=
"ETH input (P2/P13/J4)";
break;
1416 case 1: ethport=
"ETH output (P3/P12/J5)";
break;
1417 case 2: ethport=
"internal";
break;
1419 if(eoerror_value_ETHMON_error_rxcrc == value)
1420 snprintf(str,
sizeof(str),
" %s in port %s. Application state is %s. Number of erros is %ld",
1423 snprintf(str,
sizeof(str),
" %s in port %s. Application state is %s.",
m_dnginfo.
baseMessage.c_str(), ethport.c_str(), appstate.c_str());
1428 case eoerror_value_ETHMON_txseqnumbermissing:
1435 case eoerror_value_ETHMON_juststarted:
1436 case eoerror_value_ETHMON_justverified:
1442 case EOERROR_VALUE_DUMMY:
1467 char str[512] = {0};
1474 case eoerror_value_IS_arrayofinertialdataoverflow:
1481 snprintf(str,
sizeof(str),
" %s. Frame.ID=%d, Frame.Size=%d Frame.Data=0x%lx",
1487 case eoerror_value_IS_unknownsensor:
1493 case EOERROR_VALUE_DUMMY:
1516 char str[512] = {0};
1523 case eoerror_value_AS_arrayoftemperaturedataoverflow:
1530 snprintf(str,
sizeof(str),
" %s. Frame.ID=%d, Frame.Size=%d Frame.Data=0x%lx",
1536 case eoerror_value_AS_unknownsensor:
1542 case EOERROR_VALUE_DUMMY:
uint8_t sourceCANBoardAddr
std::string sourceCANPortStr
std::string sourceBoardIpAddrStr
AnalogSensorParser()=delete
Diagnostic::EmbeddedInfo baseInfo
Diagnostic::LowLevel::EntityNameProvider & m_entityNameProvider
Diagnostic::LowLevel::AuxEmbeddedInfo & m_dnginfo
bool getAxisName(uint32_t entityId, std::string &axisName)
EthMonitorParser()=delete
InertialSensorParser()=delete
MotionControlParser()=delete