Commit d52e0e56 authored by julien.delange's avatar julien.delange

continue PUS implementation



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@1134 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent f8df1d45
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2010, European Space Agency
*/
#ifndef __PO_HI_DRIVER_PUS_EVENTS_H__
#define __PO_HI_DRIVER_PUS_EVENTS_H__
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_NORMAL 1
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_ERROR_LOW 1<<1
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_ERROR_MEDIUM (1<<1)|1
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_ERROR_HIGH 1<<2
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_REPORT_ENABLE (1<<2|1)
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_REPORT_DISABLE (1<<2|1<<1)
/*
* The following code needs extra declaration to work.
*
* Generated code must contain at least two definition :
* 1. The __po_hi_driver_pus_events_rid_t type that is an
* enumeration and describe all Report Identifier
* we can have in the system.
* ex :
* typedef
* {
* pus_rid_sensor_value_too_high = 1,
* pus_rid_sensor_error = 2
* }__po_hi_driver_pis_events_rid_t;
*
* 2. The __PO_HI_DRIVER_PUS_EVENTS_NB_EVENTS maccro
* that specifies the number of events we have in
* the whole architecture.
* ex : #define __PO_HI_DRIVER_PUS_EVENTS_NB_EVENTS 2
*/
int __po_hi_driver_pus_events_report (uint8_t severity,
__po_hi_driver_pus_events_rid_t rid,
char* parameters,
int param_len);
/*
* This function is used to report events using TM packets.
* This is describe in the section 10.3 of the ECSS-E-70-41A
* standard (page 80). The severity argument specifies
* if this is a normal or an error report (and details
* its severity). The rid argument is the Report-Identifier,
* it should be generated from system specifications and
* correspond to an enumeration. Finally, the parameters
* argument contains optional parameters of the report while
* the param_len argument represent the length of these optional
* parameters. In case of no parameter, param_len = 0.
*
* Returns __PO_HI_SUCCESS if the report is sent successfully,
* other value otherwise. Please have a look at po_hi_returns
* file for all return codes.
*/
int __po_hi_driver_pus_events_disable (char* data);
int __po_hi_driver_pus_events_enable (char* data);
/*
* The following functions are used to enable/disable events report.
* The argument is only a data, structured as in section 10.3.2
* of the ECSS-E-70-41A standard. It can contain one or several
* Report Identifier to enable/disable. This data should be structured
* as follow :
*
* _____________________________________
* | NRID | RID1 | RID2 | .... | RID-N |
* -------------------------------------
*
* If only one RID must be enable/disable, the content
* is only :
*
* _______________________
* | RID TO ENABLE/DISABLE |
* -----------------------
*
* These functions returns __PO_HI_SUCCESS is successfull, another
* value otherwise.
*/
#endif /* __PO_HI_DRIVER_PUS_EVENTS_H__ */
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2010, European Space Agency
*/
#ifndef __PO_HI_DRIVER_PUS_PACKET_H__
#define __PO_HI_DRIVER_PUS_PACKET_H__
......
......@@ -6,6 +6,7 @@
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2007-2009, GET-Telecom Paris.
* Copyright (C) 2007-2010, European Space Agency
*/
#ifndef __PO_HI_RETURNS_H__
......
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2010, European Space Agency
*/
/*
* This is the implementation of PUS service 5: event reporting service.
* The description of this service can be found in the ECSS-E-70-41A
* standard.
*/
int __po_hi_driver_pus_events_report (uint8_t severity, __po_hi_driver_pus_events_rid_t rid, char* parameters, int param_len)
{
return __PO_HI_SUCCESS;
}
int __po_hi_driver_pus_events_control (char* data)
{
return __PO_HI_SUCCESS;
}
/*
* This is a part of PolyORB-HI-C distribution, a minimal
* middleware written for generated code from AADL models.
* You should use it with the Ocarina toolsuite.
*
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2010, European Space Agency
*/
#include <po_hi_types.h>
#include <drivers/po_hi_driver_pus_packet.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment