Menu

#48 Implement message data unicast retry protocol

1.2.0.0
closed
mike
None
2014-10-31
2014-07-17
Bernd Löhr
No

The standard states (new, as proposed for 61375-2-3 FDIS) that missing replies to a request should lead to resending the request within a specified time and specified retries count. This has already been proposed in an earlier version of the draft - but has since then been abandoned.
Now the requests should be repeated (and the sequence counter incremented) if a reply was not received within a defined timeout value. By incremented sequence counter the replier can detect if the first request was lost or the reply.

61375-2-3 chapter A.7.7.1:
If the reply timeout timer of the call session expires because of a missing reply and the number of expected repliers is 1, the TRDP layer shall repeat the request up to two times before it notifies the TRDP user (caller) about the missing reply and closes the call session.

Comment:

  • tlm_request() needs an additional parameter maxNumRetries
  • in case of number repliers == 1 and numRetriesMax > 0 the reply timeout for each try shall be replyTimeout/numRetriesMax
  • in MD_ELE_T numRetries and numRetriesMax are already existing

Related

Tickets: #64

Discussion

  • Armin-Hagen Weiss

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,2 +1,11 @@
     The standard states (new, as proposed for 61375-2-3 FDIS) that missing replies to a request should lead to resending the request within a specified time and specified retries count. This has already been proposed in an earlier version of the draft - but has since then been abandoned.
     Now the requests should be repeated (and the sequence counter incremented) if a reply was not received within a defined timeout value. By incremented sequence counter the replier can detect if the first request was lost or the reply.
    +
    +
    +61375-2-3 chapter A.7.7.1:
    +If the reply timeout timer of the call session expires because of a missing reply and the number of expected repliers is 1, the TRDP layer shall repeat the request up to two times before it notifies the TRDP user (caller) about the missing reply and closes the call session.
    +
    +Comment:
    +- tlm_request() needs an additional parameter maxNumRetries
    +- in case of number repliers == 1 and numRetriesMax > 0 the reply timeout for each try shall be replyTimeout/numRetriesMax
    +- in MD_ELE_T numRetries and numRetriesMax are already existing
    
     
  • Armin-Hagen Weiss

    • assigned_to: mike
     
  • Armin-Hagen Weiss

    maxNumRetries to be added in tlm_request():

    Name tlm_request
    Synopsis C
    TRDP_ERR_T tlm_notify(
    TRDP_APP_T appHandle,
    void pUserRef,
    TRDP_MD_CALLBACK_T pfCbFunction,
    TRDP_UUID_T
    pSessionId
    UINT32 comId,
    UINT32 etbTopoCnt,
    UINT32 opTrnTopoCnt,
    TRDP_IP_ADDR_T srcIpAddr,
    TRDP_IP_ADDR_T dstIpAddr,
    TRDP_FLAGS_T pktFlags,
    UINT32 numReplies,
    UINT32 replyTimeout,
    UINT32 maxNumRetries,
    const TRDP_SEND_PARAM_T pSendParam,
    const UINT8
    pData,
    UINT32 dataSize,
    const TRDP_URI_USER_T srcURI,
    const TRDP_URI_USER_T destURI);
    Synopsis C++
    TRDP_ERR_T tlm::notify (
    void pUserRef,
    TRDP_MD_CALLBACK_T pfCbFunction,
    TRDP_UUID_T
    pSessionId
    UINT32 comId,
    UINT32 etbTopoCnt,
    UINT32 opTrnTopoCnt,
    TRDP_IP_ADDR_T srcIpAddr,
    TRDP_IP_ADDR_T destIpAddr,
    TRDP_FLAGS_T pktFlags,
    UINT32 numReplies,
    UINT32 replyTimeout,
    UINT32 maxNumRetries,
    const TRDP_SEND_PARAM_T pSendParam,
    const UINT8
    pData,
    UINT32 dataSize,
    const TRDP_URI_USER_T srcURI,
    const TRDP_URI_USER_T destURI);
    Abstract Send a MD request message.

    Parameters
    appHandle (C) Handle returned by tlc_openSession()
    pUserRef User reference value. Can be used by the application to connect the report of
    the communication result with the call. The same value will be reported back
    by the TRDP when the result is reported back to the application.
    pfCbFunction Request specific callback function, set NULL if not used.
    pSessionId Pointer to the session identifier given back by this call
    ComId ComId of the data set
    etbTopoCnt Valid ETB topo count, 0 for local consist communication, mandatory for
    trainwide communication
    opTrnTopoCnt Valid operational train topo count, optional for trainwide communication
    srcIpAddr Source IP address. Typically set by TRDP stack.
    dstIpAddr Destination IP Address. Used to override any configured destination IP
    address for the ComId. Set 0 if not used.
    pktFlags OPTIONS: TRDP_FLAGS_DEFAULT, TRDP_FLAGS_MARSHALL, TRDP_FLAGS_TCP
    Note: using TRDP_FLAGS_DEFAULT the flags specified in the default MD
    configuration are used
    Note: using TRDP_FLAGS_TCP instead of a UDP request a TCP request will be
    sent out
    numReplies number of expected replies, 0 if unknown
    replyTimeout timeout for reply in microseconds
    maxNumRetries maximum number of retries (0 … 2)
    Note: If retries are selected, the timeout at application layer can be up to
    (maxNumRetries + 1)*replyTimeout
    pSendParam Pointer to optional send parameters QoS and TTL. Set NULL to use default
    parameters.
    pData Pointer to data to be sent
    dataSize Number of data bytes to send
    srcURI Pointer to the source IP address unique user part of the source URI string.
    It will override any configured source URI for the ComId.
    The user part of the source URI string is sent in the MD protocol header.
    Set to NULL if not used.
    Note: The host part can be created at destination side out of the srcIpAddr
    Syntax of a complete URI string: [user][@host].
    destURI Pointer to the user part of the destination URI string
    Used to define the destination URI string used to override any configured
    destination URI for the ComId.
    The user part of the destination URI string is sent in the MD protocol
    header. Set to NULL if not used.
    Note: The host part can be created at destination side out of the destIpAddr
    Syntax of a complete URI string: [user][@host].

    Returns C 0 if ok, !=0 if error, see chapter 12.1

    Returns C++ 0 if ok, if error exception thrown, see chapter 12.1.

     
  • mike

    mike - 2014-10-10

    API extension for the lib done in [r1338]

     

    Related

    Commit: [r1338]

  • mike

    mike - 2014-10-10

    API alignment within the test src folder in [r1339] - please check the changes for impact on your intended test scenario!

     

    Related

    Commit: [r1339]

  • mike

    mike - 2014-10-13

    mdcom now uses the new parameter for MR see [r1340]

     

    Related

    Commit: [r1340]

  • mike

    mike - 2014-10-15

    Small testbinaries added by [r1344] - work with Makefile committed in [r1343].
    MS Visual Studio solution gets extended by seperate commit

     

    Related

    Commit: [r1343]
    Commit: [r1344]

  • mike

    mike - 2014-10-31
    • status: open --> pending
     
  • mike

    mike - 2014-10-31

    Closing this ticket - will need to get reopened, if there should be an issue with this feature.

     
  • mike

    mike - 2014-10-31
    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB