Esempio n. 1
0
STATIC void A6(void)
#endif /* KSTACK_MEMORY_MAPPING */
{
    KnxMSG_BufferPtr pBuffer;

/*
**      Send a N_Data_Individual.req with T_DISCONNECT_REQ_PDU, priority = SYSTEM,
**      destination = connection_address, sequence = 0 to the network layer (remote device).
*/

    pBuffer = KnxMSG_AllocateBuffer();

    if (pBuffer != (KnxMSG_BufferPtr)NULL) {
        T_Disconnect_Req(pBuffer, KnxADR_GetPhysAddr(), KnxTLC_GetConnectionAddress());
    } else {
        /* Errorhandling. */
    }

/* Send a T_Disconnect.ind to the user. */
    if (KnxMSG_ScratchBufferPtr == (KnxMSG_BufferPtr)NULL) {
        KnxMSG_ScratchBufferPtr = KnxMSG_AllocateBuffer();
    } else {
        (void)KnxMSG_ClearBuffer(KnxMSG_ScratchBufferPtr);
    }

    T_Disconnect_Ind(KnxMSG_ScratchBufferPtr, KnxADR_GetPhysAddr(), KnxTLC_GetConnectionAddress());

    StopAcknowledgementTimeoutTimer();
    StopConnectionTimeoutTimer();
}
STATIC void A6(void)
#endif /* KSTACK_MEMORY_MAPPING */
{
    KnxMsg_Buffer * pBuffer;

/*
**      Send a N_Data_Individual.req with T_DISCONNECT_REQ_PDU, priority = SYSTEM,
**      destination = connection_address, sequence = 0 to the network layer (remote device).
*/

    DBG_PRINTLN("A6()");

    KnxMsg_AllocateBuffer(&pBuffer);

    if (pBuffer != (KnxMsg_Buffer *)NULL) {
        T_Disconnect_Req(pBuffer, KnxTlc_GetSourceAddress(), /* KnxADR_GetPhysAddr(), */ KnxTlc_GetConnectionAddress());
    } else {
        /* Errorhandling. */
    }

    /* Send a T_Disconnect.ind to the user. */
    /* Handled by callback. */
//#if 0
    if (KnxMsg_ScratchBufferPtr == (KnxMsg_Buffer *)NULL) {
        KnxMsg_AllocateBuffer(&KnxMsg_ScratchBufferPtr);
    } else {
        (void)KnxMsg_ClearBuffer(KnxMsg_ScratchBufferPtr);
    }

    T_Disconnect_Ind(KnxMsg_ScratchBufferPtr, KnxTlc_GetSourceAddress(), /* KnxADR_GetPhysAddr(), */ KnxTlc_GetConnectionAddress());
//#endif

    KnxTlc_StopAcknowledgementTimeoutTimer();
    KnxTlc_StopConnectionTimeoutTimer();
}
Esempio n. 3
0
STATIC void A5(void)
#endif /* KSTACK_MEMORY_MAPPING */
{
    /* Send a T_Disconnect.ind to the user. */
    (void)KnxMSG_ClearBuffer(KnxMSG_ScratchBufferPtr);
    T_Disconnect_Ind(KnxMSG_ScratchBufferPtr, KnxTLC_GetConnectionAddress(), KnxADR_GetPhysAddr());

    StopAcknowledgementTimeoutTimer();
    StopConnectionTimeoutTimer();
}