5.1.59. J1939 parameter group requested (pj1939_PgRequested)

Determine whether a Parameter Group (PG) has been requested by another J1939 network node.

5.1.59.1. Supported targets

All targets

5.1.59.2. Required license

None (Main library). (See Section 2.3, “Licensed Features”.)

5.1.59.3. Description

The pj1939_PgRequested block captures all J1939/21 Request PGN messages directed at the ECU and determines if the model must respond to any of them. If the model is configured to do so (by use of this block), then the model must implement an appropriate action or response. If the model is not configured to do so, then the ECU will respond with a NACK (if it is appropriate to do so).

The PGN to match against any J1939 request message, is specified by parameters PDU datapage, PDU format and PDU specific. If a matching PGN has been requested, then the outport requested is set to 1. The PGN must not be duplicated in more than one pj1939_PgRequest block.

Requests for DM1, DM2, DM3, DM4, DM5, DM6, DM11, DM12, DM20, DM21, DM23, DM24, DM25, DM26, DM27, DM28, DM29, DM31, DM32, DM34, DM41, DM42, DM43, DM44, DM45, DM46, DM47, DM48, DM49, DM50, DM51 and DM52 messages are handled by the model using this block. The application modeller must then provide the necessary logic to handle the request using the corresponding pdtc_ClearAllIfActive, pdtc_ClearAllIfInactive, pj1939_Dm1Transmit, pj1939_Dm2Transmit, pj1939_Dm4Transmit, pj1939_Dm5Transmit, pj1939_Dm8Transmit, pj1939_Dm10Transmit, pj1939_Dm20Transmit, pj1939_Dm21Transmit, pj1939_Dm24Transmit, pj1939_Dm25Transmit, pj1939_Dm26Transmit, pj1939_Dm30Transmit, pj1939_Dm32Transmit, pj1939_Dm34Transmit, and pj1939_TransmitDtcDm blocks.

5.1.59.4. Inports

  • sim_requested

    Simulation value for the inport requested.

    Value type:Boolean
    Calibratable:No
  • sim_source_addr

    Simulation value for the inport source_addr.

    Value type:Integer
    Calibratable:No
  • sim_dest_addr

    Simulation value for the inport dest_addr. Available only if the parameter PDU format is less than 240.

    Value type:Integer
    Calibratable:No
  • sim_timestamp

    The simulation value for the outport timestamp. Available only if the mask parameter Provide timestamp is selected.

    Value type:Integer

5.1.59.5. Outports

  • requested

    Set to 1 if the pgn defined by the parameters PDU datapage, PDU format and PDU specific matches a request message.

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No
  • source_addr

    The source J1939 network address of the request message.

    Range: [0, 253] or 255

    Value type:Integer
    Calibratable:No
  • dest_addr

    The destination J1939 network address of the request message. Available only if the parameter PDU format is less than 240.

    Range: [0, 253] or 255

    Value type:Integer
    Calibratable:No
  • timestamp

    The time when the last valid message was received. Strictly this gives the time when the message was assembled from the possibly multiple CAN packets, and has a resolution of 50 ms. The timestamp is a free-running microsecond timer that wraps to zero approximately every 70 minutes. Available only if the mask parameter Provide timestamp is selected.

    Range: [0, 4294967295] us

    Value type:Integer

5.1.59.6. Mask parameters

  • J1939 Channel

    The logical J1939 channel on which the request will arrive. Must be a channel declared with a pj1939_ChannelConfiguration block.

    Value type:Integer
    Calibratable:No
  • PDU datapage

    The pdu datapage value of the PGN to match against a J1939 request message.

    Range: 0 or 1

    Value type:Integer
    Calibratable:No
  • PDU format

    The pdu format value of the PGN to match against a J1939 request message.

    Range: [0, 255]

    Value type:Integer
    Calibratable:No
  • PDU specific

    The pdu specific value of the PGN to match against a J1939 request message. If the PDU format parameter is less than 240, then this parameter is not available for editing and does not form part of the PGN.

    Range: [0, 255]

    Value type:Integer
    Calibratable:No
  • Sample time

    The periodicity of the block execution.

    Range: [0.001, 3600] seconds

    Value type:Real
    Calibratable:No
  • Provide timestamp

    If selected then inport sim_timestamp and outport timestamp are made available.

    Value type:Boolean
    Calibratable:No

5.1.59.7. Notes

None.