The invention discloses a power embedded RTOS-oriented lwIP
protocol stack implementation method and
system, and the method comprises the steps: calculating a
protocol stack initialization
resource allocation threshold according to hardware resource parameters of a power embedded RTOS; calculating a data packet priority
weight value according to a real-time requirement and a
protocol stack initialization
resource allocation threshold value; according to the priority
weight value of the data packet, calculating a module
cutting proportion, and carrying out lightweight
cutting on the core module of the lwIP protocol stack; a
data transmission scheduling priority value is calculated according to a protocol stack initialization
resource allocation threshold value, a module
cutting proportion and a data packet priority
weight value, and scheduling optimization is performed on power
data transmission; and according to the
data transmission scheduling priority value and the module cutting proportion, calculating a parameter adjustment value, and then dynamically adjusting the protocol stack operation parameters. According to the invention, the lwIP protocol stack can be always kept in an efficient and stable transmission state under different operation conditions of a power
system, and the method can be widely applied to the technical field of power.