pps_encoder_add_from_decoder()

Updated: October 26, 2022

Add part or all of the contents of a decoder to an encoder

Synopsis:

#include <sys/pps.h>
            
pps_encoder_error_t pps_encoder_add_from_decoder(
                                    pps_encoder_t *encoder, 
                                    const char *name, 
                                    pps_decoder_t *decoder, 
                                    const char *propName);

Arguments:

encoder
A pointer to the PPS encoder structure.
name
If the current node is an object, the name of the new attribute. If within an array, this must be NULL.
decoder
A pointer to the PPS decoder structure.
propName
The name of the property to add from the decoder. If NULL, this function adds the node at the current position in the decoder.

Library:

libpps

Description:

The function pps_encoder_add_from_decoder() adds part or all of the contents of a PPS decoder to a PPS encoder. This allows data previously decoded to be encoded again. Upon completion of the call the decoder is left in the same state as at the time of the call.

Returns:

PPS_ENCODER_OK
Success.
>=1
An error occurred. See pps_decoder_error_t.
Note: The status is sticky. If a call to encode something fails, all subsequent calls will show failure until the encoder is reset.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes