spacewire.h 3.83 KB
Newer Older
yoogx's avatar
yoogx committed
1
2
3
4
5
/*
 * 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.
 *
yoogx's avatar
yoogx committed
6
 * For more informations, please visit http://taste.tuxfamily.org/wiki
yoogx's avatar
yoogx committed
7
8
9
10
 *
 * Copyright (C) 2014 ESA & ISAE.
 */

11
12
13
14
#ifndef _INC_SPACEWIRE_H
#define _INC_SPACEWIRE_H
/*
Code automatically generated by asn1scc tool
15
16
Date was: 2/7/2012
Time was: 15:35:36
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
*/

#include "asn1crt.h"

#ifdef  __cplusplus
extern "C" {
#endif



typedef asn1SccSint __po_hi_c_Core_Frequence_T;

#define __po_hi_c_Core_Frequence_T_REQUIRED_BYTES_FOR_ENCODING        4
#define __po_hi_c_Core_Frequence_T_REQUIRED_BITS_FOR_ENCODING        32
#define __po_hi_c_Core_Frequence_T_REQUIRED_BYTES_FOR_ACN_ENCODING       4
#define __po_hi_c_Core_Frequence_T_REQUIRED_BITS_FOR_ACN_ENCODING        32
jdelange's avatar
jdelange committed
33
#define __po_hi_c_Core_Frequence_T_REQUIRED_BYTES_FOR_XER_ENCODING       57
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

#ifndef ERR___po_hi_c_Core_Frequence_T 
#define ERR___po_hi_c_Core_Frequence_T		1000 /* (0..4294967295) */
#endif

void __po_hi_c_Core_Frequence_T_Initialize(__po_hi_c_Core_Frequence_T* pVal);
flag __po_hi_c_Core_Frequence_T_IsConstraintValid(const __po_hi_c_Core_Frequence_T* val, int* pErrCode);


typedef asn1SccSint __po_hi_c_Node_Addr_T;

#define __po_hi_c_Node_Addr_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Node_Addr_T_REQUIRED_BITS_FOR_ENCODING        8
#define __po_hi_c_Node_Addr_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Node_Addr_T_REQUIRED_BITS_FOR_ACN_ENCODING        8
jdelange's avatar
jdelange committed
49
#define __po_hi_c_Node_Addr_T_REQUIRED_BYTES_FOR_XER_ENCODING       47
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

#ifndef ERR___po_hi_c_Node_Addr_T 
#define ERR___po_hi_c_Node_Addr_T		1001 /* (0..255) */
#endif

void __po_hi_c_Node_Addr_T_Initialize(__po_hi_c_Node_Addr_T* pVal);
flag __po_hi_c_Node_Addr_T_IsConstraintValid(const __po_hi_c_Node_Addr_T* val, int* pErrCode);


typedef asn1SccSint __po_hi_c_Clock_Division_T;

#define __po_hi_c_Clock_Division_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Clock_Division_T_REQUIRED_BITS_FOR_ENCODING        8
#define __po_hi_c_Clock_Division_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Clock_Division_T_REQUIRED_BITS_FOR_ACN_ENCODING        8
jdelange's avatar
jdelange committed
65
#define __po_hi_c_Clock_Division_T_REQUIRED_BYTES_FOR_XER_ENCODING       57
66
67
68
69
70
71
72
73
74
75
76
77
78
79

#ifndef ERR___po_hi_c_Clock_Division_T 
#define ERR___po_hi_c_Clock_Division_T		1002 /* (0..255) */
#endif

void __po_hi_c_Clock_Division_T_Initialize(__po_hi_c_Clock_Division_T* pVal);
flag __po_hi_c_Clock_Division_T_IsConstraintValid(const __po_hi_c_Clock_Division_T* val, int* pErrCode);


typedef struct {
    char devname[21];
    __po_hi_c_Node_Addr_T nodeaddr;
    __po_hi_c_Core_Frequence_T corefreq;
    __po_hi_c_Clock_Division_T clockdiv;
jdelange's avatar
jdelange committed
80
    flag use_router;
81
82
83
84
    flag remove_prot_id;
    flag rxblock;
    flag txblock;
    struct {
85
86
        unsigned int corefreq:1;
        unsigned int clockdiv:1;
jdelange's avatar
jdelange committed
87
        unsigned int use_router:1;
88
89
90
91
92
93
        unsigned int remove_prot_id:1;
        unsigned int rxblock:1;
        unsigned int txblock:1;
    } exist;
} __po_hi_c_spacewire_conf_t;

94
#define __po_hi_c_spacewire_conf_t_REQUIRED_BYTES_FOR_ENCODING        26
jdelange's avatar
jdelange committed
95
#define __po_hi_c_spacewire_conf_t_REQUIRED_BITS_FOR_ENCODING        203
96
#define __po_hi_c_spacewire_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING       28
jdelange's avatar
jdelange committed
97
98
#define __po_hi_c_spacewire_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING        223
#define __po_hi_c_spacewire_conf_t_REQUIRED_BYTES_FOR_XER_ENCODING       347
99
100
101
102
103
104
105
106
107

#ifndef ERR___po_hi_c_spacewire_conf_t_devname 
#define ERR___po_hi_c_spacewire_conf_t_devname		1003 /* (SIZE (1..20)) */
#endif

void __po_hi_c_spacewire_conf_t_Initialize(__po_hi_c_spacewire_conf_t* pVal);
flag __po_hi_c_spacewire_conf_t_IsConstraintValid(const __po_hi_c_spacewire_conf_t* val, int* pErrCode);


108
109
extern  __po_hi_c_spacewire_conf_t leon_rasta_spw_sender;
extern  __po_hi_c_spacewire_conf_t leon_rasta_spw_receiver;
110
111
112
113
114
115

#ifdef  __cplusplus
}
#endif

#endif