Commit 180ca39d authored by julien.delange's avatar julien.delange
Browse files

begin to write the definition of the events action service



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@1135 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent d52e0e56
......@@ -15,14 +15,14 @@
#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)
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_REPORT_ENABLE (1<<2|1<<1)
#define __PO_HI_DRIVER_PUS_EVENTS_SUBTYPE_REPORT_DISABLE (1<<2|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
* 1. The __po_hi_driver_pus_rid_t type that is an
* enumeration and describe all Report Identifier
* we can have in the system.
* ex :
......@@ -30,7 +30,7 @@
* {
* pus_rid_sensor_value_too_high = 1,
* pus_rid_sensor_error = 2
* }__po_hi_driver_pis_events_rid_t;
* }__po_hi_driver_pis_rid_t;
*
* 2. The __PO_HI_DRIVER_PUS_EVENTS_NB_EVENTS maccro
* that specifies the number of events we have in
......@@ -38,10 +38,10 @@
* 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);
int __po_hi_driver_pus_events_report (uint8_t severity,
__po_hi_driver_pus_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
......@@ -79,6 +79,14 @@ int __po_hi_driver_pus_events_enable (char* data);
* | RID TO ENABLE/DISABLE |
* -----------------------
*
*
* When enable a report generation, the subtype if 6 while
* the subtype is 5 when you want to disable a report
* event generation.
*
* Also, enable/disable a report generation is an additional
* capability set and is not mandatory.
*
* These functions returns __PO_HI_SUCCESS is successfull, another
* value otherwise.
*/
......
/*
* 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 file defines the functions that implement the Event-Action service
* of the PUS protocol. This is denoted as service 19 in the PUS standard
* (ECSS-E-70-41A document).
*/
/*
* This service requires the declaration of the following types and maccros:
* 1. __po_hi_driver_pus_apid_t : definition of the APID type. This is most of
* the time an enumeration that enumerates each application id of the
* OBSW.
* 2. __po_hi_driver_pus_rid_t : as for the apid_t type, we need a type
* that describes the events handled by the system.
* 3. __po_hi_driver_pus_action_t : as for the apid_t type and rid_t type,
* this enumerated all potential actions the system can perform.
* 4. __PO_HI_DRIVER_PUS_NB_DETECTIONS : macro that indicates the size of
* the detection list associated with this service. Using this configuration
* directive, we can statically allocate the actions detection list.
*/
#define __PO_HI_DRIVER_PUS_EVENT_ACTION_SUBTYPE_EVENTS_ADD 1 /* Part of the minimum capability set */
#define __PO_HI_DRIVER_PUS_EVENT_ACTION_SUBTYPE_ACTIONS_ENABLE 1<<2 /* Part of the minimum capability set */
#define __PO_HI_DRIVER_PUS_EVENT_ACTION_SUBTYPE_ACTIONS_DISABLE ((1<<2)|1) /* Part of the minimum capability set */
#define __PO_HI_DRIVER_PUS_EVENT_ACTION_SUBTYPE_EVENTS_DELETE (1<<1) /* Part of the additional capability set */
#define __PO_HI_DRIVER_PUS_EVENT_ACTION_SUBTYPE_EVENTS_CLEAR ((1<<1)|1) /* Part of the additional capability set */
#define __PO_HI_DRIVER_PUS_EVENT_ACTION_SUBTYPE_EVENTS_REPORT_ASK ((1<<1)|(1<<2)) /* Part of the additional capability set */
#define __PO_HI_DRIVER_PUS_EVENT_ACTION_SUBTYPE_EVENTS_REPORT_SEND ((1<<2)|(1<<1)|1) /* Part of the additional capability set */
typedef struct
{
__po_hi_driver_pus_apid_t apid;
__po_hi_driver_pus_rid_t rid;
__po_hi_driver_pus_action_t action;
__po_hi_driver_action_status_t action_status;
}__po_hi_driver_pus_detection_t;
/*
* Content of an event detection and its corresponding action.
*/
......@@ -16,7 +16,7 @@
* standard.
*/
int __po_hi_driver_pus_events_report (uint8_t severity, __po_hi_driver_pus_events_rid_t rid, char* parameters, int param_len)
int __po_hi_driver_pus_events_report (uint8_t severity, __po_hi_driver_pus_rid_t rid, char* parameters, int param_len)
{
return __PO_HI_SUCCESS;
}
......
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