Commit 8825ac3a authored by Adam Wujek's avatar Adam Wujek

[FEATURE: #54] include/ppsi/pp-instance.h: rename ptp_support to ptp_fallback to…

[FEATURE: #54] include/ppsi/pp-instance.h: rename ptp_support to ptp_fallback to reflect more its function

When ptp_support/ptp_fallback is TRUE it is intended that an instance
can fallback from WR to standard PTP.
Please note that this functionality does not work correctly at this
point.
Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 8d3852b1
......@@ -222,7 +222,7 @@ int main(int argc, char **argv)
ppi->portDS = calloc(1, sizeof(*ppi->portDS));
ppi->servo = calloc(1, sizeof(*ppi->servo));
ppi->ext_hooks = &pp_hooks;
ppi->ptp_support = TRUE;
ppi->ptp_fallback = TRUE;
if (ppi->portDS) {
switch (ppi->cfg.profile) {
......
......@@ -126,7 +126,7 @@ int wrc_ptp_init(void)
ppi->__tx_buffer = __tx_buffer;
ppi->__rx_buffer = __rx_buffer;
ppi->servo = &servo;
ppi->ptp_support = TRUE;
ppi->ptp_fallback = TRUE;
ppi->asymmetryCorrectionPortDS.enable = 1;
/* copy default ppi config */
......
......@@ -283,7 +283,7 @@ int main(int argc, char **argv)
ppi->portDS = wrs_shm_alloc(ppsi_head, sizeof(*ppi->portDS));
ppi->servo = wrs_shm_alloc(ppsi_head, sizeof(*ppi->servo));
ppi->ext_hooks=&pp_hooks; /* Default value. Can be overwritten by an extension */
ppi->ptp_support=TRUE;
ppi->ptp_fallback = TRUE;
if (ppi->portDS) {
switch (ppi->cfg.profile) {
case PPSI_PROFILE_WR :
......
......@@ -361,8 +361,8 @@ void pdstate_disable_extension(struct pp_instance * ppi)
{
ppi->pdstate=PP_PDSTATE_FAILURE;
if ( ppi->extState==PP_EXSTATE_ACTIVE) {
if ( ppi->ptp_support )
ppi->extState=ppi->ptp_support ? PP_EXSTATE_PTP : PP_EXSTATE_DISABLE;
if ( ppi->ptp_fallback )
ppi->extState=ppi->ptp_fallback ? PP_EXSTATE_PTP : PP_EXSTATE_DISABLE;
pp_servo_init(ppi); // Reinitialize the servo
if ( is_ext_hook_available(ppi,extension_state_changed) )
ppi->ext_hooks->extension_state_changed(ppi);
......
......@@ -290,7 +290,7 @@ struct pp_instance {
unsigned long ptp_rx_count;
Boolean received_dresp; /* Count the number of delay response messages received for a given delay request */
Boolean received_dresp_fup; /* Count the number of delay response follow up messages received for a given delay request */
Boolean ptp_support; /* True if allow pure PTP support */
Boolean ptp_fallback; /* True if allow pure PTP support */
Boolean bmca_execute; /* True: Ask fsm to run bmca state decision */
pp_pdstate_t pdstate; /* Protocol detection state */
pp_exstate_t extState; /* Extension state */
......
......@@ -308,7 +308,7 @@ struct dump_info dump_ppsi_info[] = {
DUMP_FIELD(unsigned_long, ptp_rx_count),
DUMP_FIELD(yes_no_Boolean, received_dresp), /* Count the number of delay response messages received for a given delay request */
DUMP_FIELD(yes_no_Boolean, received_dresp_fup), /* Count the number of delay response follow up messages received for a given delay request */
DUMP_FIELD(yes_no_Boolean, ptp_support), /* True if allow pure PTP support */
DUMP_FIELD(yes_no_Boolean, ptp_fallback), /* True if allow pure PTP support */
DUMP_FIELD(yes_no_Boolean, bmca_execute), /* True: Ask fsm to run bmca state decision */
DUMP_FIELD(pp_pdstate, pdstate), /* Protocol detection state */
DUMP_FIELD(exstate, extState), /* Extension state */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment