Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-22103

Please uncomment some logging statements in the MT Rotator cRIO

    XMLWordPrintable

    Details

      Description

      Please enable the logging statements at lines 400, 403 and 408 in rotator/targetx2/commanding.c: the commented-out syslog calls in:

                      // select who can command the rotator: GUI (default/0) or DDS (1)
                      case CMDSOURCE:
                          if (isOffline(state1) && isPublishOnly(offlineSubstate1))
                          {
                              syslog(LOG_ERR, "command not allowed in Offline/PublishOnly state");
                              gCommandSourceDDS = 0;
                              break;
                          }
                          if (cmdMsg.param1 > 0.5) 
                          {
                             if (gCmdDDSServerConnected == 1)
                             {
                                //syslog(LOG_NOTICE, "Command source now == DDS");
                                gCommandSourceDDS = 1;
                             }
                             //else syslog(LOG_NOTICE, "Not connected to DDS Cmd socket");
                          }                    
                          else
                          {
                             //syslog(LOG_NOTICE, "Command source now == GUI");
                             gCommandSourceDDS = 0;
                          }
                          break;
      

      Please also look for and enable similar messages in the hexapod commanding.c

      This will help us diagnose when the rotator or hexapod cRIO decides to ignore commands from the CSC.

      Note that any command from the "GUI", which is what we call the Engineering User Interface (EUI), will reset gCommandSourceDDS to 0, making the CSC unable to command the cRIO. That is based on different code in rotator/targetx2/cmdClientSocket.c:

                    // IF DDS was in control, a cmd from GUI will revert to GUI control
                    if (gCommandSourceDDS) 
                    {
                         ////printf("Command source==GUI\n");
                       gCommandSourceDDS = 0;
                    }
      

      This looks like a bug or misfeature to me (unless it also changes the state to Offline/PublishOnly, which I strongly doubt).

      I would expect the CSC to always be able to control the rotator except in Offline/PublishOnly mode.

      • This task will try to understand the logging mechanism and log the useful information.┬áThis will be helpful for the following debug.

        Attachments

          Issue Links

            Activity

            rowen Russell Owen created issue -
            ttsai Te-Wei Tsai made changes -
            Field Original Value New Value
            Epic Link DM-21931 [ 425242 ]
            ttsai Te-Wei Tsai made changes -
            End date 27/Mar/20
            Sprint TSSW Sprint - Mar 16 - Mar 30 [ 1006 ]
            Start date 16/Mar/20
            Story Points 3
            Description Please enable the logging statements at lines 400, 403 and 408 in rotator/targetx2/commanding.c: the commented-out syslog calls in:
            {code}
                            // select who can command the rotator: GUI (default/0) or DDS (1)
                            case CMDSOURCE:
                                if (isOffline(state1) && isPublishOnly(offlineSubstate1))
                                {
                                    syslog(LOG_ERR, "command not allowed in Offline/PublishOnly state");
                                    gCommandSourceDDS = 0;
                                    break;
                                }
                                if (cmdMsg.param1 > 0.5)
                                {
                                   if (gCmdDDSServerConnected == 1)
                                   {
                                      //syslog(LOG_NOTICE, "Command source now == DDS");
                                      gCommandSourceDDS = 1;
                                   }
                                   //else syslog(LOG_NOTICE, "Not connected to DDS Cmd socket");
                                }
                                else
                                {
                                   //syslog(LOG_NOTICE, "Command source now == GUI");
                                   gCommandSourceDDS = 0;
                                }
                                break;
            {code}

            Please also look for and enable similar messages in the hexapod commanding.c

            This will help us diagnose when the rotator or hexapod cRIO decides to ignore commands from the CSC.

            Note that any command from the "GUI", which is what we call the Engineering User Interface (EUI), will reset gCommandSourceDDS to 0, making the CSC unable to command the cRIO. That is based on different code in rotator/targetx2/cmdClientSocket.c:
            {code}
                          // IF DDS was in control, a cmd from GUI will revert to GUI control
                          if (gCommandSourceDDS)
                          {
                               ////printf("Command source==GUI\n");
                             gCommandSourceDDS = 0;
                          }
            {code}

            This looks like a bug or misfeature to me (unless it also changes the state to Offline/PublishOnly, which I strongly doubt).

            I would expect the CSC to always be able to control the rotator except in Offline/PublishOnly mode.
            Please enable the logging statements at lines 400, 403 and 408 in rotator/targetx2/commanding.c: the commented-out syslog calls in:
            {code} // select who can command the rotator: GUI (default/0) or DDS (1)
                            case CMDSOURCE:
                                if (isOffline(state1) && isPublishOnly(offlineSubstate1))
                                {
                                    syslog(LOG_ERR, "command not allowed in Offline/PublishOnly state");
                                    gCommandSourceDDS = 0;
                                    break;
                                }
                                if (cmdMsg.param1 > 0.5)
                                {
                                   if (gCmdDDSServerConnected == 1)
                                   {
                                      //syslog(LOG_NOTICE, "Command source now == DDS");
                                      gCommandSourceDDS = 1;
                                   }
                                   //else syslog(LOG_NOTICE, "Not connected to DDS Cmd socket");
                                }
                                else
                                {
                                   //syslog(LOG_NOTICE, "Command source now == GUI");
                                   gCommandSourceDDS = 0;
                                }
                                break;
            {code}
            Please also look for and enable similar messages in the hexapod commanding.c

            This will help us diagnose when the rotator or hexapod cRIO decides to ignore commands from the CSC.

            Note that any command from the "GUI", which is what we call the Engineering User Interface (EUI), will reset gCommandSourceDDS to 0, making the CSC unable to command the cRIO. That is based on different code in rotator/targetx2/cmdClientSocket.c:
            {code} // IF DDS was in control, a cmd from GUI will revert to GUI control
                          if (gCommandSourceDDS)
                          {
                               ////printf("Command source==GUI\n");
                             gCommandSourceDDS = 0;
                          }
            {code}
            This looks like a bug or misfeature to me (unless it also changes the state to Offline/PublishOnly, which I strongly doubt).

            I would expect the CSC to always be able to control the rotator except in Offline/PublishOnly mode.

            * This task will try to understand the logging mechanism and log the useful information.
            Labels HexRot MainTelescope
            ttsai Te-Wei Tsai made changes -
            Description Please enable the logging statements at lines 400, 403 and 408 in rotator/targetx2/commanding.c: the commented-out syslog calls in:
            {code} // select who can command the rotator: GUI (default/0) or DDS (1)
                            case CMDSOURCE:
                                if (isOffline(state1) && isPublishOnly(offlineSubstate1))
                                {
                                    syslog(LOG_ERR, "command not allowed in Offline/PublishOnly state");
                                    gCommandSourceDDS = 0;
                                    break;
                                }
                                if (cmdMsg.param1 > 0.5)
                                {
                                   if (gCmdDDSServerConnected == 1)
                                   {
                                      //syslog(LOG_NOTICE, "Command source now == DDS");
                                      gCommandSourceDDS = 1;
                                   }
                                   //else syslog(LOG_NOTICE, "Not connected to DDS Cmd socket");
                                }
                                else
                                {
                                   //syslog(LOG_NOTICE, "Command source now == GUI");
                                   gCommandSourceDDS = 0;
                                }
                                break;
            {code}
            Please also look for and enable similar messages in the hexapod commanding.c

            This will help us diagnose when the rotator or hexapod cRIO decides to ignore commands from the CSC.

            Note that any command from the "GUI", which is what we call the Engineering User Interface (EUI), will reset gCommandSourceDDS to 0, making the CSC unable to command the cRIO. That is based on different code in rotator/targetx2/cmdClientSocket.c:
            {code} // IF DDS was in control, a cmd from GUI will revert to GUI control
                          if (gCommandSourceDDS)
                          {
                               ////printf("Command source==GUI\n");
                             gCommandSourceDDS = 0;
                          }
            {code}
            This looks like a bug or misfeature to me (unless it also changes the state to Offline/PublishOnly, which I strongly doubt).

            I would expect the CSC to always be able to control the rotator except in Offline/PublishOnly mode.

            * This task will try to understand the logging mechanism and log the useful information.
            Please enable the logging statements at lines 400, 403 and 408 in rotator/targetx2/commanding.c: the commented-out syslog calls in:
            {code} // select who can command the rotator: GUI (default/0) or DDS (1)
                            case CMDSOURCE:
                                if (isOffline(state1) && isPublishOnly(offlineSubstate1))
                                {
                                    syslog(LOG_ERR, "command not allowed in Offline/PublishOnly state");
                                    gCommandSourceDDS = 0;
                                    break;
                                }
                                if (cmdMsg.param1 > 0.5)
                                {
                                   if (gCmdDDSServerConnected == 1)
                                   {
                                      //syslog(LOG_NOTICE, "Command source now == DDS");
                                      gCommandSourceDDS = 1;
                                   }
                                   //else syslog(LOG_NOTICE, "Not connected to DDS Cmd socket");
                                }
                                else
                                {
                                   //syslog(LOG_NOTICE, "Command source now == GUI");
                                   gCommandSourceDDS = 0;
                                }
                                break;
            {code}
            Please also look for and enable similar messages in the hexapod commanding.c

            This will help us diagnose when the rotator or hexapod cRIO decides to ignore commands from the CSC.

            Note that any command from the "GUI", which is what we call the Engineering User Interface (EUI), will reset gCommandSourceDDS to 0, making the CSC unable to command the cRIO. That is based on different code in rotator/targetx2/cmdClientSocket.c:
            {code} // IF DDS was in control, a cmd from GUI will revert to GUI control
                          if (gCommandSourceDDS)
                          {
                               ////printf("Command source==GUI\n");
                             gCommandSourceDDS = 0;
                          }
            {code}
            This looks like a bug or misfeature to me (unless it also changes the state to Offline/PublishOnly, which I strongly doubt).

            I would expect the CSC to always be able to control the rotator except in Offline/PublishOnly mode.
             * This task will try to understand the logging mechanism and log the useful information. This will be helpful for the following debug.
            ttsai Te-Wei Tsai made changes -
            Story Points 3 1
            ttsai Te-Wei Tsai made changes -
            Sprint TSSW Sprint - Mar 16 - Mar 30 [ 1006 ] TSSW Sprint - Mar 30 - Apr 13 [ 1009 ]
            ttsai Te-Wei Tsai made changes -
            Story Points 1 0
            ttsai Te-Wei Tsai made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            ttsai Te-Wei Tsai made changes -
            Link This issue relates to DM-24361 [ DM-24361 ]
            ttsai Te-Wei Tsai made changes -
            Reviewers Russell Owen [ rowen ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            rowen Russell Owen made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            ttsai Te-Wei Tsai made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]

              People

              Assignee:
              ttsai Te-Wei Tsai
              Reporter:
              rowen Russell Owen
              Reviewers:
              Russell Owen
              Watchers:
              Russell Owen, Te-Wei Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Start date:
                End date:

                  Jenkins

                  No builds found.