Skip to content

Commit

Permalink
Runtime configuration of diagnostics related to the RX-DO-TX phases (#96
Browse files Browse the repository at this point in the history
)
  • Loading branch information
marcoaccame authored Jul 8, 2024
1 parent 2df7eb4 commit e6929cb
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.12)

project(icub_firmware_shared
VERSION 1.39.0)
VERSION 1.39.1)

find_package(YCM 0.11.0 REQUIRED)

Expand Down
21 changes: 11 additions & 10 deletions eth/embobj/plus/comm-v2/icub/EoError.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ const eoerror_valuestring_t eoerror_valuestrings_SYS[] =
{eoerror_value_SYS_canservices_parsingfailure, "SYS: EOtheCANservice could not parse a rx can frame.", " In par16 there is frame.id and frame.size (in most significant nibble). In par64 there is the frame.data"},
{eoerror_value_SYS_canservices_txfifoputisok, "SYS: EOtheCANservice have just put a can frame in tx fifo.", "In par16 there is frame.id and frame.size (in most significant nibble). In par64 there is the frame.data."},
{eoerror_value_SYS_canservices_genericerror, "SYS: EOtheCANservice has detected a generic error.", "In par16 there is the code"},
{eoerror_value_SYS_ctrloop_rxphaseaverage, "SYS: RX phase of the control loop average execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_dophaseaverage, "SYS: DO phase of the control loop average execution time in usec, monitored for the last 10secs, is", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_txphaseaverage, "SYS: TX phase of the control loop average execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_rxphasemax, "SYS: RX phase of the control loop max execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_dophasemax, "SYS: DO phase of the control loop max execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_txphasemax, "SYS: TX phase of the control loop max execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_rxphasemin, "SYS: RX phase of the control loop min execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_dophasemin, "SYS: DO phase of the control loop min execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_txphasemin, "SYS: TX phase of the control loop min execution time in usec, monitored for the last 10secs, is ", "Value is stored in par16 "},
{eoerror_value_SYS_ctrloop_rxphaseaverage, "SYS: RX phase average execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_dophaseaverage, "SYS: DO phase average execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_txphaseaverage, "SYS: TX phase average execution timec", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_rxphasemax, "SYS: RX phase max execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_dophasemax, "SYS: DO phase max execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_txphasemax, "SYS: TX phase max execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_rxphasemin, "SYS: RX phase min execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_dophasemin, "SYS: DO phase min execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_ctrloop_txphasemin, "SYS: TX phase min execution time", "us time in par16, ms period in par64 & 0xffff"},
{eoerror_value_SYS_proxy_forward_ok, "SYS: the proxy has forwareded a request.", ""},
{eoerror_value_SYS_proxy_forward_fails, "SYS: the proxy fails to forward a request.", "in par64 there are the [sign|id32], in par16 [capacity|size] of proxy list "},
{eoerror_value_SYS_proxy_forward_callback_fails, "SYS: the update callback called by a proxy forward fails to operate properly."},
Expand All @@ -165,7 +165,8 @@ const eoerror_valuestring_t eoerror_valuestrings_SYS[] =
{eoerror_value_SYS_canservices_monitor_regularcontact, "SYS: a service has verified that the TX of its CAN boards is regular.", "In sourceaddress the eOmn_serv_category_t, in par64 LS 32 bits the bit mask of boards (CAN1 in MS 16 bits and CAN2 in LS 16 bits)"},
{eoerror_value_SYS_canservices_monitor_lostcontact, "SYS: a service has detected that some CAN boards have stopped transmission.", "In sourceaddress the eOmn_serv_category_t, in par64 LS 32 bits the bit mask of lost board (CAN1 in MS 16 bits and CAN2 in LS 16 bits), in in par64 MS 32 bits the time in ms since last contact"},
{eoerror_value_SYS_canservices_monitor_stillnocontact, "SYS: a service has detected that some CAN boards are still not transmitting.", "In sourceaddress the eOmn_serv_category_t, in par64 LS 32 bits the bit mask of lost board (CAN1 in MS 16 bits and CAN2 in LS 16 bits), in in par64 MS 32 bits the total disappearence time in ms"},
{eoerror_value_SYS_canservices_monitor_retrievedcontact, "SYS: a service has recovered all CAN boards that were not transmitting.", "In sourceaddress the eOmn_serv_category_t"}
{eoerror_value_SYS_canservices_monitor_retrievedcontact, "SYS: a service has recovered all CAN boards that were not transmitting.", "In sourceaddress the eOmn_serv_category_t"},
{eoerror_value_SYS_exec_time_stats, "SYS: execution time statistics (min, average, max) us in a period", "(us min, us average, us max, ms period) is in par64, thread id in par16"},
}; EO_VERIFYsizeof(eoerror_valuestrings_SYS, eoerror_value_SYS_numberof*sizeof(const eoerror_valuestring_t))


Expand Down
5 changes: 3 additions & 2 deletions eth/embobj/plus/comm-v2/icub/EoError.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ typedef enum
eoerror_value_SYS_canservices_monitor_regularcontact = 60,
eoerror_value_SYS_canservices_monitor_lostcontact = 61,
eoerror_value_SYS_canservices_monitor_stillnocontact = 62,
eoerror_value_SYS_canservices_monitor_retrievedcontact = 63
eoerror_value_SYS_canservices_monitor_retrievedcontact = 63,
eoerror_value_SYS_exec_time_stats = 64

} eOerror_value_SYS_t;

enum { eoerror_value_SYS_numberof = 64 };
enum { eoerror_value_SYS_numberof = 65 };


/** @typedef typedef enum eOerror_value_HW_t
Expand Down
15 changes: 14 additions & 1 deletion eth/embobj/plus/comm-v2/icub/EoManagement.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,18 @@ typedef struct // size is 8+32+80+0 = 120 bytes

// -- the definition of an appl entity

typedef enum
{
eomn_appl_log_asynchro_exectime_overflow = 0, // if used it sends logging as an overflow of execution time happens in the runner
eomn_appl_log_periodic_exectime_statistics = 1 // if used it sends periodic logging on stats of the runner
} eOmn_appl_log_flags_t;

typedef struct
{
uint16_t flags; // uses OR of eOmn_appl_log_flags_t
uint16_t period10ms; // in 10*ms so that we manage ut to 10 minutes. used by periodic logs
} eOmn_appl_config_logging_t;

/** @typedef typedef struct eOmn_appl_config_t;
@brief used to configure the application
**/
Expand All @@ -282,7 +294,8 @@ typedef struct // size is 4+3+3 = 8 bytes
uint16_t maxtimeDO; // in usec
uint16_t maxtimeTX; // in usec
uint8_t txratedivider; // if equal to 1 (or 0) the cycle sends up packets at every cycles, if 2 it sends up packets every two cycles
uint8_t filler05[5];
uint8_t filler01[1];
eOmn_appl_config_logging_t logging;
} eOmn_appl_config_t; EO_VERIFYsizeof(eOmn_appl_config_t, 16)


Expand Down
2 changes: 1 addition & 1 deletion eth/embobj/plus/comm-v2/protocol/api/EoProtocolMN.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern "C" {
// - declaration of public user-defined types -------------------------------------------------------------------------


enum { eoprot_version_mn_major = 2, eoprot_version_mn_minor = 23 };
enum { eoprot_version_mn_major = 2, eoprot_version_mn_minor = 24 };


enum { eoprot_entities_mn_numberof = eomn_entities_numberof };
Expand Down

0 comments on commit e6929cb

Please sign in to comment.