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

* update definition of spacewire configuration type



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2131 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent c23811de
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
#define _INC_SPACEWIRE_H #define _INC_SPACEWIRE_H
/* /*
Code automatically generated by asn1scc tool Code automatically generated by asn1scc tool
Date was: 2/9/2011 Date was: 2/11/2011
Time was: 17:39:12 Time was: 10:30:36
*/ */
#include "asn1crt.h" #include "asn1crt.h"
...@@ -74,16 +74,18 @@ typedef struct { ...@@ -74,16 +74,18 @@ typedef struct {
flag rxblock; flag rxblock;
flag txblock; flag txblock;
struct { struct {
unsigned int corefreq:1;
unsigned int clockdiv:1;
unsigned int remove_prot_id:1; unsigned int remove_prot_id:1;
unsigned int rxblock:1; unsigned int rxblock:1;
unsigned int txblock:1; unsigned int txblock:1;
} exist; } exist;
} __po_hi_c_spacewire_conf_t; } __po_hi_c_spacewire_conf_t;
#define __po_hi_c_spacewire_conf_t_REQUIRED_BYTES_FOR_ENCODING 25 #define __po_hi_c_spacewire_conf_t_REQUIRED_BYTES_FOR_ENCODING 26
#define __po_hi_c_spacewire_conf_t_REQUIRED_BITS_FOR_ENCODING 199 #define __po_hi_c_spacewire_conf_t_REQUIRED_BITS_FOR_ENCODING 201
#define __po_hi_c_spacewire_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING 28 #define __po_hi_c_spacewire_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING 28
#define __po_hi_c_spacewire_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING 219 #define __po_hi_c_spacewire_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING 221
#ifndef ERR___po_hi_c_spacewire_conf_t_devname #ifndef ERR___po_hi_c_spacewire_conf_t_devname
#define ERR___po_hi_c_spacewire_conf_t_devname 1003 /* (SIZE (1..20)) */ #define ERR___po_hi_c_spacewire_conf_t_devname 1003 /* (SIZE (1..20)) */
......
...@@ -9,8 +9,8 @@ Clock-Division-T ::= INTEGER (0 .. 255) ...@@ -9,8 +9,8 @@ Clock-Division-T ::= INTEGER (0 .. 255)
Spacewire-Conf-T ::= SEQUENCE { Spacewire-Conf-T ::= SEQUENCE {
devname IA5String (SIZE (1..20)), devname IA5String (SIZE (1..20)),
nodeaddr Node-Addr-T, nodeaddr Node-Addr-T,
corefreq Core-Frequence-T, corefreq Core-Frequence-T OPTIONAL,
clockdiv Clock-Division-T, clockdiv Clock-Division-T OPTIONAL,
remove-prot-id BOOLEAN OPTIONAL, remove-prot-id BOOLEAN OPTIONAL,
rxblock BOOLEAN OPTIONAL, rxblock BOOLEAN OPTIONAL,
txblock BOOLEAN OPTIONAL txblock BOOLEAN OPTIONAL
......
#if (defined (__PO_HI_NEED_DRIVER_SPACEWIRE_RASTA))\n #if (defined (__PO_HI_NEED_DRIVER_SPACEWIRE_RASTA))\n
/* /*
Code automatically generated by asn1scc tool Code automatically generated by asn1scc tool
Date was: 2/9/2011 Date was: 2/11/2011
Time was: 17:39:12 Time was: 10:30:37
*/ */
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
...@@ -120,12 +120,16 @@ flag __po_hi_c_spacewire_conf_t_IsConstraintValid(const __po_hi_c_spacewire_conf ...@@ -120,12 +120,16 @@ flag __po_hi_c_spacewire_conf_t_IsConstraintValid(const __po_hi_c_spacewire_conf
if ( !__po_hi_c_Node_Addr_T_IsConstraintValid(&pVal->nodeaddr, pErrCode)) if ( !__po_hi_c_Node_Addr_T_IsConstraintValid(&pVal->nodeaddr, pErrCode))
return FALSE; return FALSE;
if ( !__po_hi_c_Core_Frequence_T_IsConstraintValid(&pVal->corefreq, pErrCode)) if (pVal->exist.corefreq) {
return FALSE; if ( !__po_hi_c_Core_Frequence_T_IsConstraintValid(&pVal->corefreq, pErrCode))
return FALSE;
if ( !__po_hi_c_Clock_Division_T_IsConstraintValid(&pVal->clockdiv, pErrCode)) }
return FALSE; if (pVal->exist.clockdiv) {
if ( !__po_hi_c_Clock_Division_T_IsConstraintValid(&pVal->clockdiv, pErrCode))
return FALSE;
}
if (pVal->exist.remove_prot_id) { if (pVal->exist.remove_prot_id) {
} }
if (pVal->exist.rxblock) { if (pVal->exist.rxblock) {
...@@ -143,10 +147,18 @@ flag __po_hi_c_spacewire_conf_t_Equal(const __po_hi_c_spacewire_conf_t* pVal1, c ...@@ -143,10 +147,18 @@ flag __po_hi_c_spacewire_conf_t_Equal(const __po_hi_c_spacewire_conf_t* pVal1, c
return FALSE; return FALSE;
if (!__po_hi_c_Node_Addr_T_Equal(&pVal1->nodeaddr, &pVal2->nodeaddr)) if (!__po_hi_c_Node_Addr_T_Equal(&pVal1->nodeaddr, &pVal2->nodeaddr))
return FALSE; return FALSE;
if (!__po_hi_c_Core_Frequence_T_Equal(&pVal1->corefreq, &pVal2->corefreq)) if (pVal1->exist.corefreq != pVal2->exist.corefreq)
return FALSE; return FALSE;
if (!__po_hi_c_Clock_Division_T_Equal(&pVal1->clockdiv, &pVal2->clockdiv)) if (pVal1->exist.corefreq) {
if (!__po_hi_c_Core_Frequence_T_Equal(&pVal1->corefreq, &pVal2->corefreq))
return FALSE;
}
if (pVal1->exist.clockdiv != pVal2->exist.clockdiv)
return FALSE; return FALSE;
if (pVal1->exist.clockdiv) {
if (!__po_hi_c_Clock_Division_T_Equal(&pVal1->clockdiv, &pVal2->clockdiv))
return FALSE;
}
if (pVal1->exist.remove_prot_id != pVal2->exist.remove_prot_id) if (pVal1->exist.remove_prot_id != pVal2->exist.remove_prot_id)
return FALSE; return FALSE;
if (pVal1->exist.remove_prot_id) { if (pVal1->exist.remove_prot_id) {
......
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