Commit eb085c0a authored by berge's avatar berge
Browse files

Fixed cf04.

Added f_startBeingNeighbour() and f_stopBeingNeighbour()
parent 38dc064a
Loading
Loading
Loading
Loading
+87 −75
Original line number Diff line number Diff line
@@ -265,13 +265,11 @@ module LibItsGeoNetworking_Functions {
        function f_cf04Down(in ItsNt p_nodeA, in ItsNt p_nodeB, in ItsNt p_nodeC, in ItsNt p_nodeD) runs on ItsMtc {
            
            // Map
            unmap(p_nodeA:geoNetworkingPort, system:geoNetworkingPort);
            unmap(p_nodeB:geoNetworkingPort, system:geoNetworkingPort);
            unmap(p_nodeC:geoNetworkingPort, system:geoNetworkingPort);
            unmap(p_nodeD:geoNetworkingPort, system:geoNetworkingPort);
            
            // Connect
            disconnect(p_nodeA:syncPort, self:syncPort);
            disconnect(p_nodeB:syncPort, self:syncPort);
            disconnect(p_nodeC:syncPort, self:syncPort);
            disconnect(p_nodeD:syncPort, self:syncPort);
@@ -288,6 +286,25 @@ module LibItsGeoNetworking_Functions {
            
        } // end f_initialiseComponent
        
        function f_startBeingNeighbour() runs on ItsNt {
            
            activate(a_neighbourDefault());
            f_taStartBeaconing(
                m_beaconHeader(
                    f_getPosition(vc_positionTable, vc_componentName)
                )
            );    
            
        } // end f_startBeingNeighbour
        
        function f_stopBeingNeighbour() runs on ItsNt  {
            
            f_taStopBeaconing(vc_componentName);
            deactivate; // FIXME: probably too brutal
            activate(a_default());
            
        } // end f_stopBeingNeighbour
        
    } // end geoConfigurationFunctions
    
    group geoPositionFunctions {
@@ -495,12 +512,7 @@ module LibItsGeoNetworking_Functions {
        }
        
        function f_prNeighbour() runs on ItsNt {
            activate(a_neighbourDefault());
            f_taStartBeaconing(
                m_beaconHeader(
                    f_getPosition(vc_positionTable, vc_componentName)
                )
            );            
            f_startBeingNeighbour();        
        }
        
        /**
@@ -592,7 +604,7 @@ module LibItsGeoNetworking_Functions {
        }
        
        function f_poNeighbour() runs on ItsNt {
            f_taStopBeaconing(vc_componentName);
            f_stopBeingNeighbour();
            f_poDefault();           
        }