--- title: Modeling Communication Topology ... > Back to [Intro]() So far, we have only considered failure of devices but now how they are connected. We only had > ![**Figure 1:** All functions optional to model function availability](/allFunctionsOptional.png) > ![**Figure 2:** All device nodes (DN) are made optional to model the possibility of failure](/deviceNodes.png) Now, we are adding a communication topology: > ![**Figure 3:** All connectors are made optional because they are not needed when a device fails](/communicationTopology.png) The camera and both lidars are connected directly to both vision processors using discrete connectors. The radar and all processors are connected via Ethernet. In our model, the functional analysis remains the same but we add a communication topology to the hardware architecture and extend the deployment of functional connectors to hardware connectors. ```clafer AutoPilot : System AP_FAA : FAA AP_HA : HardwareArchitecture AP_DN : DeviceNodeClassification visionProcessor1 : ECU ? [type = SmartDeviceNode] visionProcessor2 : ECU ? [type = SmartDeviceNode] algorithmProcessor1 : ECU ? [type = SmartDeviceNode] algorithmProcessor2 : ECU ? [type = SmartDeviceNode] frontDriverLidarSensor : DeviceNode ? [type = EEDeviceNode] frontPassengerLidarSensor : DeviceNode ? [type = EEDeviceNode] frontRadarSensor : DeviceNode ? [type = EEDeviceNode] frontCameraSensor : DeviceNode ? [type = EEDeviceNode] AP_CT : CommTopology frontCameraData1 : DiscreteDataConnector ? [endpoint = (frontCameraSensor, visionProcessor1)] frontCameraData2 : DiscreteDataConnector ? [endpoint = (frontCameraSensor, visionProcessor2)] frontDriverLidarData1 : DiscreteDataConnector ? [endpoint = (frontDriverLidarSensor, visionProcessor1)] frontDriverLidarData2 : DiscreteDataConnector ? [endpoint = (frontDriverLidarSensor, visionProcessor2)] frontPassengerLidarData1 : DiscreteDataConnector ? [endpoint = (frontPassengerLidarSensor, visionProcessor1)] frontPassengerLidarData2 : DiscreteDataConnector ? [endpoint = (frontPassengerLidarSensor, visionProcessor2)] ProcessingLayer : BusConnector ? [endpoint in (visionProcessor1, visionProcessor2, algorithmProcessor1, algorithmProcessor2, frontRadarSensor)] AP_Dpl : Deployment // nodes [AP_FAA.frontDriverLidar.deployedTo = AP_DN.frontDriverLidarSensor] [AP_FAA.frontPassengerLidar.deployedTo = AP_DN.frontPassengerLidarSensor] [AP_FAA.lidarProcessing.deployedTo in (AP_DN.visionProcessor1, AP_DN.visionProcessor2)] [AP_FAA.pointCloudClustering.deployedTo in (AP_DN.algorithmProcessor1, AP_DN.algorithmProcessor2)] [AP_FAA.frontRadar.deployedTo = AP_DN.frontRadarSensor] [AP_FAA.frontCamera.deployedTo = AP_DN.frontCameraSensor] [AP_FAA.dynamicObjectDetection.deployedTo in (AP_DN.algorithmProcessor1, AP_DN.algorithmProcessor2)] [AP_FAA.trajectoryPlanningAP.deployedTo in (AP_DN.algorithmProcessor1, AP_DN.algorithmProcessor2)] [AP_FAA.speedControl.deployedTo in (AP_DN.algorithmProcessor1, AP_DN.algorithmProcessor2)] // connectors [AP_FAA.frontDriverLidarVal.deployedTo.dref in (AP_CT.frontDriverLidarData1 , AP_CT.frontDriverLidarData2)] [AP_FAA.frontPassengerLidarVal.deployedTo.dref in (AP_CT.frontPassengerLidarData1 , AP_CT.frontPassengerLidarData2)] [AP_FAA.frontCameraVal.deployedTo.dref in (AP_CT.frontCameraData1 , AP_CT.frontCameraData2)] [AP_FAA.frontRadarVal.deployedTo.dref in (AP_CT.ProcessingLayer)] [AP_FAA.dynamicObjects.deployedTo.dref in (AP_CT.ProcessingLayer)] [AP_FAA.velocityProfile.deployedTo.dref in (AP_CT.ProcessingLayer)] ``` ```{.clafer .links} ``` ```{.clafer .ide} ``` > ![next](/next.png) [Modeling communication topology]() > Back to [Modeling FAA Re-configurations](model-faa-reconfig) > Back to [Intro]() ```clafer abstract FAA : FunctionalAnalysis frontDriverLidar : FunctionalDevice ? [implementation.hardware] [degradation = 1] [one output] frontPassengerLidar : FunctionalDevice ? [implementation.hardware] [degradation = 1] [one output] lidarProcessing : AnalysisFunction ? [implementation.software] [degradation = (if #input = 2 then 1 else 2)] [some input && one output] pointCloudClustering : AnalysisFunction ? [implementation.software] [degradation = 1] [some input && one output] frontRadar : FunctionalDevice ? [implementation.hardware] [degradation = 1] [one output] frontCamera : FunctionalDevice ? [implementation.hardware] [degradation = 1] [one output] dynamicObjectDetection : AnalysisFunction ? [implementation.software] [degradation = (if frontRadarVal && pointCloudCusterVal then 1 else if frontCameraVal && pointCloudCusterVal then 2 else 3)] [some input && one output] trajectoryPlanningAP : AnalysisFunction ? [implementation.software] [degradation = 1] [some input && one output] speedControl : AnalysisFunction ? [implementation.software] [degradation = 1] [some input] // Function Connectors frontDriverLidarVal : FunctionConnector ? [sender = frontDriverLidar && receiver = lidarProcessing] frontPassengerLidarVal : FunctionConnector ? [sender = frontPassengerLidar && receiver = lidarProcessing] compositePointCloud : FunctionConnector ? [sender = lidarProcessing && receiver = pointCloudClustering] frontRadarVal : FunctionConnector ? [sender = frontRadar && receiver = dynamicObjectDetection] frontCameraVal : FunctionConnector ? [sender = frontCamera && receiver = dynamicObjectDetection] pointCloudCusterVal : FunctionConnector ? [sender = pointCloudClustering && receiver = dynamicObjectDetection] dynamicObjects : FunctionConnector ? [sender = dynamicObjectDetection && receiver = trajectoryPlanningAP] velocityProfile : FunctionConnector ? [sender = trajectoryPlanningAP && receiver = speedControl] // Replacement constraints [no frontRadar => frontCamera] ``` The reference model remains unchanged. ```clafer abstract System abstract FeatureModel abstract Architecture abstract FunctionalAnalysis abstract HardwareArchitecture abstract DeviceNodeClassification abstract CommTopology abstract PowerTopology abstract Deployment abstract Feature abstract FunctionalAnalysisComponent deployedTo -> DeviceNode xor implementation hardware [deployedTo.type in (EEDeviceNode , SmartDeviceNode)] software [deployedTo.type in SmartDeviceNode] // connectors for which this function is the receiver input -> FunctionConnector * [this.receiver = parent] // connectors for which this function is the sender output -> FunctionConnector * [this.sender = parent] degradation -> integer [this >= 1 && this <= 3] // level 4 implies that the function is not available resultingDegradation -> integer = max (input.sender.resultingDegradation.dref, degradation.dref) abstract AnalysisFunction : FunctionalAnalysisComponent abstract FunctionalDevice : FunctionalAnalysisComponent abstract FunctionConnector sender -> FunctionalAnalysisComponent receiver -> FunctionalAnalysisComponent deployedTo -> HardwareDataConnector ? [this.parent in this.deployedFrom] [(sender.deployedTo.dref , receiver.deployedTo.dref) in (deployedTo.endpoint.dref)] [(sender.deployedTo.dref = receiver.deployedTo.dref) <=> no(this.deployedTo)] enum DeviceNodeType = SmartDeviceNode | EEDeviceNode | PowerDeviceNode abstract DeviceNode type -> DeviceNodeType abstract HardwareConnector abstract PowerConnector : HardwareConnector source -> DeviceNode sink -> DeviceNode abstract LoadPowerConnector : PowerConnector abstract DevicePowerConnector : PowerConnector abstract HardwareDataConnector : HardwareConnector endpoint -> DeviceNode 2..* deployedFrom -> FunctionConnector 1..* [this.deployedTo = this.parent] abstract DiscreteDataConnector : HardwareDataConnector abstract AnalogDataConnector : HardwareDataConnector abstract BusConnector : HardwareDataConnector [all e : endpoint | e.type = SmartDeviceNode] xor type LowSpeedCAN HighSpeedCAN LIN FlexRay abstract LogicalBusBridge : HardwareDataConnector bus -> BusConnector 2..2 [all e : this.endpoint | e.type = SmartDeviceNode] // Automotive Concepts abstract ECU : DeviceNode ```