Real-Time Systems. Design Principles for Distributed Embedded Applications. Herman Kopetz. Second Edition (811374), страница 32
Текст из файла (страница 32)
The TDI is intended for the person who has a deep understanding of the component internals. The TDI is of no relevance for the user of theLIF services of the component or the system engineer who configures a component.The precise specification of the TDI depends on the technology of the componentimplementation, and will be different if the same functionality of a component isrealized by software running on a CPU, by an FPGA or by an ASIC.4.4.5Local InterfacesThe local interfaces establish a connection between a component and its outsideenvironment, e.g., the sensors and actuators in the physical plant, the human operator, or another computer system. A component that contains a local interface iscalled a gateway component or an open component, in contrast to a component thatdoes not contain a local interface, which is called a closed component.
The distinction between open and closed components is important from the point of view of thespecification of the semantics of the LIF of the component. Only closed componentscan be fully specified without knowing the context of use of the component.From the point of view of the cluster LIF, only the timing and the semanticcontent, i.e., the meaning of the information exchanged across a local interface is ofrelevance, while the detailed structure, naming, and access mechanisms of the localinterface is intentionally left unspecified at the cluster level.
A modification of thelocal access mechanisms, e.g., the exchange of a CAN Bus by Ethernet, will nothave any effect on the LIF specification, and consequently on the users of the LIFspecification, as long as the semantic content and the timing of the relevant dataitems are the same (see also the principle of abstraction in Sect. 2.5).Example: A component that calculates a trigonometric function is a closed component. Itsfunctionally can be formally specified. A component that reads a temperature sensor is anopen component. The meaning of temperature is application specific, since it depends onthe position where the sensor is placed in the physical plant4.5Gateway ComponentViewed from the perspective of a cluster, a gateway component is an open component that links two worlds, the internal world of the cluster and the external world ofthe cluster environment. A gateway component acts as a mediator between these two964 Real-Time Modellocalinterfacecontrolledobject(outer world)localinterfaceoperator(outer world)localinterfaceanothercomputer (outer world)gatewaycomponentgatewaycomponentgatewaycomponentLIFmessageinterfaceLIFmessageinterfaceLIFmessageinterfaceclusterinterclustercommunicationsystemFig.
4.7 Gateway components between the LIF and the local external world interfaceworlds. It has two operational interfaces, the LIF message interface to the clusterand the local interface to the external world, which can be the physical plant, aman–machine interface, or another computer system (Fig. 4.7). Viewed from theoutside of a cluster, the role of the interfaces is reversed. The previous local interfacebecomes the new LIF and the previous LIF becomes the new local interface.4.5.1Property MismatchesEvery system is developed according to an architectural style, i.e., a set of adoptedrules and conventions for the concept formation, representation of data, naming,programming, interaction of components, semantics of the data, and many more.The architectural style characterizes the properties of the entities that represent thedesign.
The details of the architectural style are sometimes explicitly documented,but more often only implicitly followed by the development team, reflecting theunstated conventions that govern the development community (see also the lastparagraph of Sect. 2.2.4).Whenever a communication channel links two systems, developed by twodifferent organizations, it is highly probable that some of the properties of themessages that are exchanged across this channel are in disagreement. We call anydisagreement in a property of the data or the protocol between the sender and thereceiver of a message a property mismatch. It is up to a gateway component toresolve property mismatches.Example: Assume that there is a difference in endianness, i.e., the byte ordering of data,between the sender and the receiver of a message.
If the sender assumes big endian, i.e., themost significant byte is first, and the receiver assumes little endian, i.e., the least significantbyte is first, then this property mismatch has to be resolved either by the sender, or by thereceiver, or by an intermediate connector system, i.e., the gateway component.Property mismatches occur at the borders where systems interact, not inside awell-designed system. Inside a system, where all partners respect the rules andconstraints of the architectural style, property mismatches are normally no issue.4.5 Gateway Component97Property mismatches should be resolved in the gateway components that link twosystems in order to maintain the integrity of the architectural styles within eachof the interacting subsystems.4.5.2LIF Versus Local Interface of a Gateway ComponentAs noted before, the set of related components that form a cluster share a commonarchitectural style at their cluster LIFs.
This means that property mismatchesamong LIF-cluster messages are rare.This is in contrast to the messages that cross a gateway component. Thesemessages come from two different worlds that are characterized by two differentarchitectural styles. Property mismatches, syntactic incompatibility, incoherentnaming, and differences in representation between these two sets of messages arethe rule rather than the exception. It is the main task of a gateway component totranslate the architectural style of one world to the architectural style of the otherworld without changing the semantic content of the message variables.There are situations when the architectural styles of the two interfacing worldsare based on a different conceptualization of reality.
i.e., there are not onlydifferences in the names and the representations of the same concepts (as shownin the example in Sect. 2.2.4), but the concepts themselves, i.e., the semanticcontents are dissimilar.Viewed from a given cluster, the gateway component hides the details of theexternal world (the local interface) from the standardized message formats withinthe computational cluster and filters the incoming information: only the informationthat is relevant for the operation of the cluster under consideration is exposed in theform of cluster-standard messages at the cluster LIF of the gateway component.An important special case of an external-world interface is a process I/Ointerface, which establishes a link between the cyber world and the physicalworld. Table 4.2 depicts some of the differences between the LIF messages and aprocess control I/O interface to the physical plant.Table 4.2 Characteristics of a LIF versus a local process I/O interfaceCharacteristicLocal process I/O interfaceLIF message interfaceInformationUnique, determined by the givenUniform within the whole clusterRepresentationphysical interface deviceCodingAnalog or digital, uniqueDigital, uniform codesTime-baseDenseSparseInterconnectionOne-to-oneOne-to-manyPatternCouplingTight, determined by the specificWeaker, determined by the LIFhardware requirements and themessage communicationI/O protocol of the connectedprotocoldevice984 Real-Time ModelFig.
4.8 Standardized LIFversus concrete MMIimportant incoming messageinput messagereaction messageman-machine interface(view, sound)cluster LIFstandardized messagesExample: In the external world of a process plant the value of the process variabletemperature may be coded in an analog 4–20 mA sensor signal, where 4 mA means 0%and 20 mA means 100% of the selected measurement range, i.e., between 0 and 100 C.This analog representation must be converted to the standard representation of temperaturethat has been defined in the architectural style of the given cluster, which might be degreesKelvin.Example: Let us look at an important interface, the man–machine interface (MMI), inorder to distinguish between the local interface and the LIF message interface of a gatewayMMI component (Fig.
4.8). At the level of architectural modeling, we are not interested inthe representational details of the local external world interface, but only in the semanticcontent and temporal properties of the message variables at the LIF message interface. Animportant message is sent to the MMI component. It is somehow relayed to the operator’smind. A response message from the operator is expected within a given time interval at theLIF message interface.
All intricate issues concerning the representation of the informationat the graphic user interface (GUI) of the operator terminal are irrelevant from the point ofview of architecture modeling of the interaction patterns between the operator and thecluster. If the purpose of our model were the study of human factors governing the specificman–machine interaction, then the form and attributes of the information representation atthe GUI (e.g., shape and placement of symbols, color, and sound) would be relevant andcould not be disregarded.A gateway component can link two different clusters that have been designed bytwo different organizations using two different architectural styles.
Which one ofthe two interfaces of such a gateway component is considered the LIF and whichone is the local interface depends on the view taken. As already mentioned, if wechange the view, the LIF becomes the local interface and the local interfacebecomes the LIF.4.5.3Standardized Message InterfaceTo improve the compatibility between components designed by different manufacturers, to enhance the interoperability of devices, and to avoid property mismatches,some international standard organizations have attempted to standardize messageinterfaces.