The invention relates to a remote MCU
application layer state monitoring method. The method comprises the following steps: S1, defining parameters; s2, judging a channel type; s3, initializing a
serial port; s4, initializing a network port; s5, judging whether the current program is executed to a monitoring output function or not; s6, judging whether the current program is executed or not; s7, executing the residual function of the current program; s8, the monitoring output switch identification is judged, specifically, the monitoring output switch identification SendDebugFlag is read and judged, if the SendDebugFlag is equal to 1, output is shown, and the step S9 is continued; otherwise, not outputting, and returning to S5; s9, judging whether the channel type is determined or not: reading and judging a
monitoring data output channel type identifier ChannFlag, and if ChannFlag is equal to 1 or 2, continuing S10; otherwise, returning to S7; s10, outputting the
monitoring data: updating the output content of the monitoring point cache array DATA, reading a
monitoring data output channel type identifier ChannFlag, and if ChannFlag is equal to 1, calling a
serial port to send the monitoring
data content; if the ChannFlag is equal to 2, calling a network port to send the monitoring
data content; and after the sending is completed, returning to S5.