#include "deployment.h"
#include "gtypes.h"
#include "subprograms.h"
#include <arinc653/sampling.h>
#include <arinc653/time.h>
#include <arinc653/types.h>
#include <errno.h>
/*****************************************************/
/*  This file was automatically generated by Ocarina */
/*  Do NOT hand-modify this file, as your            */
/*  changes will be lost when you re-run Ocarina     */
/*****************************************************/
/*  Periodic task : thr*/
pingpong__integer pr2_pdatain_dvalue;
extern SAMPLING_PORT_ID_TYPE pr2_pdatain_id;

/**************/
/* thr_job   */
/*************/

void *thr_job() {
  pingpong__integer pr2_pdatain_dvalue;

  RETURN_CODE_TYPE ret;
  VALIDITY_TYPE pr2_pdatain_valid;
  MESSAGE_SIZE_TYPE pr2_pdatain_length;
  while (1) {
    /*  Get the IN ports values*/
    READ_SAMPLING_MESSAGE(pr2_pdatain_id, &(pr2_pdatain_dvalue),
                          &(pr2_pdatain_length), &(pr2_pdatain_valid), &(ret));
    /*  Call implementation*/
    pingpong__hello_part2(pr2_pdatain_dvalue);
    PERIODIC_WAIT(&(ret));
  }
}
