Commit 52e539f6 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files
parents 296b10d4 ac3b8492
...@@ -84,15 +84,15 @@ typedef struct { ...@@ -84,15 +84,15 @@ typedef struct {
void __po_hi_c_mil_1553_conf_t_devname_Initialize(__po_hi_c_mil_1553_conf_t_devname val); void __po_hi_c_mil_1553_conf_t_devname_Initialize(__po_hi_c_mil_1553_conf_t_devname val);
void __po_hi_c_mil_1553_conf_t_Initialize(__po_hi_c_mil_1553_conf_t* pVal); void __po_hi_c_mil_1553_conf_t_Initialize(__po_hi_c_mil_1553_conf_t* pVal);
#define ERR_MIL_1553_CONF_T 101 /**/ #define ERR_MIL_1553_CONF_T 105 /**/
#define ERR_MIL_1553_CONF_T_DEVNAME 29 /**/ #define ERR_MIL_1553_CONF_T_DEVNAME 29 /**/
#define ERR_MIL_1553_CONF_T_STANDARD 36 /**/ #define ERR_MIL_1553_CONF_T_STANDARD_2 43 /**/
#define ERR_MIL_1553_CONF_T_MODE 47 /**/ #define ERR_MIL_1553_CONF_T_MODE_2 55 /**/
#define ERR_MIL_1553_CONF_T_BUS 58 /**/ #define ERR_MIL_1553_CONF_T_BUS_2 67 /**/
#define ERR_MIL_1553_CONF_T_TERMADDR 69 /**/ #define ERR_MIL_1553_CONF_T_TERMADDR_2 79 /**/
#define ERR_MIL_1553_CONF_T_BROADCAST 80 /**/ #define ERR_MIL_1553_CONF_T_BROADCAST 84 /**/
#define ERR_MIL_1553_CONF_T_RXBLOCK 87 /**/ #define ERR_MIL_1553_CONF_T_RXBLOCK 91 /**/
#define ERR_MIL_1553_CONF_T_TXBLOCK 94 /**/ #define ERR_MIL_1553_CONF_T_TXBLOCK 98 /**/
flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t* pVal, int* pErrCode); flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t* pVal, int* pErrCode);
......
...@@ -3,19 +3,32 @@ ...@@ -3,19 +3,32 @@
#include <stddef.h> #include <stddef.h>
#if (!defined(_MSC_VER) || _MSC_VER >= 1800)
# ifndef SWIG
# include <stdbool.h>
# endif
#else
typedef unsigned char bool;
#define true 1
#define false 0
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif # include <cstdint>
# include <cinttypes>
/* C99 check */
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || _MSC_VER >= 1900
# include <stdbool.h>
# include <stdint.h>
# include <inttypes.h>
#else /* No C++ nor C99 */
# ifndef _MSC_VER
typedef unsigned char bool;
# define true 1u
# define false 0u
# endif /* _MSC_VER */
typedef unsigned char uint8_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#endif /* C++/C99 */
#ifndef NULL #ifndef NULL
#define NULL 0 #define NULL 0
...@@ -37,29 +50,51 @@ extern "C" { ...@@ -37,29 +50,51 @@ extern "C" {
#define FP_WORD_SIZE 8 #define FP_WORD_SIZE 8
#endif #endif
#ifndef PRId32
#define PRId32 "d"
#endif
#ifndef PRId64
#define PRId64 "lld"
#endif
#ifndef PRIu32
#define PRIu32 "u"
#endif
#ifndef PRIu64
#define PRIu64 "llu"
#endif
#define OBJECT_IDENTIFIER_MAX_LENGTH 20 #define OBJECT_IDENTIFIER_MAX_LENGTH 20
typedef float asn1Real32; typedef float asn1Real32;
typedef double asn1Real64; typedef double asn1Real64;
typedef uint8_t byte;
typedef int32_t asn1SccSint32;
typedef uint32_t asn1SccUint32;
typedef unsigned char byte; typedef int64_t asn1SccSint64;
typedef uint64_t asn1SccUint64;
typedef int asn1SccSint32;
typedef unsigned int asn1SccUint32;
typedef long long asn1SccSint64;
typedef unsigned long long asn1SccUint64;
#if WORD_SIZE==8 #if WORD_SIZE==8
typedef asn1SccUint64 asn1SccUint; typedef asn1SccUint64 asn1SccUint;
typedef asn1SccSint64 asn1SccSint; typedef asn1SccSint64 asn1SccSint;
#define ASN1SCC_PRId PRId64
#define ASN1SCC_PRIu PRIu64
#else #else
typedef asn1SccUint32 asn1SccUint; typedef asn1SccUint32 asn1SccUint;
typedef asn1SccSint32 asn1SccSint; typedef asn1SccSint32 asn1SccSint;
#define ASN1SCC_PRId PRId32
#define ASN1SCC_PRIu PRIu32
#endif #endif
asn1SccUint int2uint(asn1SccSint v);
asn1SccSint uint2int(asn1SccUint v, int uintSizeInBytes);
#if FP_WORD_SIZE==8 #if FP_WORD_SIZE==8
typedef asn1Real64 asn1Real; typedef asn1Real64 asn1Real;
#else #else
...@@ -80,14 +115,29 @@ typedef bool flag; ...@@ -80,14 +115,29 @@ typedef bool flag;
typedef char NullType; typedef char NullType;
typedef struct { struct BitStream_t;
//typedef void(*PushDataFnc)(struct BitStream_t* pThis, void* pushDataPrm);
//typedef void(*FetchDataFnc)(struct BitStream_t* pThis, void* fetchDataPrm);
typedef struct BitStream_t {
byte* buf; byte* buf;
long count; long count;
long currentByte; long currentByte;
/* Next available bit for writting. Possible vallues 0..7, 0 is most significant bit of current byte*/ /* Next available bit for writting.
Possible vallues 0..7, 0 is most significant
bit of current byte*/
int currentBit; int currentBit;
//PushDataFnc pushData;
void* pushDataPrm;
//FetchDataFnc fetchData;
void* fetchDataPrm;
} BitStream; } BitStream;
typedef struct { typedef struct {
byte* buf; byte* buf;
long count; long count;
...@@ -123,30 +173,78 @@ typedef struct { ...@@ -123,30 +173,78 @@ typedef struct {
#define ERR_INVALID_BER_FILE 201 #define ERR_INVALID_BER_FILE 201
#define ERR_BER_LENGTH_MISMATCH 202 #define ERR_BER_LENGTH_MISMATCH 202
int GetCharIndex(char ch, byte allowedCharSet[], int setLen);
flag OctetString_equal(int len1, int len2, const byte arr1[], const byte arr2[]);
flag BitString_equal(int nBitsLength1, int nBitsLength2, const byte arr1[], const byte arr2[]);
void ObjectIdentifier_Init(Asn1ObjectIdentifier *pVal); void ObjectIdentifier_Init(Asn1ObjectIdentifier *pVal);
flag ObjectIdentifier_equal(const Asn1ObjectIdentifier *pVal1, const Asn1ObjectIdentifier *pVal2); flag ObjectIdentifier_equal(const Asn1ObjectIdentifier *pVal1, const Asn1ObjectIdentifier *pVal2);
flag ObjectIdentifier_isValid(const Asn1ObjectIdentifier *pVal); flag ObjectIdentifier_isValid(const Asn1ObjectIdentifier *pVal);
flag RelativeOID_isValid(const Asn1ObjectIdentifier *pVal); flag RelativeOID_isValid(const Asn1ObjectIdentifier *pVal);
/* Time Classes
Asn1LocalTime, // TIME-OF-DAY ::= TIME(SETTINGS "Basic=Time Time=HMS Local-or-UTC=L")
Asn1UtcTime, // TIME(SETTINGS "Basic=Time Time=HMS Local-or-UTC=Z")
Asn1LocalTimeWithTimeZone, // TIME(SETTINGS "Basic=Time Time=HMS Local-or-UTC=LD")
Asn1Date, // DATE ::= TIME(SETTINGS "Basic=Date Date=YMD Year=Basic")
Asn1Date_LocalTime, // DATE-TIME ::= TIME(SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HMS Local-or-UTC=L")
Asn1Date_UtcTime, // TIME(SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HMS Local-or-UTC=Z")
Asn1Date_LocalTimeWithTimeZone // TIME(SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HMS Local-or-UTC=LD")
*/
typedef struct {
int sign; //-1 or +1
int hours;
int mins;
} Asn1TimeZone;
int GetCharIndex(char ch, byte allowedCharSet[], int setLen); typedef struct {
int hours;
int mins;
int secs;
int fraction;
Asn1TimeZone tz;
} Asn1TimeWithTimeZone;
typedef struct {
int hours;
int mins;
int secs;
int fraction;
} Asn1UtcTime;
typedef struct {
int hours;
int mins;
int secs;
int fraction;
} Asn1LocalTime;
typedef asn1SccUint BerTag; typedef struct {
int years;
int months;
int days;
} Asn1Date;
typedef struct {
Asn1Date date;
Asn1LocalTime time;
} Asn1DateLocalTime;
typedef struct {
Asn1Date date;
Asn1UtcTime time;
} Asn1DateUtcTime;
typedef struct {
Asn1Date date;
Asn1TimeWithTimeZone time;
} Asn1DateTimeWithTimeZone;
typedef enum {
Asn1TC_LocalTimeStamp,
Asn1TC_UtcTimeStamp,
Asn1TC_LocalTimeTZStamp
} Asn1TimeZoneClass;
typedef asn1SccUint BerTag;
#if WORD_SIZE==8 #if WORD_SIZE==8
extern const asn1SccUint64 ber_aux[]; extern const asn1SccUint64 ber_aux[];
...@@ -154,9 +252,6 @@ extern const asn1SccUint64 ber_aux[]; ...@@ -154,9 +252,6 @@ extern const asn1SccUint64 ber_aux[];
extern const asn1SccUint32 ber_aux[]; extern const asn1SccUint32 ber_aux[];
#endif #endif
#define CHECK_BIT_STREAM(pBitStrm) assert((pBitStrm)->currentByte*8+(pBitStrm)->currentBit<=(pBitStrm)->count*8) #define CHECK_BIT_STREAM(pBitStrm) assert((pBitStrm)->currentByte*8+(pBitStrm)->currentBit<=(pBitStrm)->count*8)
#ifdef _MSC_VER #ifdef _MSC_VER
......
...@@ -65,15 +65,15 @@ void __po_hi_c_ip_conf_t_gateway_Initialize(__po_hi_c_ip_conf_t_gateway val); ...@@ -65,15 +65,15 @@ void __po_hi_c_ip_conf_t_gateway_Initialize(__po_hi_c_ip_conf_t_gateway val);
void __po_hi_c_ip_conf_t_dns_Initialize(__po_hi_c_ip_conf_t_dns val); void __po_hi_c_ip_conf_t_dns_Initialize(__po_hi_c_ip_conf_t_dns val);
void __po_hi_c_ip_conf_t_Initialize(__po_hi_c_ip_conf_t* pVal); void __po_hi_c_ip_conf_t_Initialize(__po_hi_c_ip_conf_t* pVal);
#define ERR_IP_CONF_T 79 /**/ #define ERR_IP_CONF_T 81 /**/
#define ERR_IP_CONF_T_DEVNAME 15 /**/ #define ERR_IP_CONF_T_DEVNAME 15 /**/
#define ERR_IP_CONF_T_ADDRESS 22 /**/ #define ERR_IP_CONF_T_ADDRESS 22 /**/
#define ERR_IP_CONF_T_BROADCAST 29 /**/ #define ERR_IP_CONF_T_BROADCAST 29 /**/
#define ERR_IP_CONF_T_NETMASK 36 /**/ #define ERR_IP_CONF_T_NETMASK 36 /**/
#define ERR_IP_CONF_T_GATEWAY 43 /**/ #define ERR_IP_CONF_T_GATEWAY 43 /**/
#define ERR_IP_CONF_T_DNS 50 /**/ #define ERR_IP_CONF_T_DNS 50 /**/
#define ERR_IP_CONF_T_VERSION 57 /**/ #define ERR_IP_CONF_T_VERSION_2 64 /**/
#define ERR_IP_CONF_T_PORT 68 /**/ #define ERR_IP_CONF_T_PORT_2 76 /**/
flag __po_hi_c_ip_conf_t_IsConstraintValid(const __po_hi_c_ip_conf_t* pVal, int* pErrCode); flag __po_hi_c_ip_conf_t_IsConstraintValid(const __po_hi_c_ip_conf_t* pVal, int* pErrCode);
extern const __po_hi_c_ip_conf_t localhost1; extern const __po_hi_c_ip_conf_t localhost1;
......
...@@ -73,13 +73,13 @@ void __po_hi_c_serial_conf_t_bits_Initialize(__po_hi_c_serial_conf_t_bits* pVal) ...@@ -73,13 +73,13 @@ void __po_hi_c_serial_conf_t_bits_Initialize(__po_hi_c_serial_conf_t_bits* pVal)
void __po_hi_c_serial_conf_t_sending_wait_Initialize(__po_hi_c_serial_conf_t_sending_wait* pVal); void __po_hi_c_serial_conf_t_sending_wait_Initialize(__po_hi_c_serial_conf_t_sending_wait* pVal);
void __po_hi_c_serial_conf_t_Initialize(__po_hi_c_serial_conf_t* pVal); void __po_hi_c_serial_conf_t_Initialize(__po_hi_c_serial_conf_t* pVal);
#define ERR_SERIAL_CONF_T 65 /**/ #define ERR_SERIAL_CONF_T 67 /**/
#define ERR_SERIAL_CONF_T_DEVNAME 15 /**/ #define ERR_SERIAL_CONF_T_DEVNAME 15 /**/
#define ERR_SERIAL_CONF_T_SPEED 22 /**/ #define ERR_SERIAL_CONF_T_SPEED_2 29 /**/
#define ERR_SERIAL_CONF_T_PARITY 33 /**/ #define ERR_SERIAL_CONF_T_PARITY_2 41 /**/
#define ERR_SERIAL_CONF_T_BITS 44 /**/ #define ERR_SERIAL_CONF_T_BITS 46 /**/
#define ERR_SERIAL_CONF_T_SENDING_WAIT 51 /**/ #define ERR_SERIAL_CONF_T_SENDING_WAIT 53 /**/
#define ERR_SERIAL_CONF_T_USE_PARITYBIT 58 /**/ #define ERR_SERIAL_CONF_T_USE_PARITYBIT 60 /**/
flag __po_hi_c_serial_conf_t_IsConstraintValid(const __po_hi_c_serial_conf_t* pVal, int* pErrCode); flag __po_hi_c_serial_conf_t_IsConstraintValid(const __po_hi_c_serial_conf_t* pVal, int* pErrCode);
extern const __po_hi_c_serial_conf_t linux_ttyS0; extern const __po_hi_c_serial_conf_t linux_ttyS0;
......
...@@ -57,15 +57,15 @@ typedef struct { ...@@ -57,15 +57,15 @@ typedef struct {
void __po_hi_c_spacewire_conf_t_devname_Initialize(__po_hi_c_spacewire_conf_t_devname val); void __po_hi_c_spacewire_conf_t_devname_Initialize(__po_hi_c_spacewire_conf_t_devname val);
void __po_hi_c_spacewire_conf_t_Initialize(__po_hi_c_spacewire_conf_t* pVal); void __po_hi_c_spacewire_conf_t_Initialize(__po_hi_c_spacewire_conf_t* pVal);
#define ERR_SPACEWIRE_CONF_T 90 /**/ #define ERR_SPACEWIRE_CONF_T 93 /**/
#define ERR_SPACEWIRE_CONF_T_DEVNAME 22 /**/ #define ERR_SPACEWIRE_CONF_T_DEVNAME 22 /**/
#define ERR_SPACEWIRE_CONF_T_NODEADDR 29 /**/ #define ERR_SPACEWIRE_CONF_T_NODEADDR_2 36 /**/
#define ERR_SPACEWIRE_CONF_T_COREFREQ 40 /**/ #define ERR_SPACEWIRE_CONF_T_COREFREQ_2 48 /**/
#define ERR_SPACEWIRE_CONF_T_CLOCKDIV 51 /**/ #define ERR_SPACEWIRE_CONF_T_CLOCKDIV_2 60 /**/
#define ERR_SPACEWIRE_CONF_T_USE_ROUTER 62 /**/ #define ERR_SPACEWIRE_CONF_T_USE_ROUTER 65 /**/
#define ERR_SPACEWIRE_CONF_T_REMOVE_PROT_ID 69 /**/ #define ERR_SPACEWIRE_CONF_T_REMOVE_PROT_ID 72 /**/
#define ERR_SPACEWIRE_CONF_T_RXBLOCK 76 /**/ #define ERR_SPACEWIRE_CONF_T_RXBLOCK 79 /**/
#define ERR_SPACEWIRE_CONF_T_TXBLOCK 83 /**/ #define ERR_SPACEWIRE_CONF_T_TXBLOCK 86 /**/
flag __po_hi_c_spacewire_conf_t_IsConstraintValid(const __po_hi_c_spacewire_conf_t* pVal, int* pErrCode); flag __po_hi_c_spacewire_conf_t_IsConstraintValid(const __po_hi_c_spacewire_conf_t* pVal, int* pErrCode);
extern const __po_hi_c_spacewire_conf_t leon_rasta_spw_sender; extern const __po_hi_c_spacewire_conf_t leon_rasta_spw_sender;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* For more informations, please visit http://taste.tuxfamily.org/wiki * For more informations, please visit http://taste.tuxfamily.org/wiki
* *
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. * Copyright (C) 2007-2009 Telecom ParisTech, 2010-2020 ESA & ISAE.
*/ */
#ifndef __PO_HI_COMMON_H__ #ifndef __PO_HI_COMMON_H__
......
...@@ -6,19 +6,16 @@ ...@@ -6,19 +6,16 @@
## This file has been built for a generic RTEMS integration ## This file has been built for a generic RTEMS integration
MANAGERS = sem rtmon msg timer io MANAGERS = all
LIBS = #-lrtemsall -lc LIBS = -lrtemsall -lc
RTEMS_USES_NEWLIB = no
# PolyORB-HI/C specific flags # PolyORb-HI/C specific flags
POHI_CFLAGS = -DRTEMS_POSIX -DLEON_RTEMS $(GCC_GENERIC_FLAGS) POHI_CFLAGS = -DRTEMS_POSIX -DLEON_RTEMS $(GCC_GENERIC_FLAGS) -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar
# RTEMS/AIR specific flags # RTEMS/AIR specific flags
POHI_CFLAGS += -DAIR_HYPERVISOR -I$(AIR_ROOT)/pmk/core/include \ POHI_CFLAGS += -DAIR_HYPERVISOR -I$(AIR_ROOT)/pmk/core/include \
-I$(AIR_ROOT)/pmk/arch/sparc/include \ -I$(AIR_ROOT)/pmk/arch/sparc/include \
-I$(AIR_ROOT)/install/libs/imaspex/include/ -I./ -B./ -I../common/ \ -I$(AIR_ROOT)/install/libs/imaspex/include/
-B../common/ -DRTEMS5 -B$(AIR_LIBS)/imaspex/ -B$(AIR_LIBS)/libprintf/ \
-B$(AIR_LIBS)/libair/
LD_LIBS = $(AIR_LIBS)/libprintf/libprintf.a \ LD_LIBS = $(AIR_LIBS)/libprintf/libprintf.a \
$(AIR_LIBS)/libair/libair.a $(AIR_LIBS)/imaspex/imaspex.a $(AIR_LIBS)/libair/libair.a $(AIR_LIBS)/imaspex/imaspex.a
...@@ -26,19 +23,12 @@ $(AIR_LIBS)/libair/libair.a $(AIR_LIBS)/imaspex/imaspex.a ...@@ -26,19 +23,12 @@ $(AIR_LIBS)/libair/libair.a $(AIR_LIBS)/imaspex/imaspex.a
LINK_LIBS += $(AIR_LIBS)/libprintf/libprintf.a \ LINK_LIBS += $(AIR_LIBS)/libprintf/libprintf.a \
$(AIR_LIBS)/libair/libair.a $(AIR_LIBS)/imaspex/imaspex.a $(AIR_LIBS)/libair/libair.a $(AIR_LIBS)/imaspex/imaspex.a
# The RTEMS_MAKEFILE_PATH is defined by the user for the specific CPU and BSP include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
RTEMS_MAKEFILE_PATH=$(AIR_POS)/rtems5/rtems5-install/sparc-rtems5/leon3 include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
CPPFLAGS += -DAIR_HYPERVISOR./ -I./ -B./ -I../common/ -B../common/ \ CPPFLAGS += -DAIR_HYPERVISOR./ -I./ -B./ -I../common/ -B../common/ -B$(AIR_LIBS)/libprintf/ -B$(AIR_LIBS)/libair/
-DRTEMS5 -B$(AIR_LIBS)/imaspex/ -B$(AIR_LIBS)/libprintf/ \
-B$(AIR_LIBS)/libair/
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--wrap=printf -Wl,--wrap=puts \
-Wl,--wrap=putchar
############################################################################## ##############################################################################
# RTEMS_API is defined as part of RTEMS BSP Makefile. It reports the # RTEMS_API is defined as part of RTEMS BSP Makefile. It reports the
...@@ -71,8 +61,8 @@ ifeq ($(RTEMS_API),4.12) ...@@ -71,8 +61,8 @@ ifeq ($(RTEMS_API),4.12)
endif endif
ifeq ($(RTEMS_API),5) ifeq ($(RTEMS_API),5)
POHI_CFLAGS += -DRTEMS5 POHI_CFLAGS += -DRTEMS412
TARGET_LDFLAGS += -lm TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.12/ -lm
endif endif
############################################################################## ##############################################################################
...@@ -101,8 +91,17 @@ ifeq ($(RTEMS_BSP),leon2) ...@@ -101,8 +91,17 @@ ifeq ($(RTEMS_BSP),leon2)
POHI_CFLAGS += -DGRLEON2 POHI_CFLAGS += -DGRLEON2
endif endif
ifdef USE_GPROF
TARGET_LDFLAGS+=-Wl,--wrap,Clock_isr -pg
EXTERNAL_OBJECTS+=po_hi_gprof_rtems_leon.o
TARGET_INCLUDE+=-I$(RTEMS_MAKEFILE_PATH)/lib/include/
target-objects:
$(CC) $(INCLUDE) $(TARGET_INCLUDE) -D__PO_HI_USE_GPROF -Wall -c -o po_hi_gprof_rtems_leon.o $(RUNTIME_PATH)/src/po_hi_gprof_rtems_leon.c
else
target-objects:
endif
LINK_LIBS+=-lm LINK_LIBS+=-lm
target-clean: target-clean:
target-objects:
/*
* 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://taste.tuxfamily.org/wiki
*
* Copyright (C) 2020 ESA & ISAE.
*/
/* Note, this file is from RCC1.3rc4 sample directory. /* Note, this file is from RCC1.3rc4 sample directory.
* *
* Any modification there should be carefully weighted. * Any modification there should be carefully weighted.
......
/*
* 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://taste.tuxfamily.org/wiki
*
* Copyright (C) 2020 ESA & ISAE.
*/
/* Note, this file is from RCC1.3rc4 sample directory. /* Note, this file is from RCC1.3rc4 sample directory.
* *
* Any modification there should be carefully weighted. * Any modification there should be carefully weighted.
......
/*
* 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://taste.tuxfamily.org/wiki
*
* Copyright (C) 2020 ESA & ISAE.
*/
#include <bsp/gr_leon4_n2x.h> #include <bsp/gr_leon4_n2x.h>
// Things are always moving around in RTEMS - adapt. // Things are always moving around in RTEMS - adapt.
......
...@@ -137,17 +137,13 @@ flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t ...@@ -137,17 +137,13 @@ flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t
ret = ((1 <= strlen(pVal->devname)) && (strlen(pVal->devname) <= 20)); ret = ((1 <= strlen(pVal->devname)) && (strlen(pVal->devname) <= 20));
*pErrCode = ret ? 0 : ERR_MIL_1553_CONF_T_DEVNAME; *pErrCode = ret ? 0 : ERR_MIL_1553_CONF_T_DEVNAME;
if (ret) { if (ret) {
ret = (((pVal->standard == __po_hi_c_mil1553a)) || ((pVal->standard == __po_hi_c_mil1553b))); ret = __po_hi_c_Standard_T_IsConstraintValid((&(pVal->standard)), pErrCode);
*pErrCode = ret ? 0 : ERR_MIL_1553_CONF_T_STANDARD;
if (ret) { if (ret) {
ret = (((((pVal->mode == __po_hi_c_controller)) || ((pVal->mode == __po_hi_c_terminal)))) || ((pVal->mode == __po_hi_c_monitor))); ret = __po_hi_c_Mode_T_IsConstraintValid((&(pVal->mode)), pErrCode);
*pErrCode = ret ? 0 : ERR_MIL_1553_CONF_T_MODE;
if (ret) { if (ret) {
ret = (((((((pVal->bus == __po_hi_c_none)) || ((pVal->bus == __po_hi_c_bus_a)))) || ((pVal->bus == __po_hi_c_bus_b)))) || ((pVal->bus == __po_hi_c_both))); ret = __po_hi_c_Bus_T_IsConstraintValid((&(pVal->bus)), pErrCode);
*pErrCode = ret ? 0 : ERR_MIL_1553_CONF_T_BUS;
if (ret) { if (ret) {
ret = (pVal->termaddr <= 31UL); ret = __po_hi_c_Node_Addr_T_IsConstraintValid((&(pVal->termaddr)), pErrCode);
*pErrCode = ret ? 0 : ERR_MIL_1553_CONF_T_TERMADDR;
} }
} }
} }
......
AUTOMAKE_OPTIONS = no-dependencies AUTOMAKE_OPTIONS = no-dependencies
C_FILES = $(srcdir)/1553.c \ C_FILES = $(srcdir)/1553.c $(srcdir)/ip.c $(srcdir)/serial.c \
$(srcdir)/ip.c \ $(srcdir)/spacewire.c $(srcdir)/bluetooth.c
$(srcdir)/serial.c \
$(srcdir)/spacewire.c
ASN_FILES = $(srcdir)/1553.asn \
$(srcdir)/ip.asn \
$(srcdir)/serial.asn \
$(srcdir)/spacewire.asn
ASN_FILES = $(srcdir)/1553.asn $(srcdir)/ip.asn $(srcdir)/serial.asn \
$(srcdir)/spacewire.asn $(srcdir)/bluetooth.asn
csrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/src/drivers/configuration'} csrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/src/drivers/configuration'}
t:
echo $(shell shell which asn1.exe)
echo `shell which asn1.exe`