implementing a forte networkimplementing a forte network layer · receive data (()1)...
TRANSCRIPT
![Page 1: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/1.jpg)
Implementing a FORTE networkImplementing a FORTE network Layer
LEADINGINNOVATIONS
![Page 2: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/2.jpg)
Overview
What is the problem?What is the problem?Configurable Network FBsLayer Design PatternLayer Design PatternConfiguration StringClass DiagramClass DiagramInterface in C++Open/Close/Send/ReceiveOpen/Close/Send/Receive
Page 2
![Page 3: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/3.jpg)
What is the Problem?
IEC 61499 Compliance Profile for Feasibility DemonstrationsIEC 61499 Compliance Profile for Feasibility Demonstrations only defines ASN.1 and TCP/UDP as network protocol
Changing the network protocol in an IEC-61499 FB-Network
Configuring the Network-FB with the 4DIAC-IDE (in future)
Implementing a new Network Layer for the FORTE
Page 3
![Page 4: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/4.jpg)
Configurable Network FBsg
Network FBs are configured when initialized; network protocolNetwork-FBs are configured when initialized; network protocol is not associated with FB-type
Use layer design pattern to improve reusability of protocolsImplement Serialization onceImplement Network access onceImplement Network access onceImplement data encryption once
New protocols only have to implement one layer lessNew protocols only have to implement one layer, less knowledge about FB-execution is needed
Page 4
![Page 5: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/5.jpg)
Layer Design Patterny g
Network FB Top LayerNetwork FB p y
Middle Layer
Middle Layer
…
Bottom Layer
Network
Page 5
![Page 6: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/6.jpg)
Configuration Stringg g
Every layer is configured independently from other layers atEvery layer is configured independently from other layers, at least one layer has to be specified
layer: string to identify the protocolparameter: vendor specific stringparameter: vendor specific stringID: {protocol[parameter].}protocol[parameter]
Example:Fbdk[].ip[255.0.0.50:61499]
Page 6
![Page 7: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/7.jpg)
Class Diagram (1)g ( )
Function BlockFunction BlockCan be called to process an interruptUses the LayerManager to create the layer StackHas one or more layers which can be used to send/receive dataHas one or more layers which can be used to send/receive data
LayerManagerKnows all available LayersC t L d i iti li thCreates Layers and initializes them
LayerCan be opened, closedp ,Can send/receive dataCan call the FB to change from interrupt-Thread to FB-Execution-Thread
Page 7
![Page 8: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/8.jpg)
Class Diagram(2)g ( )
Function Block Layer
InterruptopenConnectionopenConnectioncloseConnectionsendDatarecvData
LayersManager
createCommunicationLayer
Layer 1 Layer2
Page 8
![Page 9: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/9.jpg)
Interface in C++
EComResponse openConnection (char *pa_acLayerParameter)D di th l f ti lit diff t thi h t b f d hDepending on the layers functionality different things have to be performed here. This can range from doing nothing to establishing an TCP session.
void closeConnection ()Implementations of this function should perform the actions necessary for closing thelayer and than call the closeConnection() of the bottom layer.
EComResponse sendData (void *pa pvData, unsigned int pa unSize)EComResponse sendData (void pa_pvData, unsigned int pa_unSize)If necessary invoke bottom layer sendData functions.
EComResponse recvData (const void *pa_pvData, unsigned int pa_unSize)Thi f ti i ll d f i th i d d t f b tt t t Th f ifThis function is called for processing the received data from bottom to top. Therefore, if necessary invoke the top layer‘s receiveData function to hand on the processed data.
void interrupt (IComCallback *pa_poComLayer)Request process invokation from function block When this function is called the function block willRequest process invokation from function block. When this function is called, the function block will call recvData to process the new recieved data.
Page 9
![Page 10: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/10.jpg)
Open Connection (1)p ( )
Network FBNetwork-FBgets event to open connectionCalls Layer Manager to create and initialize all Layers
Layer ManagerCreates Layer and initializes it with the configuration stringGoes from Top-Layer to Bottom-Layer
LayerDoes not know anything about other layers
Page 10
![Page 11: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/11.jpg)
Open Connection (2)
Function Block
Layer1[conf1]. Layer2[conf2].Layer3[conf3]
Layer
Function Block
Request Create
y
Layer
Create and Open Connection
LayerManager Layer
L
LayerManagerCreate and Open Connection
Layer
Open ConnectionCreate and Open Connection
Network
Page 11
![Page 12: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/12.jpg)
Close Connection (1)( )
Network FBNetwork-FBgets event to close connectionSends Top-Layer to close the connection
LayerClean up own dataHas to close underneath Layer before or after clean up
Bottom-LayerClean up own dataHas to close physical network connectionHas to close physical network connection
Page 12
![Page 13: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/13.jpg)
Close Connection (2)( )
Function Block
Layer
Close and Destroy
Layer
Layer
Close and Destroy
Layer
Close and Destroy
Layer
Close and Destroy
Network
Page 13
![Page 14: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/14.jpg)
Send Data
Network-FBgets event to send Datacalls Top-Layer: Layer will get a list of FB-Inputs
Top-LayerTop-LayerSerializes data from FB-InputsSends data to Middle-Layer
Middl LMiddle-LayerCan process data: e.g. encryption, compressionCan add a header to dataS d d t t Middl L B tt LSends data to Middle-Layer or Bottom-Layer
Bottom-LayerSends data to physical network
Page 14
![Page 15: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/15.jpg)
Send Data
Function BlockInput 1Input 2
Serialized Data-block
Layer
p
Header
Serialized Data block
Layer
LayerSerialized Data-block
HeaderHeader
Serialized Data-block
Network
Page 15
![Page 16: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/16.jpg)
Receive Data (1)( )
Physical-Network (network-Thread)Receives new data from NetworkInforms Bottom-LayerWaits until data are fetched from Bottom-Layer
Bottom-LayerIs informed from Physical layer (network-Thread)Is informed from Physical layer (network-Thread)Asks FB for execution (network-Thread)Will be called by FB (fb-Thread)Gets Data from Network and relays data to above layer (fb-Thread)
Ab LAbove-LayerHas to decode, decrypt, uncompress data and calls above layer
Top-LayerWrites data do network-FBWrites data do network FBAsks FB to send Event
Network-FBDispatches interrupt request from Layer, needed to change thread-contextS d t t d f LSends event requested from Layer
Page 16
![Page 17: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/17.jpg)
Receive Data (2)( )
Function Block Output 1Output 2
Serialized Data-blockLayer
Output 2
Depatch
Header
Serialized Data blockLayer Interrupt
epatc
LayerSerialized Data-block
HeaderHeader
Serialized Data-block
Network
InterruptDepatch
Page 17
![Page 18: Implementing a FORTE networkImplementing a FORTE network Layer · Receive Data (()1) ÀPhysical-Network (network-Thread) ÀReceives new data from Network ÀInforms Bottom-Layer ÀWaits](https://reader033.vdocuments.us/reader033/viewer/2022052804/5f8b750a5802ac46cf71031d/html5/thumbnails/18.jpg)
Thanks for your attention!
Contact SpeakerpMichael HofmannPROFACTOR GmbHIm Stadtgut A24407 Steyr Gleink AUSTRIA4407 Steyr-Gleink, [email protected]