Commit 7bfd1016 authored by jdelange's avatar jdelange

* Add definition of configuration samples



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2583 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 9208bc92
......@@ -2,8 +2,8 @@
#define _INC_1553_H
/*
Code automatically generated by asn1scc tool
Date was: 2/9/2011
Time was: 17:39:10
Date was: 5/9/2011
Time was: 12:43:02
*/
#include "asn1crt.h"
......@@ -27,8 +27,6 @@ typedef asn1SccSint __po_hi_c_Node_Addr_T;
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);
flag __po_hi_c_Node_Addr_T_Equal(const __po_hi_c_Node_Addr_T* val1, const __po_hi_c_Node_Addr_T* val2);
typedef enum {
......@@ -47,8 +45,6 @@ typedef enum {
void __po_hi_c_Standard_T_Initialize(__po_hi_c_Standard_T* pVal);
flag __po_hi_c_Standard_T_IsConstraintValid(const __po_hi_c_Standard_T* val, int* pErrCode);
flag __po_hi_c_Standard_T_Equal(const __po_hi_c_Standard_T* val1, const __po_hi_c_Standard_T* val2);
typedef enum {
......@@ -68,8 +64,6 @@ typedef enum {
void __po_hi_c_Mode_T_Initialize(__po_hi_c_Mode_T* pVal);
flag __po_hi_c_Mode_T_IsConstraintValid(const __po_hi_c_Mode_T* val, int* pErrCode);
flag __po_hi_c_Mode_T_Equal(const __po_hi_c_Mode_T* val1, const __po_hi_c_Mode_T* val2);
typedef enum {
......@@ -90,8 +84,6 @@ typedef enum {
void __po_hi_c_Bus_T_Initialize(__po_hi_c_Bus_T* pVal);
flag __po_hi_c_Bus_T_IsConstraintValid(const __po_hi_c_Bus_T* val, int* pErrCode);
flag __po_hi_c_Bus_T_Equal(const __po_hi_c_Bus_T* val1, const __po_hi_c_Bus_T* val2);
typedef struct {
......@@ -120,8 +112,6 @@ typedef struct {
void __po_hi_c_mil_1553_conf_t_Initialize(__po_hi_c_mil_1553_conf_t* pVal);
flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t* val, int* pErrCode);
flag __po_hi_c_mil_1553_conf_t_Equal(const __po_hi_c_mil_1553_conf_t* val1, const __po_hi_c_mil_1553_conf_t* val2);
......
......@@ -38,7 +38,6 @@ typedef asn1SccSint32 asn1SccSint;
typedef int flag;
//typedef int BOOL;
typedef char NullType;
......
......@@ -2,8 +2,8 @@
#define _INC_IP_H
/*
Code automatically generated by asn1scc tool
Date was: 2/9/2011
Time was: 17:39:11
Date was: 5/9/2011
Time was: 12:43:03
*/
#include "asn1crt.h"
......@@ -27,8 +27,6 @@ typedef asn1SccSint __po_hi_c_Port_T;
void __po_hi_c_Port_T_Initialize(__po_hi_c_Port_T* pVal);
flag __po_hi_c_Port_T_IsConstraintValid(const __po_hi_c_Port_T* val, int* pErrCode);
flag __po_hi_c_Port_T_Equal(const __po_hi_c_Port_T* val1, const __po_hi_c_Port_T* val2);
typedef enum {
......@@ -47,8 +45,6 @@ typedef enum {
void __po_hi_c_Version_T_Initialize(__po_hi_c_Version_T* pVal);
flag __po_hi_c_Version_T_IsConstraintValid(const __po_hi_c_Version_T* val, int* pErrCode);
flag __po_hi_c_Version_T_Equal(const __po_hi_c_Version_T* val1, const __po_hi_c_Version_T* val2);
typedef struct {
......@@ -75,10 +71,10 @@ typedef struct {
void __po_hi_c_ip_conf_t_Initialize(__po_hi_c_ip_conf_t* pVal);
flag __po_hi_c_ip_conf_t_IsConstraintValid(const __po_hi_c_ip_conf_t* val, int* pErrCode);
flag __po_hi_c_ip_conf_t_Equal(const __po_hi_c_ip_conf_t* val1, const __po_hi_c_ip_conf_t* val2);
extern __po_hi_c_ip_conf_t localhost1;
extern __po_hi_c_ip_conf_t localhost2;
#ifdef __cplusplus
}
......
......@@ -2,8 +2,8 @@
#define _INC_SERIAL_H
/*
Code automatically generated by asn1scc tool
Date was: 2/9/2011
Time was: 17:39:11
Date was: 5/9/2011
Time was: 12:43:04
*/
#include "asn1crt.h"
......@@ -34,8 +34,6 @@ typedef enum {
void __po_hi_c_Baudrate_T_Initialize(__po_hi_c_Baudrate_T* pVal);
flag __po_hi_c_Baudrate_T_IsConstraintValid(const __po_hi_c_Baudrate_T* val, int* pErrCode);
flag __po_hi_c_Baudrate_T_Equal(const __po_hi_c_Baudrate_T* val1, const __po_hi_c_Baudrate_T* val2);
typedef enum {
......@@ -54,8 +52,6 @@ typedef enum {
void __po_hi_c_Parity_T_Initialize(__po_hi_c_Parity_T* pVal);
flag __po_hi_c_Parity_T_IsConstraintValid(const __po_hi_c_Parity_T* val, int* pErrCode);
flag __po_hi_c_Parity_T_Equal(const __po_hi_c_Parity_T* val1, const __po_hi_c_Parity_T* val2);
typedef struct {
......@@ -86,10 +82,10 @@ typedef struct {
void __po_hi_c_serial_conf_t_Initialize(__po_hi_c_serial_conf_t* pVal);
flag __po_hi_c_serial_conf_t_IsConstraintValid(const __po_hi_c_serial_conf_t* val, int* pErrCode);
flag __po_hi_c_serial_conf_t_Equal(const __po_hi_c_serial_conf_t* val1, const __po_hi_c_serial_conf_t* val2);
extern __po_hi_c_serial_conf_t linux_ttyS0;
extern __po_hi_c_serial_conf_t leon_rasta_apburasta0;
#ifdef __cplusplus
}
......
......@@ -2,8 +2,8 @@
#define _INC_SPACEWIRE_H
/*
Code automatically generated by asn1scc tool
Date was: 2/11/2011
Time was: 10:30:36
Date was: 5/9/2011
Time was: 12:43:04
*/
#include "asn1crt.h"
......@@ -27,8 +27,6 @@ typedef asn1SccSint __po_hi_c_Core_Frequence_T;
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);
flag __po_hi_c_Core_Frequence_T_Equal(const __po_hi_c_Core_Frequence_T* val1, const __po_hi_c_Core_Frequence_T* val2);
typedef asn1SccSint __po_hi_c_Node_Addr_T;
......@@ -44,8 +42,6 @@ typedef asn1SccSint __po_hi_c_Node_Addr_T;
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);
flag __po_hi_c_Node_Addr_T_Equal(const __po_hi_c_Node_Addr_T* val1, const __po_hi_c_Node_Addr_T* val2);
typedef asn1SccSint __po_hi_c_Clock_Division_T;
......@@ -61,8 +57,6 @@ typedef asn1SccSint __po_hi_c_Clock_Division_T;
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);
flag __po_hi_c_Clock_Division_T_Equal(const __po_hi_c_Clock_Division_T* val1, const __po_hi_c_Clock_Division_T* val2);
typedef struct {
......@@ -93,10 +87,10 @@ typedef struct {
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);
flag __po_hi_c_spacewire_conf_t_Equal(const __po_hi_c_spacewire_conf_t* val1, const __po_hi_c_spacewire_conf_t* val2);
extern __po_hi_c_spacewire_conf_t leon_rasta_spw_sender;
extern __po_hi_c_spacewire_conf_t leon_rasta_spw_receiver;
#ifdef __cplusplus
}
......
#if (defined (__PO_HI_NEED_DRIVER_1553_RASTA))\n
/*
Code automatically generated by asn1scc tool
Date was: 2/9/2011
Time was: 17:39:10
Date was: 5/9/2011
Time was: 12:43:03
*/
#include <string.h>
#include <math.h>
......@@ -29,15 +29,6 @@ flag __po_hi_c_Node_Addr_T_IsConstraintValid(const __po_hi_c_Node_Addr_T* pVal,
return TRUE;
}
flag __po_hi_c_Node_Addr_T_Equal(const __po_hi_c_Node_Addr_T* pVal1, const __po_hi_c_Node_Addr_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -54,15 +45,6 @@ flag __po_hi_c_Standard_T_IsConstraintValid(const __po_hi_c_Standard_T* pVal, in
return TRUE;
}
flag __po_hi_c_Standard_T_Equal(const __po_hi_c_Standard_T* pVal1, const __po_hi_c_Standard_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -79,15 +61,6 @@ flag __po_hi_c_Mode_T_IsConstraintValid(const __po_hi_c_Mode_T* pVal, int* pErrC
return TRUE;
}
flag __po_hi_c_Mode_T_Equal(const __po_hi_c_Mode_T* pVal1, const __po_hi_c_Mode_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -104,15 +77,6 @@ flag __po_hi_c_Bus_T_IsConstraintValid(const __po_hi_c_Bus_T* pVal, int* pErrCod
return TRUE;
}
flag __po_hi_c_Bus_T_Equal(const __po_hi_c_Bus_T* pVal1, const __po_hi_c_Bus_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -157,37 +121,6 @@ flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t
return TRUE;
}
flag __po_hi_c_mil_1553_conf_t_Equal(const __po_hi_c_mil_1553_conf_t* pVal1, const __po_hi_c_mil_1553_conf_t* pVal2)
{
if (strcmp(pVal1->devname, pVal2->devname) !=0)
return FALSE;
if (!__po_hi_c_Standard_T_Equal(&pVal1->standard, &pVal2->standard))
return FALSE;
if (!__po_hi_c_Mode_T_Equal(&pVal1->mode, &pVal2->mode))
return FALSE;
if (!__po_hi_c_Bus_T_Equal(&pVal1->bus, &pVal2->bus))
return FALSE;
if (!__po_hi_c_Node_Addr_T_Equal(&pVal1->termaddr, &pVal2->termaddr))
return FALSE;
if ( (pVal1->broadcast && !pVal2->broadcast) || (!pVal1->broadcast && pVal2->broadcast))
return FALSE;
if (pVal1->exist.rxblock != pVal2->exist.rxblock)
return FALSE;
if (pVal1->exist.rxblock) {
if ( (pVal1->rxblock && !pVal2->rxblock) || (!pVal1->rxblock && pVal2->rxblock))
return FALSE;
}
if (pVal1->exist.txblock != pVal2->exist.txblock)
return FALSE;
if (pVal1->exist.txblock) {
if ( (pVal1->txblock && !pVal2->txblock) || (!pVal1->txblock && pVal2->txblock))
return FALSE;
}
return TRUE;
}
......
......@@ -12,5 +12,18 @@ IP-Conf-T ::= SEQUENCE {
port Port-T
}
localhost1 IP-Conf-T ::= {
devname "eth0",
address "127.0.0.1",
port 5489
}
localhost2 IP-Conf-T ::= {
devname "eth0",
address "127.0.0.1",
port 5489
}
END
#if (defined (__PO_HI_NEED_DRIVER_SOCKETS) || defined (__PO_HI_NEED_DRIVER_RTEMS_NE2000_SOCKETS))\n
/*
Code automatically generated by asn1scc tool
Date was: 2/9/2011
Time was: 17:39:11
Date was: 5/9/2011
Time was: 12:43:03
*/
#include <string.h>
#include <math.h>
......@@ -10,6 +10,16 @@ Time was: 17:39:11
#ifndef _MSC_VER
__po_hi_c_ip_conf_t localhost1 = {
.devname = "eth0",
.address = "127.0.0.1",
.port = 5489
};
__po_hi_c_ip_conf_t localhost2 = {
.devname = "eth0",
.address = "127.0.0.1",
.port = 5489
};
#endif
void __po_hi_c_Port_T_Initialize(__po_hi_c_Port_T* pVal)
......@@ -29,15 +39,6 @@ flag __po_hi_c_Port_T_IsConstraintValid(const __po_hi_c_Port_T* pVal, int* pErrC
return TRUE;
}
flag __po_hi_c_Port_T_Equal(const __po_hi_c_Port_T* pVal1, const __po_hi_c_Port_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -54,15 +55,6 @@ flag __po_hi_c_Version_T_IsConstraintValid(const __po_hi_c_Version_T* pVal, int*
return TRUE;
}
flag __po_hi_c_Version_T_Equal(const __po_hi_c_Version_T* pVal1, const __po_hi_c_Version_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -98,25 +90,6 @@ flag __po_hi_c_ip_conf_t_IsConstraintValid(const __po_hi_c_ip_conf_t* pVal, int*
return TRUE;
}
flag __po_hi_c_ip_conf_t_Equal(const __po_hi_c_ip_conf_t* pVal1, const __po_hi_c_ip_conf_t* pVal2)
{
if (strcmp(pVal1->devname, pVal2->devname) !=0)
return FALSE;
if (strcmp(pVal1->address, pVal2->address) !=0)
return FALSE;
if (pVal1->exist.version != pVal2->exist.version)
return FALSE;
if (pVal1->exist.version) {
if (!__po_hi_c_Version_T_Equal(&pVal1->version, &pVal2->version))
return FALSE;
}
if (!__po_hi_c_Port_T_Equal(&pVal1->port, &pVal2->port))
return FALSE;
return TRUE;
}
......
......@@ -17,5 +17,16 @@ Serial-Conf-T ::= SEQUENCE {
bits INTEGER (7 .. 8) OPTIONAL,
use-paritybit BOOLEAN OPTIONAL
}
linux-ttyS0 Serial-Conf-T ::= {
devname "/dev/ttyS0",
speed b38400
}
leon-rasta-apburasta0 Serial-Conf-T ::= {
devname "/dev/apburasta0",
speed b38400
}
END
#if (defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX) || defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX_RECEIVER) || defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX_SENDER) || defined (__PO_HI_NEED_DRIVER_SERIAL_RASTA) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON_SENDER) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON_RECEIVER))\n
/*
Code automatically generated by asn1scc tool
Date was: 2/9/2011
Time was: 17:39:11
Date was: 5/9/2011
Time was: 12:43:04
*/
#include <string.h>
#include <math.h>
......@@ -10,6 +10,20 @@ Time was: 17:39:11
#ifndef _MSC_VER
__po_hi_c_serial_conf_t linux_ttyS0 = {
.devname = "/dev/ttyS0",
.speed = __po_hi_c_b38400,
.exist = {
.speed = 1
}
};
__po_hi_c_serial_conf_t leon_rasta_apburasta0 = {
.devname = "/dev/apburasta0",
.speed = __po_hi_c_b38400,
.exist = {
.speed = 1
}
};
#endif
void __po_hi_c_Baudrate_T_Initialize(__po_hi_c_Baudrate_T* pVal)
......@@ -25,15 +39,6 @@ flag __po_hi_c_Baudrate_T_IsConstraintValid(const __po_hi_c_Baudrate_T* pVal, in
return TRUE;
}
flag __po_hi_c_Baudrate_T_Equal(const __po_hi_c_Baudrate_T* pVal1, const __po_hi_c_Baudrate_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -50,15 +55,6 @@ flag __po_hi_c_Parity_T_IsConstraintValid(const __po_hi_c_Parity_T* pVal, int* p
return TRUE;
}
flag __po_hi_c_Parity_T_Equal(const __po_hi_c_Parity_T* pVal1, const __po_hi_c_Parity_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -101,39 +97,6 @@ flag __po_hi_c_serial_conf_t_IsConstraintValid(const __po_hi_c_serial_conf_t* pV
return TRUE;
}
flag __po_hi_c_serial_conf_t_Equal(const __po_hi_c_serial_conf_t* pVal1, const __po_hi_c_serial_conf_t* pVal2)
{
if (strcmp(pVal1->devname, pVal2->devname) !=0)
return FALSE;
if (pVal1->exist.speed != pVal2->exist.speed)
return FALSE;
if (pVal1->exist.speed) {
if (!__po_hi_c_Baudrate_T_Equal(&pVal1->speed, &pVal2->speed))
return FALSE;
}
if (pVal1->exist.parity != pVal2->exist.parity)
return FALSE;
if (pVal1->exist.parity) {
if (!__po_hi_c_Parity_T_Equal(&pVal1->parity, &pVal2->parity))
return FALSE;
}
if (pVal1->exist.bits != pVal2->exist.bits)
return FALSE;
if (pVal1->exist.bits) {
if (pVal1->bits != pVal2->bits)
return FALSE;
}
if (pVal1->exist.use_paritybit != pVal2->exist.use_paritybit)
return FALSE;
if (pVal1->exist.use_paritybit) {
if ( (pVal1->use_paritybit && !pVal2->use_paritybit) || (!pVal1->use_paritybit && pVal2->use_paritybit))
return FALSE;
}
return TRUE;
}
......
......@@ -17,6 +17,18 @@ Spacewire-Conf-T ::= SEQUENCE {
}
leon-rasta-spw-sender Spacewire-Conf-T ::= {
devname "/dev/grspwrasta0",
nodeaddr 11
}
leon-rasta-spw-receiver Spacewire-Conf-T ::= {
devname "/dev/grspwrasta0",
nodeaddr 22
}
END
#if (defined (__PO_HI_NEED_DRIVER_SPACEWIRE_RASTA))\n
/*
Code automatically generated by asn1scc tool
Date was: 2/11/2011
Time was: 10:30:37
Date was: 5/9/2011
Time was: 12:43:04
*/
#include <string.h>
#include <math.h>
......@@ -10,6 +10,14 @@ Time was: 10:30:37
#ifndef _MSC_VER
__po_hi_c_spacewire_conf_t leon_rasta_spw_sender = {
.devname = "/dev/grspwrasta0",
.nodeaddr = 11
};
__po_hi_c_spacewire_conf_t leon_rasta_spw_receiver = {
.devname = "/dev/grspwrasta0",
.nodeaddr = 22
};
#endif
void __po_hi_c_Core_Frequence_T_Initialize(__po_hi_c_Core_Frequence_T* pVal)
......@@ -29,15 +37,6 @@ flag __po_hi_c_Core_Frequence_T_IsConstraintValid(const __po_hi_c_Core_Frequence
return TRUE;
}
flag __po_hi_c_Core_Frequence_T_Equal(const __po_hi_c_Core_Frequence_T* pVal1, const __po_hi_c_Core_Frequence_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -58,15 +57,6 @@ flag __po_hi_c_Node_Addr_T_IsConstraintValid(const __po_hi_c_Node_Addr_T* pVal,
return TRUE;
}
flag __po_hi_c_Node_Addr_T_Equal(const __po_hi_c_Node_Addr_T* pVal1, const __po_hi_c_Node_Addr_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -87,15 +77,6 @@ flag __po_hi_c_Clock_Division_T_IsConstraintValid(const __po_hi_c_Clock_Division
return TRUE;
}
flag __po_hi_c_Clock_Division_T_Equal(const __po_hi_c_Clock_Division_T* pVal1, const __po_hi_c_Clock_Division_T* pVal2)
{
if (*pVal1 != *pVal2)
return FALSE;
return TRUE;
}
......@@ -141,47 +122,6 @@ flag __po_hi_c_spacewire_conf_t_IsConstraintValid(const __po_hi_c_spacewire_conf
return TRUE;
}
flag __po_hi_c_spacewire_conf_t_Equal(const __po_hi_c_spacewire_conf_t* pVal1, const __po_hi_c_spacewire_conf_t* pVal2)
{
if (strcmp(pVal1->devname, pVal2->devname) !=0)
return FALSE;
if (!__po_hi_c_Node_Addr_T_Equal(&pVal1->nodeaddr, &pVal2->nodeaddr))
return FALSE;
if (pVal1->exist.corefreq != pVal2->exist.corefreq)
return FALSE;
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;
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)
return FALSE;
if (pVal1->exist.remove_prot_id) {
if ( (pVal1->remove_prot_id && !pVal2->remove_prot_id) || (!pVal1->remove_prot_id && pVal2->remove_prot_id))
return FALSE;
}
if (pVal1->exist.rxblock != pVal2->exist.rxblock)
return FALSE;
if (pVal1->exist.rxblock) {
if ( (pVal1->rxblock && !pVal2->rxblock) || (!pVal1->rxblock && pVal2->rxblock))
return FALSE;
}
if (pVal1->exist.txblock != pVal2->exist.txblock)
return FALSE;
if (pVal1->exist.txblock) {
if ( (pVal1->txblock && !pVal2->txblock) || (!pVal1->txblock && pVal2->txblock))
return FALSE;
}
return TRUE;
}
......
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