Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. What is makegetstatuscmd() command function?

What is makegetstatuscmd() command function?

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Md Mubdiul Hasan
    wrote on last edited by
    #1

    Hi there, I found difficulties to understand the following function,

    void MakeGetStatusCMD(void)

    Under this function, float type WORDS and size are defined . This function is using for UART/MODEBUS communication protocol. Its using to know the status of receiving data in main dsp control board. Variables are defined for size of DSP Registers and counter of register. At last, its written

    SendDSPCMD()

    _ 1 Reply Last reply
    0
    • M Md Mubdiul Hasan

      Hi there, I found difficulties to understand the following function,

      void MakeGetStatusCMD(void)

      Under this function, float type WORDS and size are defined . This function is using for UART/MODEBUS communication protocol. Its using to know the status of receiving data in main dsp control board. Variables are defined for size of DSP Registers and counter of register. At last, its written

      SendDSPCMD()

      _ Offline
      _ Offline
      _Flaviu
      wrote on last edited by
      #2

      I guess you'll need to deliver more details about this

      MakeGetStatusCMD()

      function (his body, anything), because we don't know anything about this

      M 1 Reply Last reply
      0
      • _ _Flaviu

        I guess you'll need to deliver more details about this

        MakeGetStatusCMD()

        function (his body, anything), because we don't know anything about this

        M Offline
        M Offline
        Md Mubdiul Hasan
        wrote on last edited by
        #3

        I guess you'll need to deliver more details about this MakeGetStatusCMD() function (his body, anything), because we don't know anything about this Its a command type function. Lets say DSP is master and another type of MCU is slave. We are trying to make bridge among them. Additionally, this Modebus protocol has interface with API and display.It may have remote control piping. Slave is host here. This file where I got this function has included register and device functioning header file. Those can be describe here,

        BOOL SysUsartBusy;//combining the functions of a data bus to carry information, an address bus to determine where it should be sent or read from, and a control bus to determine its operation.
        WORD SysCmdTimeoutCount;//Byte and Word Swapping in Modbus, proposes a method to timeout a long-running command .
        WORD SysCmdAckDelayCount;// system acknowledged, puting a delay count
        WORD SysCmdDelayCount; // delay will counted
        //The tail() method is utilized to return a new queue that consists of all the elements except the first one.
        BYTE CmdQueueHeader, CmdQueueTail;// In modbus data stream at first (flag, adress, control) belongs from a header file,Returns the queue of upcoming commands for the specified device.
        BYTE CmdQueue[CMD_QUEUE_SIZE];//Queue is a function, may be its use for checking 1st and last data within a particular size.

        J 1 Reply Last reply
        0
        • M Md Mubdiul Hasan

          I guess you'll need to deliver more details about this MakeGetStatusCMD() function (his body, anything), because we don't know anything about this Its a command type function. Lets say DSP is master and another type of MCU is slave. We are trying to make bridge among them. Additionally, this Modebus protocol has interface with API and display.It may have remote control piping. Slave is host here. This file where I got this function has included register and device functioning header file. Those can be describe here,

          BOOL SysUsartBusy;//combining the functions of a data bus to carry information, an address bus to determine where it should be sent or read from, and a control bus to determine its operation.
          WORD SysCmdTimeoutCount;//Byte and Word Swapping in Modbus, proposes a method to timeout a long-running command .
          WORD SysCmdAckDelayCount;// system acknowledged, puting a delay count
          WORD SysCmdDelayCount; // delay will counted
          //The tail() method is utilized to return a new queue that consists of all the elements except the first one.
          BYTE CmdQueueHeader, CmdQueueTail;// In modbus data stream at first (flag, adress, control) belongs from a header file,Returns the queue of upcoming commands for the specified device.
          BYTE CmdQueue[CMD_QUEUE_SIZE];//Queue is a function, may be its use for checking 1st and last data within a particular size.

          J Offline
          J Offline
          jeron1
          wrote on last edited by
          #4

          Do you have the source code for the MakeGetStatusCMD() function?

          "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

          M 1 Reply Last reply
          0
          • J jeron1

            Do you have the source code for the MakeGetStatusCMD() function?

            "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

            M Offline
            M Offline
            Md Mubdiul Hasan
            wrote on last edited by
            #5

            Dear Sir Jeron, Really I did not figure out what you want to explain. Do you mean its Query command ? For API purpose those command work to identify device? Does it work like windo command ?

            Quote:

            CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input

            Kindly talk about facts that the messages are issued using Message Queue interface call. Command queue header files need to explain.

            J 1 Reply Last reply
            0
            • M Md Mubdiul Hasan

              Dear Sir Jeron, Really I did not figure out what you want to explain. Do you mean its Query command ? For API purpose those command work to identify device? Does it work like windo command ?

              Quote:

              CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input

              Kindly talk about facts that the messages are issued using Message Queue interface call. Command queue header files need to explain.

              J Offline
              J Offline
              jeron1
              wrote on last edited by
              #6

              Quote:

              Under this function, float type WORDS and size are defined .

              Do you mean "inside' this function? If so, do you know what is inside this function? Is this a library function for a certain MCU? If so, is there any documentation of this function? Your initial question is quite unclear, at least to me.

              "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

              M 1 Reply Last reply
              0
              • J jeron1

                Quote:

                Under this function, float type WORDS and size are defined .

                Do you mean "inside' this function? If so, do you know what is inside this function? Is this a library function for a certain MCU? If so, is there any documentation of this function? Your initial question is quite unclear, at least to me.

                "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

                M Offline
                M Offline
                Md Mubdiul Hasan
                wrote on last edited by
                #7

                Thank you. Did you see my second reply? I think this information is enough to understand what would be the function. This project is tied on QT5 with STM32 and TI DSP F2806x. widget.h Example File | Qt OpenGL[^] This project contains IAR,ECILPSE IDE. A display is added in ST slave, it has APP files. TCP server is involved here. Server is updating the information about DSP register. Its sending modebus Queue initiating this funtion,

                Quote:

                void CModebusTCP::OnReceived(BYTE *pData, int nSize)

                Under the function the variables are,

                Quote:

                void MakeGetStatusCMD(void) { WORD *pWord; float *pFloat; WORD Size; pWord = (WORD*)Uart1.TxData; pWord[0] = DSP_CMD_GETTATUS; pWord[1] = g_AdjustOutput; pWord[2] = g_RunMode; pWord[3] = g_Run;

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups