Embedded network applications is the inevitable outcome when the embeddeddevelopment going into the Internet age. QP platform (mainly based on the quantumframeworktechnology——QF)isrisingalongwiththehigherdemandinembeddedfield.The state machine(in QP called active object)is the introduction of the concept against thetraditionalflowtypeapplicationdevelopment,thefeaturesofembeddedfield.Quantum framework——QF is the core technical concepts of QP platform. It is theinfrastructure of a reusable, parallel execution state machine. It is an optimizedframework for professional use in the field of embedded real-time system. QF is based onactive object model, which model has many advantages in parallel execution, beyond thetraditional advantages in the use of thread. The mode of the active object (state machineobject) instance can be complicated by the implementation of each other through theinteractionsoftheeventinstanceincommunication.A reference to the state machine and in-depth, is a major feature of QP platform. Theimplementation of a hierarchical state machine, on function, is equivalent to the basicnature of the object-oriented, making the embedded development process become moreobject-oriented. The use of state and hierarchical concept has deepened the meaning ofproperty encapsulation and inheritance. It makes the application development based on theembedded QP in more modular. The nature of reusability and polymorphism, which is agoodtrend,itisatechnologicalrevolutioninthefieldofembeddedapplications.Active object based programming is usually changed from the traditionalmulti-threaded approach from, unlike traditional methods which focused on resourcesharing and synchronization mechanism concerned, it focused on the incorporation issue ofsegmentation solution idea, looking for the way to avoid the resource sharing, the minimaltraffic and segmentation solution, how to exchange events between objects of differentactivities. All of those are for the purpose of achieving a result which can minimize thecouplingbetweendifferentactiveobjectinstances.Broughtintoavoidtheissueofresourcesharing, the main strategy is to encapsulate the resources, the allocation of which iscontrolledbyspecializedactiveobject,inanactiveobjectinstances.In the framework of active object-based, QF plays an important role. It provides areal-time operating system abstraction layer service. It can be understood as a lightweightsoftware bus to carry out operations. QF also has the ability in extensions which caneffectively support for parallel execution; Based on QF, the software application development does not need the developer directly operate the critical area, the semaphoresor the other similar mechanisms. QF provides a fast, safe and reliable parallel softwarerunningmethod.SMTP functionality achieved in the two active objects (a hiberarchy state machineSMTPlwIPMGR and a hiberarchy state machine SMTPAO), in parallel execution model.Each packaged event has been used between instances for communication. This form ofcommunication is asynchronous communication. The implementation of each active objectpackages their own event queue. Through the registration system, active objects canregister themselves in the QF framework. At the same time, the definition of each activeobject carried out the way of event registration by the sense of its own interest (also a wayto register event through the P/S, publish/subscribe, way in QF). The state of an activeobject is showed in the way of a function pointer, and the state changing is by convertingfromthecurrentvalueofafunctionpointertoanother.The definition of SMTPlwIPMGR active object packaged not only the buffer a activeobject needed to run the event queue and related data, but also used to establish the lwIPsocket connection and associated transmission function interface. Thus, the active object,SMTPlwIPMGR, becomes a functional active object which used as an active object onlyfor the establishment of connection to the SMTP mail function. Each command signal, asSEND and WAIT, has been mapped into an independent state, using the idea of splitting aproblem which should have a continuous process of the implementation of the SMTPcommunication into an step-style. In this way, it makes the relationship more clearlybetweentheimplementationofcodeandtheSMTP communicationstatetransitionprocess.Thinking to another important meaning, thanks to the state native mode, when you need toadd additional functionality, developers needn't to change the original state oftransformationprocesses, oronlywithabitchangeinthestatetransitionprocess.Usingthesimilar methods to add the module inside the active object to add new functionalityrequired. On this basis, more in depth thinking, when need to add an additional state, onlyan interface maybe provided in the active object to communicate with the outside. Bythisway,themoreconvenientfeaturestoprovideaprogramextensionhadbeengot.Through the development of Web services, we get a successful implementation of themicrocontroller on the Web publishing. Further implementation of function, the data fromtemperature sensor can be Web published. It changes the way of data accept in concept.The traditional concept of accessing data from the embedded system needs to use specificapplications and specific communication connecters such as COM port communication orwireless communication, which often limited by physical factors.The merits immediatelyhighlighted as long as Web publishing. The data can be accessed anywhere the networkreached. Through Web page design, we can even send commands directly to themicrocontroller. This change not only brought a breakthrough in the method, but also afuture trend of MCU. More can we collect data from a remote wireless sensor network, which is associated, through a basic station, with a network. The TCP/IP lightweightimplementation in lwIP is working for the spread of embedded network devices to acatalystwithextensivepracticalmeaningsintheembeddednetworkapplications.Again back to QP platform, to understand the most distinctive point between QP andothers, is the concept of minimizing the code. It has the code-centric feature and thelow-level nature of application. The development based on QP can map the concept of astate diagram directly to the program code, without the need of uinge a graphical tool. QPplatform, than other platforms, does not need to use additional tools, also no need spendinga lot of time on configuration. As modular platform combination, the user can apply somepart of QP platform module to associate with other platform. This brings the platform witha simple transplantation nature, which improves the way of platform transplantationproblem of embedded application, in QP application development platform. Although cannot be as same as the ability of platform independence with Java Virtual Machine , but itsabilityin transplant, comparing the complexityrequired in the other platform, to have beengreatlyenhanced. |