1.4.3.36 PAL_GetMsgDuration Function

C

uint8_t PAL_GetMsgDuration(uint16_t pch, uint16_t length, PAL_SCHEME scheme,
    PAL_FRAME frameType, uint32_t *duration);

Summary

Get message duration.

Description

This function is used to calculate the message duration.

Precondition

The PAL_Initialize function should have been called before calling this function.

Parameters

ParametersDescription
pchPhysical channel
msgLenMessage length
schemeModulation scheme of message
frameTypeIndicates if the message to transmit is type A, type B or type BC
durationPointer to message duration in µs (output)

Returns

  • PAL_CFG_SUCCESS: If successful
  • PAL_CFG_INVALID_INPUT: If unsuccessful

Example

 
    uint32_t duration = 0;
    uint16_t pch = 16;
    uint16_t msgLen = 30;
    PAL_SCHEME scheme = PAL_PLC_DBPSK_R;
    PAL_FRAME frameType = PAL_MODE_TYPE_B;
    uint8_t result=PAL_CFG_SUCCESS;

    result = PAL_GetMsgDuration(pch, msgLen, scheme, frameType, &duration);

Remarks

None.