1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
/******************************************************************************
** COPYRIGHT NOTICE
** (c) 2012 The Johns Hopkins University Applied Physics Laboratory
** All rights reserved.
**
** This material may only be used, modified, or reproduced by or for the
** U.S. Government pursuant to the license rights granted under
** FAR clause 52.227-14 or DFARS clauses 252.227-7013/7014
**
** For any other permissions, please contact the Legal Office at JHU/APL.
******************************************************************************/
/*****************************************************************************
**
** \file msg_reports.h
**
**
** Description: Defines the serialization and de-serialization methods
** used to translate data types into byte streams associated
** with DTNMP messages, and vice versa.
**
** Notes:
** Not all fields of internal structures are serialized into/
** deserialized from DTNMP messages.
**
** Assumptions:
**
** Modification History:
** MM/DD/YY AUTHOR DESCRIPTION
** -------- ------------ ---------------------------------------------
** 09/09/11 M. Reid Initial Implementation (in other files)
** 11/02/12 E. Birrane Redesign of messaging architecture.
** 01/11/13 E. Birrane Migrate data structures to primitives.
*****************************************************************************/
#ifndef MSG_REPORTS_H_
#define MSG_REPORTS_H_
#include "lyst.h"
#include "shared/utils/nm_types.h"
#include "shared/primitives/mid.h"
#include "shared/primitives/report.h"
#include "shared/msg/pdu.h"
/*
* +--------------------------------------------------------------------------+
* | CONSTANTS +
* +--------------------------------------------------------------------------+
*/
/* Reporting messages */
#define MSG_TYPE_RPT_DATA_LIST (0x10)
#define MSG_TYPE_RPT_DATA_DEFS (0x11)
#define MSG_TYPE_RPT_DATA_RPT (0x12)
#define MSG_TYPE_RPT_PROD_SCHED (0x13)
/*
* +--------------------------------------------------------------------------+
* | MACROS +
* +--------------------------------------------------------------------------+
*/
/*
* +--------------------------------------------------------------------------+
* | DATA TYPES +
* +--------------------------------------------------------------------------+
*/
/*
* +--------------------------------------------------------------------------+
* | FUNCTION PROTOTYPES +
* +--------------------------------------------------------------------------+
*/
/* Serialize functions. */
uint8_t *rpt_serialize_lst(rpt_items_t *msg, uint32_t *len);
uint8_t *rpt_serialize_defs(rpt_defs_t *msg, uint32_t *len);
uint8_t *rpt_serialize_data_entry(rpt_data_entry_t *entry, uint32_t *len);
uint8_t *rpt_serialize_data(rpt_data_t *msg, uint32_t *len);
uint8_t *rpt_serialize_prod(rpt_prod_t *msg, uint32_t *len);
/* Deserialize functions. */
rpt_items_t *rpt_deserialize_lst(uint8_t *cursor,
uint32_t size,
uint32_t *bytes_used);
rpt_defs_t *rpt_deserialize_defs(uint8_t *cursor,
uint32_t size,
uint32_t *bytes_used);
rpt_data_t *rpt_deserialize_data(uint8_t *cursor,
uint32_t size,
uint32_t *bytes_used);
rpt_prod_t *rpt_deserialize_prod(uint8_t *cursor,
uint32_t size,
uint32_t *bytes_used);
#endif // MSG_REPORTS_H_
|