source: trunk/Cosy/incl/calconf.h@ 12602

Last change on this file since 12602 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 3.4 KB
Line 
1/*-----------------------------------------------------------------------------
2calconf.h -- CAL Configuration
3
4Copyright (c) 1994 JANZ Computer AG
5All Rights Reserved
6
7Created 94/10/11 by Soenke Hansen
8Version 1.15 of 99/06/18
9
10Macros defining the capabilities of the CAL implementation.
11
12-----------------------------------------------------------------------------*/
13
14
15#ifndef calconf_DEFINED
16#define calconf_DEFINED
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/* ICANOS configuration is also needed */
23#include "icanconf.h"
24
25/*------- Capabilities, CAL Classes implemented ----------------------------*/
26
27/* CAPS_NET bits: Capabilities a CAL network may have */
28#define CAP_NET_MNGMT 0x01 /* Network Management */
29#define CAP_NET_ERROR 0x02 /* Network Error */
30#define CAP_NET_CONFIG 0x04 /* Network Configuration */
31
32/* CAPS_NODE bits: Capabilities a NMT Slave may have */
33#define CAP_NODE_MNGMT 0x01 /* Node Management capability */
34#define CAP_NODE_ERROR 0x02 /* Node Error capability */
35#define CAP_NODE_CONFIG 0x04 /* Node Configuration capability */
36#define CAP_NODE_MASTER 0x10 /* NMT Master capability */
37
38/* CAPS_DBT bits: Capabilities a DBT Slave may have */
39#define CAP_DBT_DISTRIB 0x01 /* Distribution capability */
40#define CAP_DBT_CONSIST 0x02 /* Consistency capability */
41#define CAP_DBT_MASTER 0x10 /* DBT Master capability */
42
43/* CAPS_LMT bits: Capabilities a LMT Slave may have */
44#define CAP_LMT_BASIC 0x01 /* LMT class 1 */
45#define CAP_LMT_ADDR 0x02 /* LMT class 2 (with LMT address) */
46#define CAP_LMT_MASTER 0x10 /* LMT Master capability */
47
48/* CAPS_CMS bits: Kinds of CMS objects supported */
49#define CAP_CMS_BVAR1 0x01 /* CMS Basic Variables using 1 COB */
50#define CAP_CMS_BVAR2 0x02 /* CMS Basic Variables using 2 COB's */
51#define CAP_CMS_MVAR 0x04 /* CMS Multiplexed Variables */
52#define CAP_CMS_EVT1 0x08 /* CMS Events using 1 COB */
53#define CAP_CMS_EVT2 0x10 /* CMS Events using 2 COB's */
54#define CAP_CMS_DOM 0x20 /* CMS Domains (Basic and Multiplexed) */
55
56/* The following definitions determine what the node implements.
57 NOTE: The values chosen will effect the code size. */
58
59/* Default Node Class */
60#ifndef CAPS_NODE
61#define CAPS_NODE CAP_NODE_MNGMT + CAP_NODE_ERROR \
62 /* + CAP_NODE_CONFIG */ + CAP_NODE_MASTER
63#endif
64
65/* Network implementation - only relevant when CAP_NODE_MASTER defined
66 in CAPS_NODE */
67#ifndef CAPS_NET
68#define CAPS_NET CAP_NET_MNGMT
69#endif
70
71/* DBT implementation */
72#ifndef CAPS_DBT
73#define CAPS_DBT CAP_DBT_DISTRIB + CAP_DBT_CONSIST + CAP_DBT_MASTER
74#endif
75
76/* LMT implementation */
77#ifndef CAPS_LMT
78#define CAPS_LMT CAP_LMT_BASIC + CAP_LMT_ADDR
79#endif
80
81/* CMS implementation */
82#ifndef CAPS_CMS
83#define CAPS_CMS CAP_CMS_BVAR1 + CAP_CMS_BVAR1 + CAP_CMS_EVT1 \
84 + CAP_CMS_EVT2 + CAP_CMS_DOM + CAP_CMS_MVAR
85#endif
86
87/* Does the node have the capability to store parameters in
88 non-volatile memory? */
89#define CAPS_STORE 1 /* 1: yes, 0: no */
90
91/*------- Memory functions -------------------------------------------------*/
92
93/* Compare and copy arrays of unsigned characters */
94extern int umemcmp(unsigned char *, unsigned char *, int);
95extern void umemcpy(unsigned char *, unsigned char *, int);
96extern void umemset(unsigned char *, unsigned char, int);
97
98/*------- Interfacing to CANopen Object dictionary ------------------------*/
99/*
100 * #define this, if CAL and CANopen runs on the same
101 * system (without DPM like on VMOD-ICAN /CAN-104)
102 */
103#ifdef BIGBOX
104#define CAL_CANOPEN_CLAMPED
105#endif
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif /* !calconf_DEFINED */
Note: See TracBrowser for help on using the repository browser.