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

* Add files generated by asn1.exe



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2041 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent e138c3c9
#ifndef _INC_1553_H
#define _INC_1553_H
/*
Code automatically generated by asn1scc tool
Date was: 1/24/2011
Time was: 20:29:04
*/
#include "asn1crt.h"
#ifdef __cplusplus
extern "C" {
#endif
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 5
#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 5
#ifndef ERR___po_hi_c_Node_Addr_T
#define ERR___po_hi_c_Node_Addr_T 1000 /* (0..31) */
#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);
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 {
__po_hi_c_mil1553a = 0,
__po_hi_c_mil1553b = 1
} __po_hi_c_Standard_T;
#define __po_hi_c_Standard_T_REQUIRED_BYTES_FOR_ENCODING 1
#define __po_hi_c_Standard_T_REQUIRED_BITS_FOR_ENCODING 1
#define __po_hi_c_Standard_T_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define __po_hi_c_Standard_T_REQUIRED_BITS_FOR_ACN_ENCODING 1
#ifndef ERR___po_hi_c_Standard_T_unknown_enumeration_value
#define ERR___po_hi_c_Standard_T_unknown_enumeration_value 1001 /* invalid enumeration value */
#endif
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 {
__po_hi_c_controller = 0,
__po_hi_c_terminal = 1,
__po_hi_c_monitor = 2
} __po_hi_c_Mode_T;
#define __po_hi_c_Mode_T_REQUIRED_BYTES_FOR_ENCODING 1
#define __po_hi_c_Mode_T_REQUIRED_BITS_FOR_ENCODING 2
#define __po_hi_c_Mode_T_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define __po_hi_c_Mode_T_REQUIRED_BITS_FOR_ACN_ENCODING 2
#ifndef ERR___po_hi_c_Mode_T_unknown_enumeration_value
#define ERR___po_hi_c_Mode_T_unknown_enumeration_value 1002 /* invalid enumeration value */
#endif
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 {
__po_hi_c_none = 0,
__po_hi_c_bus_a = 1,
__po_hi_c_bus_b = 2,
__po_hi_c_both = 3
} __po_hi_c_Bus_T;
#define __po_hi_c_Bus_T_REQUIRED_BYTES_FOR_ENCODING 1
#define __po_hi_c_Bus_T_REQUIRED_BITS_FOR_ENCODING 2
#define __po_hi_c_Bus_T_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define __po_hi_c_Bus_T_REQUIRED_BITS_FOR_ACN_ENCODING 2
#ifndef ERR___po_hi_c_Bus_T_unknown_enumeration_value
#define ERR___po_hi_c_Bus_T_unknown_enumeration_value 1003 /* invalid enumeration value */
#endif
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 {
char devname[21];
__po_hi_c_Standard_T standard;
__po_hi_c_Mode_T mode;
__po_hi_c_Bus_T bus;
__po_hi_c_Node_Addr_T termaddr;
flag broadcast;
flag rxblock;
flag txblock;
struct {
unsigned int rxblock:1;
unsigned int txblock:1;
} exist;
} __po_hi_c_mil_1553_conf_t;
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BYTES_FOR_ENCODING 20
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BITS_FOR_ENCODING 160
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING 23
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING 180
#ifndef ERR___po_hi_c_mil_1553_conf_t_devname
#define ERR___po_hi_c_mil_1553_conf_t_devname 1004 /* (SIZE (1..20)) */
#endif
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);
#ifdef __cplusplus
}
#define ENUM___po_hi_c_mil1553a __po_hi_c_mil1553a
#define ENUM___po_hi_c_mil1553b __po_hi_c_mil1553b
#define ENUM___po_hi_c_controller __po_hi_c_controller
#define ENUM___po_hi_c_terminal __po_hi_c_terminal
#define ENUM___po_hi_c_monitor __po_hi_c_monitor
#define ENUM___po_hi_c_none __po_hi_c_none
#define ENUM___po_hi_c_bus_a __po_hi_c_bus_a
#define ENUM___po_hi_c_bus_b __po_hi_c_bus_b
#define ENUM___po_hi_c_both __po_hi_c_both
#endif
#endif
This diff is collapsed.
#ifndef _INC_IP_H
#define _INC_IP_H
/*
Code automatically generated by asn1scc tool
Date was: 1/24/2011
Time was: 20:29:05
*/
#include "asn1crt.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef asn1SccSint __po_hi_c_Port_T;
#define __po_hi_c_Port_T_REQUIRED_BYTES_FOR_ENCODING 2
#define __po_hi_c_Port_T_REQUIRED_BITS_FOR_ENCODING 15
#define __po_hi_c_Port_T_REQUIRED_BYTES_FOR_ACN_ENCODING 2
#define __po_hi_c_Port_T_REQUIRED_BITS_FOR_ACN_ENCODING 15
#ifndef ERR___po_hi_c_Port_T
#define ERR___po_hi_c_Port_T 1000 /* (0..16535) */
#endif
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 {
__po_hi_c_ipv4 = 0,
__po_hi_c_ipv6 = 1
} __po_hi_c_Version_T;
#define __po_hi_c_Version_T_REQUIRED_BYTES_FOR_ENCODING 1
#define __po_hi_c_Version_T_REQUIRED_BITS_FOR_ENCODING 1
#define __po_hi_c_Version_T_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define __po_hi_c_Version_T_REQUIRED_BITS_FOR_ACN_ENCODING 1
#ifndef ERR___po_hi_c_Version_T_unknown_enumeration_value
#define ERR___po_hi_c_Version_T_unknown_enumeration_value 1001 /* invalid enumeration value */
#endif
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 {
char devname[21];
char address[41];
__po_hi_c_Version_T version;
__po_hi_c_Port_T port;
struct {
unsigned int version:1;
} exist;
} __po_hi_c_ip_conf_t;
#define __po_hi_c_ip_conf_t_REQUIRED_BYTES_FOR_ENCODING 56
#define __po_hi_c_ip_conf_t_REQUIRED_BITS_FOR_ENCODING 448
#define __po_hi_c_ip_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING 64
#define __po_hi_c_ip_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING 508
#ifndef ERR___po_hi_c_ip_conf_t_devname
#define ERR___po_hi_c_ip_conf_t_devname 1002 /* (SIZE (1..20)) */
#endif
#ifndef ERR___po_hi_c_ip_conf_t_address
#define ERR___po_hi_c_ip_conf_t_address 1003 /* (SIZE (1..40)) */
#endif
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);
#ifdef __cplusplus
}
#define ENUM___po_hi_c_ipv4 __po_hi_c_ipv4
#define ENUM___po_hi_c_ipv6 __po_hi_c_ipv6
#endif
#endif
#ifndef _INC_SERIAL_H
#define _INC_SERIAL_H
/*
Code automatically generated by asn1scc tool
Date was: 1/24/2011
Time was: 20:29:06
*/
#include "asn1crt.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
__po_hi_c_b9600 = 0,
__po_hi_c_b19200 = 1,
__po_hi_c_b38400 = 2,
__po_hi_c_b57600 = 3,
__po_hi_c_b115200 = 4,
__po_hi_c_b230400 = 5
} __po_hi_c_Baudrate_T;
#define __po_hi_c_Baudrate_T_REQUIRED_BYTES_FOR_ENCODING 1
#define __po_hi_c_Baudrate_T_REQUIRED_BITS_FOR_ENCODING 3
#define __po_hi_c_Baudrate_T_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define __po_hi_c_Baudrate_T_REQUIRED_BITS_FOR_ACN_ENCODING 3
#ifndef ERR___po_hi_c_Baudrate_T_unknown_enumeration_value
#define ERR___po_hi_c_Baudrate_T_unknown_enumeration_value 1000 /* invalid enumeration value */
#endif
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 {
__po_hi_c_even = 0,
__po_hi_c_odd = 1
} __po_hi_c_Parity_T;
#define __po_hi_c_Parity_T_REQUIRED_BYTES_FOR_ENCODING 1
#define __po_hi_c_Parity_T_REQUIRED_BITS_FOR_ENCODING 1
#define __po_hi_c_Parity_T_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define __po_hi_c_Parity_T_REQUIRED_BITS_FOR_ACN_ENCODING 1
#ifndef ERR___po_hi_c_Parity_T_unknown_enumeration_value
#define ERR___po_hi_c_Parity_T_unknown_enumeration_value 1001 /* invalid enumeration value */
#endif
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 {
char devname[21];
__po_hi_c_Baudrate_T speed;
__po_hi_c_Parity_T parity;
asn1SccSint bits;
flag use_paritybit;
struct {
unsigned int speed:1;
unsigned int parity:1;
unsigned int bits:1;
unsigned int use_paritybit:1;
} exist;
} __po_hi_c_serial_conf_t;
#define __po_hi_c_serial_conf_t_REQUIRED_BYTES_FOR_ENCODING 20
#define __po_hi_c_serial_conf_t_REQUIRED_BITS_FOR_ENCODING 155
#define __po_hi_c_serial_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING 22
#define __po_hi_c_serial_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING 175
#ifndef ERR___po_hi_c_serial_conf_t_devname
#define ERR___po_hi_c_serial_conf_t_devname 1002 /* (SIZE (1..20)) */
#endif
#ifndef ERR___po_hi_c_serial_conf_t_bits
#define ERR___po_hi_c_serial_conf_t_bits 1003 /* (7..8) */
#endif
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);
#ifdef __cplusplus
}
#define ENUM___po_hi_c_b9600 __po_hi_c_b9600
#define ENUM___po_hi_c_b19200 __po_hi_c_b19200
#define ENUM___po_hi_c_b38400 __po_hi_c_b38400
#define ENUM___po_hi_c_b57600 __po_hi_c_b57600
#define ENUM___po_hi_c_b115200 __po_hi_c_b115200
#define ENUM___po_hi_c_b230400 __po_hi_c_b230400
#define ENUM___po_hi_c_even __po_hi_c_even
#define ENUM___po_hi_c_odd __po_hi_c_odd
#endif
#endif
#ifndef _INC_SPACEWIRE_H
#define _INC_SPACEWIRE_H
/*
Code automatically generated by asn1scc tool
Date was: 1/24/2011
Time was: 20:29:07
*/
#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
#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);
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;
#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
#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);
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;
#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
#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);
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 {
char devname[21];
__po_hi_c_Node_Addr_T nodeaddr;
__po_hi_c_Core_Frequence_T corefreq;
__po_hi_c_Clock_Division_T clockdiv;
flag remove_prot_id;
flag rxblock;
flag txblock;
struct {
unsigned int remove_prot_id:1;
unsigned int rxblock:1;
unsigned int txblock:1;
} exist;
} __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_BITS_FOR_ENCODING 199
#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
#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);
flag __po_hi_c_spacewire_conf_t_Equal(const __po_hi_c_spacewire_conf_t* val1, const __po_hi_c_spacewire_conf_t* val2);
#ifdef __cplusplus
}
#endif
#endif
......@@ -50,6 +50,7 @@ __po_hi_device_id __po_hi_get_device_from_port (const __po_hi_port_t port);
char* __po_hi_get_device_naming (const __po_hi_device_id dev);
__po_hi_uint32_t* __po_hi_get_device_configuration (const __po_hi_device_id);
#endif /* __PO_HI_NB_PORTS > 0 */
......
/*
Code automatically generated by asn1scc tool
Date was: 1/24/2011
Time was: 20:29:04
*/
#include <string.h>
#include <math.h>
#include "1553.h"
#ifndef _MSC_VER
#endif
void __po_hi_c_Node_Addr_T_Initialize(__po_hi_c_Node_Addr_T* pVal)
{
*pVal = 0;
}
flag __po_hi_c_Node_Addr_T_IsConstraintValid(const __po_hi_c_Node_Addr_T* pVal, int* pErrCode)
{
if ( !(((*pVal>=0) && (*pVal<=31))) ) {
*pErrCode = ERR___po_hi_c_Node_Addr_T;
return FALSE;
}
(void)pVal; /*Dummy statement, just to hide potential warning*/
(void)pErrCode; /*Dummy statement, just to hide potential warning*/
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;
}
void __po_hi_c_Standard_T_Initialize(__po_hi_c_Standard_T* pVal)
{
*pVal = __po_hi_c_mil1553a;
}
flag __po_hi_c_Standard_T_IsConstraintValid(const __po_hi_c_Standard_T* pVal, int* pErrCode)
{
(void)pVal; /*Dummy statement, just to hide potential warning*/
(void)pErrCode; /*Dummy statement, just to hide potential warning*/
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;
}
void __po_hi_c_Mode_T_Initialize(__po_hi_c_Mode_T* pVal)
{
*pVal = __po_hi_c_controller;
}
flag __po_hi_c_Mode_T_IsConstraintValid(const __po_hi_c_Mode_T* pVal, int* pErrCode)
{
(void)pVal; /*Dummy statement, just to hide potential warning*/
(void)pErrCode; /*Dummy statement, just to hide potential warning*/
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;
}
void __po_hi_c_Bus_T_Initialize(__po_hi_c_Bus_T* pVal)
{
*pVal = __po_hi_c_none;
}
flag __po_hi_c_Bus_T_IsConstraintValid(const __po_hi_c_Bus_T* pVal, int* pErrCode)
{
(void)pVal; /*Dummy statement, just to hide potential warning*/
(void)pErrCode; /*Dummy statement, just to hide potential warning*/
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;
}
void __po_hi_c_mil_1553_conf_t_Initialize(__po_hi_c_mil_1553_conf_t* pVal)
{
memset(pVal->devname, 0x0, 21);
__po_hi_c_Standard_T_Initialize(&pVal->standard);
__po_hi_c_Mode_T_Initialize(&pVal->mode);
__po_hi_c_Bus_T_Initialize(&pVal->bus);
pVal->termaddr = 0;
pVal->broadcast = FALSE;
pVal->rxblock = FALSE;
pVal->txblock = FALSE;
}
flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t* pVal, int* pErrCode)
{
if ( !(((strlen(pVal->devname)>=1) && (strlen(pVal->devname)<=20))) ) {
*pErrCode = ERR___po_hi_c_mil_1553_conf_t_devname;
return FALSE;
}
if ( !__po_hi_c_Standard_T_IsConstraintValid(&pVal->standard, pErrCode))
return FALSE;
if ( !__po_hi_c_Mode_T_IsConstraintValid(&pVal->mode, pErrCode))
return FALSE;
if ( !__po_hi_c_Bus_T_IsConstraintValid(&pVal->bus, pErrCode))
return FALSE;
if ( !__po_hi_c_Node_Addr_T_IsConstraintValid(&pVal->termaddr, pErrCode))
return FALSE;
if (pVal->exist.rxblock) {
}
if (pVal->exist.txblock) {
}
(void)pVal; /*Dummy statement, just to hide potential warning*/
(void)pErrCode; /*Dummy statement, just to hide potential warning*/
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;
}
/*
Code automatically generated by asn1scc tool
Date was: 1/24/2011
Time was: 20:29:05
*/
#include <string.h>
#include <math.h>
#include "ip.h"
#ifndef _MSC_VER
#endif
void __po_hi_c_Port_T_Initialize(__po_hi_c_Port_T* pVal)
{
*pVal = 0;
}
flag __po_hi_c_Port_T_IsConstraintValid(const __po_hi_c_Port_T* pVal, int* pErrCode)
{
if ( !(((*pVal>=0) && (*pVal<=16535))) ) {
*pErrCode = ERR___po_hi_c_Port_T;
return FALSE;
}
(void)pVal; /*Dummy statement, just to hide potential warning*/
(void)pErrCode; /*Dummy statement, just to hide potential warning*/
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;
}
void __po_hi_c_Version_T_Initialize(__po_hi_c_Version_T* pVal)
{
*pVal = __po_hi_c_ipv4;
}
flag __po_hi_c_Version_T_IsConstraintValid(const __po_hi_c_Version_T* pVal, int* pErrCode)
{
(void)pVal; /*Dummy statement, just to hide potential warning*/
(void)pErrCode; /*Dummy statement, just to hide potential warning*/
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;
}
void __po_hi_c_ip_conf_t_Initialize(__po_hi_c_ip_conf_t* pVal)
{
memset(pVal->devname, 0x0, 21);
memset(pVal->address, 0x0, 41);
pVal->version = __po_hi_c_ipv4;
pVal->port = 0;
}
flag __po_hi_c_ip_conf_t_IsConstraintValid(const __po_hi_c_ip_conf_t* pVal, int* pErrCode)