Commit 273af6ca authored by claes's avatar claes

Modifications for Programmer's Referens Manual

parent a6976a2b
...@@ -24,6 +24,13 @@ ...@@ -24,6 +24,13 @@
# include <time.h> # include <time.h>
#endif #endif
/*! \file pwr.h
\brief Basic type definitions.
This include file contains the Proview basic type definitions.
*/
/*! \addtogroup Pwr */
/*@{*/
#ifdef VAXC #ifdef VAXC
# define pwr_dExport globaldef # define pwr_dExport globaldef
# define pwr_dImport globalref # define pwr_dImport globalref
...@@ -76,43 +83,46 @@ ...@@ -76,43 +83,46 @@
#define pwr_cSizPathName 63 #define pwr_cSizPathName 63
#define pwr_cSizFullName 79 #define pwr_cSizFullName 79
typedef void *pwr_tAddress; typedef void *pwr_tAddress; //!< Generic pointer type.
typedef unsigned int pwr_tBit; typedef unsigned int pwr_tBit; //!< Bit type.
typedef unsigned int pwr_tBitMask; typedef unsigned int pwr_tBitMask; //!< Bitmask type.
typedef unsigned int pwr_tBoolean; typedef unsigned int pwr_tBoolean; //!< Boolean type.
typedef float pwr_tFloat32; typedef float pwr_tFloat32; //!< 32-bit float.
typedef double pwr_tFloat64; typedef double pwr_tFloat64; //!< 64-big float.
typedef unsigned int pwr_tGeneration; typedef unsigned int pwr_tGeneration;
typedef char pwr_tChar; typedef char pwr_tChar; //!< Character type.
typedef char pwr_tString[]; typedef char pwr_tString[]; //!< String type.
typedef char pwr_tText[]; typedef char pwr_tText[]; //!< Text type.
typedef char pwr_tInt8; typedef char pwr_tInt8; //!< 8-bit integer type.
typedef short pwr_tInt16; typedef short pwr_tInt16; //!< 16-bit integer type.
typedef int pwr_tInt32; typedef int pwr_tInt32; //!< 32-bit integer type.
typedef int pwr_tStatus; typedef int pwr_tStatus; //!< Status type.
//! 64-bit integer type.
typedef struct { typedef struct {
unsigned int low; unsigned int low;
int high; int high;
} pwr_tInt64; } pwr_tInt64;
//! 64-bit unsigned integer type.
typedef struct { typedef struct {
unsigned int low; unsigned int low;
unsigned int high; unsigned int high;
} pwr_tUInt64; } pwr_tUInt64;
typedef unsigned char pwr_tUInt8; typedef unsigned char pwr_tUInt8; //!< 8-bit unsigned integer type.
typedef unsigned short pwr_tUInt16; typedef unsigned short pwr_tUInt16; //!< 16-bit unsigned integer type.
typedef unsigned int pwr_tUInt32; typedef unsigned int pwr_tUInt32; //!< 32-bit unsigned integer type.
typedef unsigned int pwr_tVid; typedef unsigned int pwr_tVid; //!< Volume identity type.
typedef pwr_tVid pwr_tVolumeId; typedef pwr_tVid pwr_tVolumeId; //!< Volume identity type.
typedef unsigned int pwr_tAix; typedef unsigned int pwr_tAix; //!< Attribute index type.
typedef unsigned int pwr_tOix; typedef unsigned int pwr_tOix; //!< Object index type.
typedef pwr_tOix pwr_tObjectIx; typedef pwr_tOix pwr_tObjectIx; //!< Object index type.
typedef unsigned int pwr_tMask; typedef unsigned int pwr_tMask; //!< Mask type.
typedef unsigned int pwr_tEnum; typedef unsigned int pwr_tEnum; //!< Enumeration type.
//! Body index enumeration.
typedef enum { typedef enum {
pwr_eBix__ = 0, pwr_eBix__ = 0,
pwr_eBix_sys = 1, pwr_eBix_sys = 1,
...@@ -122,37 +132,40 @@ typedef enum { ...@@ -122,37 +132,40 @@ typedef enum {
pwr_eBix_ pwr_eBix_
} pwr_eBix; } pwr_eBix;
//! Object identity type.
typedef struct { typedef struct {
pwr_tOix oix; pwr_tOix oix;
pwr_tVid vid; pwr_tVid vid;
} pwr_tOid; } pwr_tOid;
typedef pwr_tOid pwr_tObjid; typedef pwr_tOid pwr_tObjid; //!< Object identity type.
typedef pwr_tOid pwr_tObjDId; typedef pwr_tOid pwr_tObjDId;
typedef unsigned int pwr_tCid; typedef unsigned int pwr_tCid; //!< Class identity type.
typedef pwr_tCid pwr_tClassId; typedef pwr_tCid pwr_tClassId; //!< Class identity type.
typedef unsigned int pwr_tTid; typedef unsigned int pwr_tTid; //!< Type identity type.
typedef pwr_tTid pwr_tTypeId; typedef pwr_tTid pwr_tTypeId; //!< Type identity type.
typedef unsigned int pwr_tBid; typedef unsigned int pwr_tBid;
typedef unsigned int pwr_tVersion; typedef unsigned int pwr_tVersion;
typedef unsigned int pwr_tPwrVersion; typedef unsigned int pwr_tPwrVersion;
typedef unsigned int pwr_tProjVersion; typedef unsigned int pwr_tProjVersion;
typedef unsigned int pwr_tUserId; typedef unsigned int pwr_tUserId;
typedef unsigned int pwr_tDbId; typedef unsigned int pwr_tDbId;
typedef pwr_tVolumeId pwr_tNid; typedef pwr_tVolumeId pwr_tNid; //!< Node identity type.
typedef pwr_tNid pwr_tNodeId; typedef pwr_tNid pwr_tNodeId; //!< Node identity type.
typedef pwr_tNid pwr_tNodeIndex; typedef pwr_tNid pwr_tNodeIndex; //!< Node index type.
//! Reference identity type.
typedef struct { typedef struct {
pwr_tUInt32 rix; pwr_tUInt32 rix;
pwr_tNid nid; pwr_tNid nid;
} pwr_tRid; } pwr_tRid;
typedef pwr_tRid pwr_tRefId; typedef pwr_tRid pwr_tRefId; //!< Reference identity type.
typedef pwr_tRid pwr_tDlid; typedef pwr_tRid pwr_tDlid; //!< Direct link identity type.
typedef pwr_tRid pwr_tSubid; typedef pwr_tRid pwr_tSubid; //!< Subscription identity type.
//! Vax time.
typedef struct { typedef struct {
int low; int low;
int high; int high;
...@@ -166,17 +179,20 @@ typedef struct { ...@@ -166,17 +179,20 @@ typedef struct {
} timespec_t; } timespec_t;
#endif #endif
typedef struct timespec pwr_tTime; typedef struct timespec pwr_tTime; //!< Abolute time type.
//! Delta time type.
typedef struct { typedef struct {
int tv_sec; int tv_sec; //!< Seconds.
int tv_nsec; int tv_nsec; //!< Nano seconds.
} pwr_tDeltaTime; } pwr_tDeltaTime;
//! Proview version type
typedef union { typedef union {
pwr_tPwrVersion i; pwr_tPwrVersion i;
//! Word representation
struct { struct {
#if (pwr_dHost_byteOrder == pwr_dLittleEndian) #if (pwr_dHost_byteOrder == pwr_dLittleEndian)
...@@ -196,27 +212,30 @@ typedef union { ...@@ -196,27 +212,30 @@ typedef union {
} s; } s;
} pwr_uPwrVersion; } pwr_uPwrVersion;
typedef char pwr_tObjName [pwr_cSizObjName + 1]; typedef char pwr_tObjName [pwr_cSizObjName + 1]; //!< Object name type.
typedef char pwr_tPgmName [pwr_cSizPgmName + 1]; typedef char pwr_tPgmName [pwr_cSizPgmName + 1]; //!< PgmName type.
typedef char pwr_tXRef [pwr_cSizXRef + 1]; typedef char pwr_tXRef [pwr_cSizXRef + 1]; //!< XRef type.
typedef char pwr_tGraphName [pwr_cSizGraphName + 1]; typedef char pwr_tGraphName [pwr_cSizGraphName + 1]; //!< GraphName type.
typedef char pwr_tStructName [pwr_cSizStructName + 1]; typedef char pwr_tStructName [pwr_cSizStructName + 1]; //!< StructName type.
typedef char pwr_tAttrName [pwr_cSizAttrName + 1]; typedef char pwr_tAttrName [pwr_cSizAttrName + 1]; //!< AttrName type.
typedef char pwr_tPathName [pwr_cSizPathName + 1]; typedef char pwr_tPathName [pwr_cSizPathName + 1]; //!< PathName type.
typedef char pwr_tFullName [pwr_cSizFullName + 1]; typedef char pwr_tFullName [pwr_cSizFullName + 1]; //!< FullName type.
typedef char pwr_tString256 [256]; typedef char pwr_tString256 [256]; //!< 256 byte string type.
typedef char pwr_tString132 [132]; typedef char pwr_tString132 [132]; //!< 132 byte string type.
typedef char pwr_tString80 [80]; typedef char pwr_tString80 [80]; //!< 80 byte string type.
typedef char pwr_tString40 [40]; typedef char pwr_tString40 [40]; //!< 40 byte string type.
typedef char pwr_tString32 [32]; typedef char pwr_tString32 [32]; //!< 32 byte string type.
typedef char pwr_tString16 [16]; typedef char pwr_tString16 [16]; //!< 16 byte string type.
typedef char pwr_tString8 [8]; typedef char pwr_tString8 [8]; //!< 8 byte string type.
typedef char pwr_tString1 [1]; typedef char pwr_tString1 [1]; //!< 1 byte string type.
typedef char pwr_tText1024 [1024]; typedef char pwr_tText1024 [1024]; //!< 1024 byte text type.
typedef char pwr_tURL [160]; typedef char pwr_tURL [160]; //!< URL type.
//! Attribute reference flags type.
typedef union { typedef union {
pwr_tBitMask m; pwr_tBitMask m;
//! Bitmask representation.
struct { struct {
#if (pwr_dHost_byteOrder == pwr_dLittleEndian) #if (pwr_dHost_byteOrder == pwr_dLittleEndian)
...@@ -237,50 +256,56 @@ typedef union { ...@@ -237,50 +256,56 @@ typedef union {
} pwr_mAttrRef; } pwr_mAttrRef;
//! Attribute reference.
typedef struct { typedef struct {
pwr_tOid Objid; pwr_tOid Objid; //!< Object identity.
pwr_tCid Body; pwr_tCid Body; //!< Class identity of body.
pwr_tUInt32 Offset; pwr_tUInt32 Offset; //!< Offset in body.
pwr_tUInt32 Size; pwr_tUInt32 Size; //!< Attribute size.
pwr_mAttrRef Flags; pwr_mAttrRef Flags; //!< Attribute flags.
} pwr_sAttrRef; } pwr_sAttrRef;
//! Zero attribute reference constant.
#ifdef OS_ELN #ifdef OS_ELN
static const pwr_sAttrRef pwr_cNAttrRef = {0, 0, 0, 0, 0}; static const pwr_sAttrRef pwr_cNAttrRef = {0, 0, 0, 0, 0};
#else #else
static const pwr_sAttrRef pwr_cNAttrRef = {{0, 0}, 0, 0, 0, {0}}; static const pwr_sAttrRef pwr_cNAttrRef = {{0, 0}, 0, 0, 0, {0}};
#endif #endif
static const pwr_tOid pwr_cNOid = {0, 0}; static const pwr_tOid pwr_cNOid = {0, 0}; //!< Zero object identity constant.
static const pwr_tObjid pwr_cNObjid = {0, 0}; static const pwr_tObjid pwr_cNObjid = {0, 0}; //!< Zero object identity constant.
static const pwr_tDlid pwr_cNRefId = {0, 0}; static const pwr_tDlid pwr_cNRefId = {0, 0}; //!< Zero reference identity constant.
#define pwr_cNSubid pwr_cNRefId #define pwr_cNSubid pwr_cNRefId //!< Zero subscription identity constant.
#define pwr_cNDlid pwr_cNRefId #define pwr_cNDlid pwr_cNRefId //!< Zero direct link identity constant.
static const pwr_tOix pwr_cNOix = 0; static const pwr_tOix pwr_cNOix = 0; //!< Zero object index constant.
static const pwr_tObjectIx pwr_cNObjectIx = 0; static const pwr_tObjectIx pwr_cNObjectIx = 0; //!< Zero object index constant.
static const pwr_tClassId pwr_cNClassId = 0; static const pwr_tClassId pwr_cNClassId = 0; //!< Zero class identity constant.
static const pwr_tTypeId pwr_cNTypeId = 0; static const pwr_tTypeId pwr_cNTypeId = 0; //!< Zero type identity constant.
static const pwr_tVolumeId pwr_cNVolumeId = 0; static const pwr_tVolumeId pwr_cNVolumeId = 0; //!< Zero volume identity constant.
static const pwr_tNodeId pwr_cNNodeId = 0; static const pwr_tNodeId pwr_cNNodeId = 0; //!< Zero node identity constant.
static const pwr_tCid pwr_cNCid = 0; static const pwr_tCid pwr_cNCid = 0; //!< Zero class identity constant.
static const pwr_tTid pwr_cNTid = 0; static const pwr_tTid pwr_cNTid = 0; //!< Zero type identity constant.
static const pwr_tVid pwr_cNVid = 0; static const pwr_tVid pwr_cNVid = 0; //!< Zero volume identity constant.
static const pwr_tNid pwr_cNNid = 0; static const pwr_tNid pwr_cNNid = 0; //!< Zero node identity constant.
/* Gereral macro definitions */ /* Gereral macro definitions */
#ifndef MIN #ifndef MIN
//! Return the smallest of two values
#define MIN(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b))
#endif #endif
#ifndef MAX #ifndef MAX
//! Return the largest of two values
#define MAX(a,b) (((a)>(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b))
#endif #endif
#ifndef ODD #ifndef ODD
//! Check if value is odd
#define ODD(a) (((int)(a) & 1) != 0) #define ODD(a) (((int)(a) & 1) != 0)
#endif #endif
#ifndef EVEN #ifndef EVEN
//! Check if value is even
#define EVEN(a) (((int)(a) & 1) == 0) #define EVEN(a) (((int)(a) & 1) == 0)
#endif #endif
...@@ -433,5 +458,8 @@ static const pwr_tNid pwr_cNNid = 0; ...@@ -433,5 +458,8 @@ static const pwr_tNid pwr_cNNid = 0;
#a,__FILE__,__LINE__),exit(EXIT_FAILURE))) #a,__FILE__,__LINE__),exit(EXIT_FAILURE)))
#endif #endif
/*@}*/
#endif #endif
...@@ -37,6 +37,13 @@ ...@@ -37,6 +37,13 @@
#include "co_cdh.h" #include "co_cdh.h"
#include "co_time.h" #include "co_time.h"
/*! \file co_cdh.c
\brief Class definition handler.
Functions for class definitions.
*/
/*! \addtogroup Cdh */
/*@{*/
#ifdef OS_ELN #ifdef OS_ELN
struct p1_ctx { struct p1_ctx {
int p1$errno; /* UNIX-style error code */ int p1$errno; /* UNIX-style error code */
...@@ -46,12 +53,12 @@ struct p1_ctx { ...@@ -46,12 +53,12 @@ struct p1_ctx {
}; };
#endif #endif
//! Compare two object identities.
/* Compare two object identities; /*!
- return <0 if Object_1 < Object_2.
return <0 if Object_1 < Object_2 - return 0 if Object_1 == Object_2.
return 0 if Object_1 == Object_2 - return >0 if Object_1 > Object_2.
return >0 if Object_1 > Object_2. */ */
int int
cdh_ObjidCompare ( cdh_ObjidCompare (
...@@ -75,10 +82,11 @@ cdh_ObjidCompare ( ...@@ -75,10 +82,11 @@ cdh_ObjidCompare (
} }
/* Test if two object identities are equal. //! Test if two object identities are equal.
/*!
return 1 if Object_1 == Object_2 - return 1 if Object_1 == Object_2
return 0 if Object_1 != Object_2. */ - return 0 if Object_1 != Object_2.
*/
int int
cdh_ObjidIsEqual ( cdh_ObjidIsEqual (
...@@ -90,10 +98,11 @@ cdh_ObjidIsEqual ( ...@@ -90,10 +98,11 @@ cdh_ObjidIsEqual (
return (Objid_1.vid == Objid_2.vid) && (Objid_1.oix == Objid_2.oix); return (Objid_1.vid == Objid_2.vid) && (Objid_1.oix == Objid_2.oix);
} }
/* Test if two object identities are different. //! Test if two object identities are different.
/*!
return 1 if Object_1 != Object_2 - return 1 if Object_1 != Object_2
return 0 if Object_1 == Object_2. */ - return 0 if Object_1 == Object_2.
*/
int int
cdh_ObjidIsNotEqual ( cdh_ObjidIsNotEqual (
...@@ -106,10 +115,11 @@ cdh_ObjidIsNotEqual ( ...@@ -106,10 +115,11 @@ cdh_ObjidIsNotEqual (
} }
/* Test if object identity is null. //! Test if object identity is null.
/*!
return 1 if Object_1 == pwr_cNObjid - return 1 if Object_1 == pwr_cNObjid
return 0 if Object_1 != pwr_cNObjid. */ - return 0 if Object_1 != pwr_cNObjid.
*/
int int
cdh_ObjidIsNull ( cdh_ObjidIsNull (
...@@ -120,10 +130,11 @@ cdh_ObjidIsNull ( ...@@ -120,10 +130,11 @@ cdh_ObjidIsNull (
} }
/* Test if object identity is not null. //! Test if object identity is not null.
/*!
return 1 if Object_1 != pwr_cNObjid - return 1 if Object_1 != pwr_cNObjid
return 0 if Object_1 == pwr_cNObjid. */ - return 0 if Object_1 == pwr_cNObjid.
*/
int int
cdh_ObjidIsNotNull ( cdh_ObjidIsNotNull (
...@@ -278,7 +289,11 @@ cdh_DlidIsNotNull ( ...@@ -278,7 +289,11 @@ cdh_DlidIsNotNull (
} }
/* Convert Objid to ClassId. */ //! Convert Objid to ClassId.
/*!
\param Objid Objid of $ClassDef object for class.
\return ClassId.
*/
pwr_tClassId pwr_tClassId
cdh_ClassObjidToId ( cdh_ClassObjidToId (
...@@ -300,7 +315,11 @@ cdh_ClassObjidToId ( ...@@ -300,7 +315,11 @@ cdh_ClassObjidToId (
} }
/* Convert ClassId to Objid. */ //! Convert ClassId to Objid.
/*!
\param Class ClassId
\return Objid for $ClassDef object of class.
*/
pwr_tObjid pwr_tObjid
cdh_ClassIdToObjid ( cdh_ClassIdToObjid (
...@@ -325,7 +344,11 @@ cdh_ClassIdToObjid ( ...@@ -325,7 +344,11 @@ cdh_ClassIdToObjid (
return oid.pwr; return oid.pwr;
} }
/* Convert Objid to TypeId. */ //! Convert Objid to TypeId.
/*!
\param Objid Objid for $TypeDef object of type.
\return TypeId.
*/
pwr_tTypeId pwr_tTypeId
cdh_TypeObjidToId ( cdh_TypeObjidToId (
...@@ -364,7 +387,7 @@ cdh_TypeObjidToId ( ...@@ -364,7 +387,7 @@ cdh_TypeObjidToId (
} }
/* Convert TypeId to index. */ //! Convert TypeId to index.
int int
cdh_TypeIdToIndex ( cdh_TypeIdToIndex (
...@@ -378,7 +401,7 @@ cdh_TypeIdToIndex ( ...@@ -378,7 +401,7 @@ cdh_TypeIdToIndex (
return tid.t.tix; return tid.t.tix;
} }
/* Convert TypeId to Objid. */ //! Convert TypeId to Objid.
pwr_tObjid pwr_tObjid
cdh_TypeIdToObjid ( cdh_TypeIdToObjid (
...@@ -415,9 +438,7 @@ cdh_TypeIdToObjid ( ...@@ -415,9 +438,7 @@ cdh_TypeIdToObjid (
return oid.pwr; return oid.pwr;
} }
/* Converts an attribute given in internal binary format //! Converts an attribute given in internal binary format to a text string.
to a text string.
*/
pwr_tStatus pwr_tStatus
cdh_AttrValueToString ( cdh_AttrValueToString (
...@@ -498,8 +519,7 @@ cdh_AttrValueToString ( ...@@ -498,8 +519,7 @@ cdh_AttrValueToString (
return sts; return sts;
} }
/* Converts an attribute value given as a text string, //! Converts an attribute value given as a text string, to internal binary format.
to internal binary format. */
pwr_tStatus pwr_tStatus
cdh_StringToAttrValue ( cdh_StringToAttrValue (
...@@ -748,7 +768,17 @@ cdh_StringToAttrValue ( ...@@ -748,7 +768,17 @@ cdh_StringToAttrValue (
return sts; return sts;
} }
//! Convert ClassId string to id.
/*!
Convert a string of format "_C1.2:34" to id ('_C' is optional),
where 1.2 is the volume identity and 34 the class index.
\param s String.
\param cid ClassId.
\return Status of the operation. CDH__SUCCESS or CDH__INVCID.
*/
pwr_tStatus pwr_tStatus
cdh_StringToClassId ( cdh_StringToClassId (
const char *s, const char *s,
...@@ -782,6 +812,16 @@ cdh_StringToClassId ( ...@@ -782,6 +812,16 @@ cdh_StringToClassId (
return CDH__SUCCESS; return CDH__SUCCESS;
} }
//! Convert Objid string to id.
/*!
Convert a string of format "_O1.2.3.4:34" ('_O' is optional), where
1.2.3.4 is the volume id and 34 is the object index.
Strings beginning with "_A" are also accepted.
\param s String.
\param oid Objid.
\return Status of the operation. CDH__SUCCESS or CDH__INVCID.
*/
pwr_tStatus pwr_tStatus
cdh_StringToObjid ( cdh_StringToObjid (
const char *s, const char *s,
...@@ -824,6 +864,14 @@ cdh_StringToObjid ( ...@@ -824,6 +864,14 @@ cdh_StringToObjid (
return CDH__SUCCESS; return CDH__SUCCESS;
} }
//! Convert TypeId string to id.
/*!
Convert a string of format "_T1.2:bit.tyg.tix" to id ("_T" is optional).
\param s String.
\param tid TypeId.
\return Status of the operation. CDH__SUCCESS or CDH__INVTID.
*/
pwr_tStatus pwr_tStatus
cdh_StringToTypeId ( cdh_StringToTypeId (
const char *s, const char *s,
...@@ -876,6 +924,15 @@ cdh_StringToTypeId ( ...@@ -876,6 +924,15 @@ cdh_StringToTypeId (
return CDH__SUCCESS; return CDH__SUCCESS;
} }
//! Convert VolumeId string to id.
/*!
Convert a string of format "_V1.2.3.4" to id ("_V" is optional).
Strings beginning with "_O" and "_A" are also accepted.
\param s String.
\param vid Volume id.
\return Status of the operation. CDH__SUCCESS or CDH__INVTID.
*/
pwr_tStatus pwr_tStatus
cdh_StringToVolumeId ( cdh_StringToVolumeId (
const char *s, const char *s,
...@@ -914,6 +971,15 @@ cdh_StringToVolumeId ( ...@@ -914,6 +971,15 @@ cdh_StringToVolumeId (
return CDH__SUCCESS; return CDH__SUCCESS;
} }
//! Converts ObjectIx string to index.
/*!
Converts string of format "_Xoix" to index ("_X" is optional)
where oix is object index.
\param s String.
\param oix ObjectIx.
\return Status of the operation. CDH__SUCCESS or CDH__INVOIX.
*/
pwr_tStatus pwr_tStatus
cdh_StringToObjectIx ( cdh_StringToObjectIx (
const char *s, const char *s,
...@@ -1018,7 +1084,8 @@ cdh_StringToDlid ( ...@@ -1018,7 +1084,8 @@ cdh_StringToDlid (
return CDH__SUCCESS; return CDH__SUCCESS;
} }
/* Converts a class identifier, 'cid' to a string. //! Converts a class identifier, 'cid' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1:34 where 0.1 is the volume identifier and 0.1:34 where 0.1 is the volume identifier and
...@@ -1028,7 +1095,8 @@ cdh_StringToDlid ( ...@@ -1028,7 +1095,8 @@ cdh_StringToDlid (
to 's', otherwise the resultant string will be returned. to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_C' prefix will be included in If 'prefix' is not zero, a '_C' prefix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_ClassIdToString ( cdh_ClassIdToString (
...@@ -1060,7 +1128,8 @@ cdh_ClassIdToString ( ...@@ -1060,7 +1128,8 @@ cdh_ClassIdToString (
} }
/* Converts a type identifier, 'tid' to a string. //! Converts a type identifier, 'tid' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1:0.34.1 where 0.1 is the volume identifier and 0.1:0.34.1 where 0.1 is the volume identifier and
...@@ -1077,7 +1146,8 @@ cdh_ClassIdToString ( ...@@ -1077,7 +1146,8 @@ cdh_ClassIdToString (
to 's', otherwise the resultant string will be returned. to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_T' prefix will be included in If 'prefix' is not zero, a '_T' prefix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_TypeIdToString ( cdh_TypeIdToString (
...@@ -1110,7 +1180,8 @@ cdh_TypeIdToString ( ...@@ -1110,7 +1180,8 @@ cdh_TypeIdToString (
} }
/* Converts a object index, 'oix' to a string. //! Converts a object index, 'oix' to a string.
/*!
The output string will be in the format: The output string will be in the format:
1234 1234
...@@ -1119,7 +1190,8 @@ cdh_TypeIdToString ( ...@@ -1119,7 +1190,8 @@ cdh_TypeIdToString (
to 's', otherwise the resultant string will be returned. to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_X' prefix will be included in If 'prefix' is not zero, a '_X' prefix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_ObjectIxToString ( cdh_ObjectIxToString (
...@@ -1138,7 +1210,8 @@ cdh_ObjectIxToString ( ...@@ -1138,7 +1210,8 @@ cdh_ObjectIxToString (
return ls; return ls;
} }
/* Converts an attribute reference , 'aref' to a string. //! Converts an attribute reference , 'aref' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1.2.3:1234(_T0.34.1)[34.60] 0.1.2.3:1234(_T0.34.1)[34.60]
...@@ -1147,7 +1220,8 @@ cdh_ObjectIxToString ( ...@@ -1147,7 +1220,8 @@ cdh_ObjectIxToString (
to 's', otherwise the resultant string will be returned. to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_A' prefix will be included in If 'prefix' is not zero, a '_A' prefix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_ArefToString ( cdh_ArefToString (
...@@ -1179,7 +1253,8 @@ cdh_ArefToString ( ...@@ -1179,7 +1253,8 @@ cdh_ArefToString (
return ls; return ls;
} }
/* Converts a volume identifier, 'vid' to a string. //! Converts a volume identifier, 'vid' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1.2.3 0.1.2.3
...@@ -1191,7 +1266,8 @@ cdh_ArefToString ( ...@@ -1191,7 +1266,8 @@ cdh_ArefToString (
the resultant string. the resultant string.
If 'suffix' is not zero, a ':' suffix will be included in If 'suffix' is not zero, a ':' suffix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_NodeIdToString ( cdh_NodeIdToString (
...@@ -1216,7 +1292,8 @@ cdh_NodeIdToString ( ...@@ -1216,7 +1292,8 @@ cdh_NodeIdToString (
} }
/* Converts a object identifier, 'oid' to a string. //! Converts a object identifier, 'oid' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1.2.3:1234 0.1.2.3:1234
...@@ -1225,7 +1302,8 @@ cdh_NodeIdToString ( ...@@ -1225,7 +1302,8 @@ cdh_NodeIdToString (
to 's', otherwise the resultant string will be returned. to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_O' prefix will be included in If 'prefix' is not zero, a '_O' prefix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_ObjidToString ( cdh_ObjidToString (
...@@ -1249,7 +1327,8 @@ cdh_ObjidToString ( ...@@ -1249,7 +1327,8 @@ cdh_ObjidToString (
} }
/* Converts a volume identifier, 'vid' to a string. //! Converts a volume identifier, 'vid' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1.2.3 0.1.2.3
...@@ -1261,7 +1340,8 @@ cdh_ObjidToString ( ...@@ -1261,7 +1340,8 @@ cdh_ObjidToString (
the resultant string. the resultant string.
If 'suffix' is not zero, a ':' suffix will be included in If 'suffix' is not zero, a ':' suffix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_VolumeIdToString ( cdh_VolumeIdToString (
...@@ -1286,7 +1366,8 @@ cdh_VolumeIdToString ( ...@@ -1286,7 +1366,8 @@ cdh_VolumeIdToString (
} }
/* Converts a subscription identifier, 'sid' to a string. //! Converts a subscription identifier, 'sid' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1.2.3:1234 0.1.2.3:1234
...@@ -1295,7 +1376,8 @@ cdh_VolumeIdToString ( ...@@ -1295,7 +1376,8 @@ cdh_VolumeIdToString (
to 's', otherwise the resultant string will be returned. to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_S' prefix will be included in If 'prefix' is not zero, a '_S' prefix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_SubidToString ( cdh_SubidToString (
...@@ -1319,7 +1401,8 @@ cdh_SubidToString ( ...@@ -1319,7 +1401,8 @@ cdh_SubidToString (
} }
/* Converts a direct link identifier, 'did' to a string. //! Converts a direct link identifier, 'did' to a string.
/*!
The output string will be in the format: The output string will be in the format:
0.1.2.3:1234 0.1.2.3:1234
...@@ -1328,7 +1411,8 @@ cdh_SubidToString ( ...@@ -1328,7 +1411,8 @@ cdh_SubidToString (
to 's', otherwise the resultant string will be returned. to 's', otherwise the resultant string will be returned.
If 'prefix' is not zero, a '_D' prefix will be included in If 'prefix' is not zero, a '_D' prefix will be included in
the resultant string. */ the resultant string.
*/
char * char *
cdh_DlidToString ( cdh_DlidToString (
...@@ -2185,6 +2269,12 @@ cdh_PackName ( ...@@ -2185,6 +2269,12 @@ cdh_PackName (
return pack.key; return pack.key;
} }
//! Convert string to lower case.
/*!
Returns a pointer to a static string.
NOTE! The function should only be called once in one expression.
*/
char * char *
cdh_Low ( cdh_Low (
const char *s const char *s
...@@ -2195,6 +2285,14 @@ cdh_Low ( ...@@ -2195,6 +2285,14 @@ cdh_Low (
return cdh_ToLower(buf, s); return cdh_ToLower(buf, s);
} }
//! Convert string to lower case.
/*!
If s is NULL, t is used also as input string.
\param t Output string.
\param s Input string.
\return Returns t.
*/
char * char *
cdh_ToLower ( cdh_ToLower (
char *t, char *t,
...@@ -2226,6 +2324,14 @@ cdh_ToLower ( ...@@ -2226,6 +2324,14 @@ cdh_ToLower (
return rs; return rs;
} }
//! Convert string to upper case.
/*!
If s is NULL, t is used also as input string.
\param t Output string.
\param s Input string.
\return Returns t.
*/
char * char *
cdh_ToUpper ( cdh_ToUpper (
char *t, char *t,
...@@ -2258,8 +2364,8 @@ cdh_ToUpper ( ...@@ -2258,8 +2364,8 @@ cdh_ToUpper (
} }
/* Compare two strings not regarding their casing. //! Compare two strings not regarding their casing.
/*!
This routine works only on alphabetic characters. This routine works only on alphabetic characters.
It works on the standard ascii a-z and on the It works on the standard ascii a-z and on the
DEC multinational extensions. DEC multinational extensions.
...@@ -2268,7 +2374,8 @@ cdh_ToUpper ( ...@@ -2268,7 +2374,8 @@ cdh_ToUpper (
when you change the case of a character. when you change the case of a character.
The function returns the uppercase offset between The function returns the uppercase offset between
the two first differing characters. */ the two first differing characters.
*/
int int
cdh_NoCaseStrcmp ( cdh_NoCaseStrcmp (
...@@ -2308,3 +2415,12 @@ char *cdh_OpSysToStr( pwr_mOpSys opsys) ...@@ -2308,3 +2415,12 @@ char *cdh_OpSysToStr( pwr_mOpSys opsys)
} }
return str; return str;
} }
/*@}*/
...@@ -24,6 +24,19 @@ ...@@ -24,6 +24,19 @@
extern "C" { extern "C" {
#endif #endif
/*! \file co_cdh.h
\brief Class definition handler.
This include file contains definitions and function prototypes
needed to use CDH.
*/
/*! \defgroup Cdh_DS Data Structures
\ingroup Cdh
*/
/*! \addtogroup Cdh_DS */
/*@{*/
#define cdh_cMaxVidGroup 255 #define cdh_cMaxVidGroup 255
#define cdh_cMaxCix 4095 #define cdh_cMaxCix 4095
#define cdh_cMaxBix 7 #define cdh_cMaxBix 7
...@@ -39,18 +52,28 @@ typedef enum { ...@@ -39,18 +52,28 @@ typedef enum {
} cdh_eVId3; } cdh_eVId3;
//! Get volme identity for class identity.
#define cdh_CidToVid(cid) ((cid) >> 16) #define cdh_CidToVid(cid) ((cid) >> 16)
//! Get volume identity for type identity.
#define cdh_TidToVid(tid) ((tid) >> 16) #define cdh_TidToVid(tid) ((tid) >> 16)
//! Get class identity for class index
#define cdh_cixToCid( Vid, Cix) (0 + (Vid << 16) + (Cix << 3)) #define cdh_cixToCid( Vid, Cix) (0 + (Vid << 16) + (Cix << 3))
//! Get type identity for type index.
#define cdh_tixToTid( Vid, Tyg, Tix) (0 + (Vid << 16) + (1 << 15) + (Tyg << 11) + Tix) #define cdh_tixToTid( Vid, Tyg, Tix) (0 + (Vid << 16) + (1 << 15) + (Tyg << 11) + Tix)
//! Get object index for class index.
#define cdh_cixToOix( Cix, Bix, Aix) (0 + (1 << 31) + (Cix << 18) + (Bix << 15) + Aix) #define cdh_cixToOix( Cix, Bix, Aix) (0 + (1 << 31) + (Cix << 18) + (Bix << 15) + Aix)
//! Get object index for type index.
#define cdh_tixToOix( Tyg, Tix) (0 + (1 << 31) + (1 << 30) + (Tyg << 26) + (Tix << 15)) #define cdh_tixToOix( Tyg, Tix) (0 + (1 << 31) + (1 << 30) + (Tyg << 26) + (Tix << 15))
//! Get object index for body index.
#define cdh_oixToBix( Oix) ((pwr_eBix)((Oix >> 15) & 7)) #define cdh_oixToBix( Oix) ((pwr_eBix)((Oix >> 15) & 7))
//! Get class index for object index.
#define cdh_oixToCix( Oix) ((Oix >> 18) & 0xfff) #define cdh_oixToCix( Oix) ((Oix >> 18) & 0xfff)
//! Get attribute index for object index.
#define cdh_oixToAix( Oix) (Oix & 0xfff) #define cdh_oixToAix( Oix) (Oix & 0xfff)
//! Internal representatin of object identity.
typedef struct { typedef struct {
unsigned int oix : 32; unsigned int oix : 32; //! Object index.
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -68,8 +91,9 @@ typedef struct { ...@@ -68,8 +91,9 @@ typedef struct {
#endif #endif
} cdh_mOid; } cdh_mOid;
typedef cdh_mOid cdh_mObjid; typedef cdh_mOid cdh_mObjid; //!< Internal representation of object identity.
//! Internal representation of reference identity.
typedef struct { typedef struct {
unsigned int rix : 32; unsigned int rix : 32;
...@@ -89,8 +113,9 @@ typedef struct { ...@@ -89,8 +113,9 @@ typedef struct {
#endif #endif
} cdh_mRid; } cdh_mRid;
typedef cdh_mRid cdh_mRefId; typedef cdh_mRid cdh_mRefId; //!< Internal representation of reference identity.
//! Internal representations of volume identity.
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -108,8 +133,9 @@ typedef struct { ...@@ -108,8 +133,9 @@ typedef struct {
#endif #endif
} cdh_mVid; } cdh_mVid;
typedef cdh_mVid cdh_mVolumeId; typedef cdh_mVid cdh_mVolumeId; //!< Internal representation of volume identity.
//! Internal representation of node identity.
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -127,8 +153,9 @@ typedef struct { ...@@ -127,8 +153,9 @@ typedef struct {
#endif #endif
} cdh_mNid; } cdh_mNid;
typedef cdh_mNid cdh_mNodeId; typedef cdh_mNid cdh_mNodeId; //!< Internal representation of node identity.
//! Internal representation of $ClassDef object identity.
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -159,6 +186,7 @@ typedef struct { ...@@ -159,6 +186,7 @@ typedef struct {
#endif #endif
} cdh_mClassObjid; } cdh_mClassObjid;
//! Internal represention of class identity.
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -180,8 +208,9 @@ typedef struct { ...@@ -180,8 +208,9 @@ typedef struct {
#endif #endif
} cdh_mCid; } cdh_mCid;
typedef cdh_mCid cdh_mClassId; typedef cdh_mCid cdh_mClassId; //!< Internal representation of class identity.
//! Internal representation of $TypeDef object identity.
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -212,6 +241,7 @@ typedef struct { ...@@ -212,6 +241,7 @@ typedef struct {
#endif #endif
} cdh_mTypeObjid; } cdh_mTypeObjid;
//! Internal representation of type identity.
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -233,54 +263,61 @@ typedef struct { ...@@ -233,54 +263,61 @@ typedef struct {
#endif #endif
} cdh_mTid; } cdh_mTid;
typedef cdh_mTid cdh_mTypeId; typedef cdh_mTid cdh_mTypeId; //!< Internal representation of type identity.
//! Type for representions of object identity.
typedef union { typedef union {
pwr_tOid pwr; pwr_tOid pwr; //!< Extern representation.
cdh_mObjid o; cdh_mObjid o; //!< Common object representation.
cdh_mClassObjid c; cdh_mClassObjid c; //!< ClassDef object representation.
cdh_mTypeObjid t; cdh_mTypeObjid t; //!< TypeDef object representation.
} cdh_uOid; } cdh_uOid;
typedef cdh_uOid cdh_uObjid; typedef cdh_uOid cdh_uObjid; //!< Type for representations of object identity.
//! Type for representations of reference identity.
typedef union { typedef union {
pwr_tRid pwr; pwr_tRid pwr; //!< Extern representation.
cdh_mRid r; cdh_mRid r; //!< Intern representation
} cdh_uRid; } cdh_uRid;
typedef cdh_uRid cdh_uRefId; typedef cdh_uRid cdh_uRefId; //!< Type for representation of reference identity.
//! Type for representation of type identity.
typedef union { typedef union {
pwr_tCid pwr; pwr_tCid pwr; //!< Extern representation.
cdh_mCid c; cdh_mCid c; //!< Class identity representation.
cdh_mTid t; cdh_mTid t; //!< Type identity representation.
} cdh_uTid; } cdh_uTid;
typedef cdh_uTid cdh_uTypeId; typedef cdh_uTid cdh_uTypeId; //!< Type for representation of type identity.
//! Type for representation of volume identity.
typedef union { typedef union {
pwr_tVid pwr; pwr_tVid pwr; //!< Extern representation.
cdh_mVid v; cdh_mVid v; //!< Intern representation.
} cdh_uVid; } cdh_uVid;
typedef cdh_uVid cdh_uVolumeId; typedef cdh_uVid cdh_uVolumeId; //!< Type for represenation of volume identity.
//! Type for representation of node identity.
typedef union { typedef union {
pwr_tNid pwr; pwr_tNid pwr; //!< Extern representation.
cdh_mNid n; cdh_mNid n; //!< Intern representation.
} cdh_uNid; } cdh_uNid;
typedef cdh_uNid cdh_uNodeId; typedef cdh_uNid cdh_uNodeId; //!< Type for representation of node idenity.
//! Enumeration for identities.
typedef enum { typedef enum {
cdh_eId__ = 0, cdh_eId__ = 0,
cdh_eId_objectIx, cdh_eId_objectIx, //!< Object index.
cdh_eId_objid, cdh_eId_objid, //!< Object identity.
cdh_eId_classId, cdh_eId_classId, //!< Class identity.
cdh_eId_volumeId, cdh_eId_volumeId, //!< Volume identity.
cdh_eId_typeId, cdh_eId_typeId, //!< Type identity.
cdh_eId_subid, cdh_eId_subid, //!< Subscription identity.
cdh_eId_dlid, cdh_eId_dlid, //!< Direct link identity.
cdh_eId_aref, cdh_eId_aref, //!< Attribute reference.
cdh_eId_ cdh_eId_
} cdh_eId; } cdh_eId;
//! Union for identities.
typedef union { typedef union {
pwr_tOix oix; pwr_tOix oix;
pwr_tOid oid; pwr_tOid oid;
...@@ -292,8 +329,10 @@ typedef union { ...@@ -292,8 +329,10 @@ typedef union {
pwr_sAttrRef aref; pwr_sAttrRef aref;
} cdh_uId; } cdh_uId;
//! Pack name
typedef union { typedef union {
pwr_tUInt32 key; pwr_tUInt32 key;
//! Name structure
struct { struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -313,18 +352,22 @@ typedef union { ...@@ -313,18 +352,22 @@ typedef union {
} c; } c;
} cdh_uPackName; } cdh_uPackName;
//! Object name struct
typedef struct { typedef struct {
pwr_tObjName orig; pwr_tObjName orig;
pwr_tObjName norm; pwr_tObjName norm;
cdh_uPackName pack; cdh_uPackName pack;
} cdh_sObjName; } cdh_sObjName;
//! Family struct.
typedef struct { typedef struct {
cdh_sObjName name; cdh_sObjName name;
pwr_tOid poid; pwr_tOid poid;
} cdh_sFamily; } cdh_sFamily;
//! Parse name mask
typedef union { typedef union {
//! Bitmask representation.
struct { struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -347,93 +390,94 @@ typedef union { ...@@ -347,93 +390,94 @@ typedef union {
#define cdh_mParseName_ (~cdh_mParseName__) #define cdh_mParseName_ (~cdh_mParseName__)
} cdh_mParseName; } cdh_mParseName;
/* Describe the format of a namestring. //! Name string format description.
/*!
Let us assume we have an object of class Ai. Let us assume we have an object of class Ai.
The object has an attribute called FilterAttribute. The object has an attribute called FilterAttribute.
Object name: Eobj - Object name: Eobj
Object id : 1234567890 - Object id : 1234567890
Class name : pwrb:Class-Ai - Class name : pwrb:Class-Ai
Class id : 0.2:34 - Class id : 0.2:34
Volume name: Avol - Volume name: Avol
Volume id : 0.123.34.63 - Volume id : 0.123.34.63
Parents : Bobj, Cobj, Dobj - Parents : Bobj, Cobj, Dobj
Attribute : FilterAttribute - Attribute : FilterAttribute
Index : 2 - Index : 2
Offset : 60 - Offset : 60
Size : 4 - Size : 4
Body name : pwrb:Class-Ai-RtBody - Body name : pwrb:Class-Ai-RtBody
Body id : 0.2:0.34.1 - Body id : 0.2:0.34.1
The name of this object can be written in different ways. The name of this object can be written in different ways.
The type cdh_mName is used to define the way an object is named. The type cdh_mName is used to define the way an object is named.
V P O B B A I E S I Form Fallback String - V P O B B A I E S I Form Fallback String
o a b o o t n s e d - o a b o o t n s e d
l t j d d t d c p T - l t j d d t d c p T
u h e y y r e a a y - u h e y y r e a a y
m c I N i x p r p - m c I N i x p r p
e t d a b e a e - e t d a b e a e
m u G t - m u G t
e t M o - e t M o
e S r - e S r
1 * * * * * * * 0 1 Id * _V0.123.34.63 - 1 * * * * * * * 0 1 Id * _V0.123.34.63
1 * * * * * * * 1 1 Id * _V0.123.34.63: - 1 * * * * * * * 1 1 Id * _V0.123.34.63:
1 * * * * * * * 0 0 Id * 0.123.34.63 - 1 * * * * * * * 0 0 Id * 0.123.34.63
1 * * * * * * * 1 0 Id * 0.123.34.63: - 1 * * * * * * * 1 0 Id * 0.123.34.63:
0 * 1 * * * * * * 1 Id * _O0.123.34.63:1234567890 - 0 * 1 * * * * * * 1 Id * _O0.123.34.63:1234567890
0 * 1 * * * * * * 0 Id * 0.123.34.63:1234567890 - 0 * 1 * * * * * * 0 Id * 0.123.34.63:1234567890
0 * 0 1 * 1 0 * * * Id * _A0.123.34.63:1234567890(_T0.2:0.34.1) - 0 * 0 1 * 1 0 * * * Id * _A0.123.34.63:1234567890(_T0.2:0.34.1)
0 * 0 1 * 1 1 * * * Id * _A0.123.34.63:1234567890(_T0.2:0.34.1)[60.4] - 0 * 0 1 * 1 1 * * * Id * _A0.123.34.63:1234567890(_T0.2:0.34.1)[60.4]
1 * * * * * * * * * Std Export _V0.123.34.63: - 1 * * * * * * * * * Std Export _V0.123.34.63:
0 0 0 * * 1 * * * * Std Export _O0.123.34.63:1234567890 - 0 0 0 * * 1 * * * * Std Export _O0.123.34.63:1234567890
0 0 0 0 1 1 * * * * Std Export _A0.123.34.63:1234567890(pwrb:Class-Ai-RtBody)FilterAttribute[2] - 0 0 0 0 1 1 * * * * Std Export _A0.123.34.63:1234567890(pwrb:Class-Ai-RtBody)FilterAttribute[2]
1 1 1 0 0 1 1 0 * * Std Strict Avol:Bobj-Cobj-Dobj-Eobj.FilterAttribute[2] - 1 1 1 0 0 1 1 0 * * Std Strict Avol:Bobj-Cobj-Dobj-Eobj.FilterAttribute[2]
0 1 1 0 0 1 1 0 * * Std Strict Bobj-Cobj-Dobj-Eobj.FilterAttribute[2] - 0 1 1 0 0 1 1 0 * * Std Strict Bobj-Cobj-Dobj-Eobj.FilterAttribute[2]
0 0 1 0 0 1 1 0 * * Std Strict Eobj.FilterAttribute[2] - 0 0 1 0 0 1 1 0 * * Std Strict Eobj.FilterAttribute[2]
0 0 0 0 0 1 1 0 0 * Std Strict FilterAttribute[2] - 0 0 0 0 0 1 1 0 0 * Std Strict FilterAttribute[2]
0 0 0 0 0 1 1 0 1 * Std Strict .FilterAttribute[2] - 0 0 0 0 0 1 1 0 1 * Std Strict .FilterAttribute[2]
0 0 0 0 0 1 0 0 0 * Std Strict FilterAttribute - 0 0 0 0 0 1 0 0 0 * Std Strict FilterAttribute
0 0 0 0 0 1 0 0 1 * Std Strict .FilterAttribute - 0 0 0 0 0 1 0 0 1 * Std Strict .FilterAttribute
1 1 1 0 0 1 0 0 * * Std Strict Avol:Bobj-Cobj-Dobj-Eobj.FilterAttribute - 1 1 1 0 0 1 0 0 * * Std Strict Avol:Bobj-Cobj-Dobj-Eobj.FilterAttribute
1 1 1 0 0 0 0 0 0 * Std Strict Avol:Bobj-Cobj-Dobj-Eobj - 1 1 1 0 0 0 0 0 0 * Std Strict Avol:Bobj-Cobj-Dobj-Eobj
1 1 1 0 0 0 0 0 1 * Std Strict Avol:Bobj-Cobj-Dobj-Eobj- - 1 1 1 0 0 0 0 0 1 * Std Strict Avol:Bobj-Cobj-Dobj-Eobj-
1 1 0 0 0 0 0 0 0 * Std Strict Avol:Bobj-Cobj-Dobj - 1 1 0 0 0 0 0 0 0 * Std Strict Avol:Bobj-Cobj-Dobj
1 1 0 0 0 0 0 0 1 * Std Strict Avol:Bobj-Cobj-Dobj- - 1 1 0 0 0 0 0 0 1 * Std Strict Avol:Bobj-Cobj-Dobj-
1 0 0 0 0 0 0 0 0 * Std Strict Avol - 1 0 0 0 0 0 0 0 0 * Std Strict Avol
1 0 0 0 0 0 0 0 1 * Std Strict Avol: - 1 0 0 0 0 0 0 0 1 * Std Strict Avol:
1 1 1 0 0 1 1 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj\-Eobj\.FilterAttribute[2] - 1 1 1 0 0 1 1 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj\-Eobj\.FilterAttribute[2]
0 1 1 0 0 1 1 1 0 * Std Strict Bobj\-Cobj\-Dobj\-Eobj\.FilterAttribute[2] - 0 1 1 0 0 1 1 1 0 * Std Strict Bobj\-Cobj\-Dobj\-Eobj\.FilterAttribute[2]
0 0 1 0 0 1 1 1 0 * Std Strict Eobj\.FilterAttribute[2] - 0 0 1 0 0 1 1 1 0 * Std Strict Eobj\.FilterAttribute[2]
0 0 0 0 0 1 1 1 0 * Std Strict FilterAttribute[2] - 0 0 0 0 0 1 1 1 0 * Std Strict FilterAttribute[2]
1 1 1 0 0 1 0 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj\-Eobj\.FilterAttribute - 1 1 1 0 0 1 0 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj\-Eobj\.FilterAttribute
1 1 1 0 0 0 0 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj\-Eobj - 1 1 1 0 0 0 0 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj\-Eobj
1 1 0 0 0 0 0 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj - 1 1 0 0 0 0 0 1 0 * Std Strict Avol\:Bobj\-Cobj\-Dobj
1 0 0 0 0 0 0 1 0 * Std Strict Avol - 1 0 0 0 0 0 0 1 0 * Std Strict Avol
1 1 1 0 0 1 1 0 * * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj.FilterAttribute[2] - 1 1 1 0 0 1 1 0 * * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj.FilterAttribute[2]
0 1 1 0 0 1 1 0 * * Root Strict /Bobj/Cobj/Dobj/Eobj.FilterAttribute[2] - 0 1 1 0 0 1 1 0 * * Root Strict /Bobj/Cobj/Dobj/Eobj.FilterAttribute[2]
0 0 1 0 0 1 1 0 * * Root Strict Eobj.FilterAttribute[2] - 0 0 1 0 0 1 1 0 * * Root Strict Eobj.FilterAttribute[2]
0 0 0 0 0 1 1 0 0 * Root Strict FilterAttribute[2] - 0 0 0 0 0 1 1 0 0 * Root Strict FilterAttribute[2]
1 1 1 0 0 1 0 0 0 * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj.FilterAttribute - 1 1 1 0 0 1 0 0 0 * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj.FilterAttribute
1 1 1 0 0 0 0 0 0 * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj - 1 1 1 0 0 0 0 0 0 * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj
1 1 1 0 0 0 0 0 1 * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj/ - 1 1 1 0 0 0 0 0 1 * Root Strict //Avol/Bobj/Cobj/Dobj/Eobj/
1 1 0 0 0 0 0 0 0 * Root Strict //Avol/Bobj/Cobj/Dobj - 1 1 0 0 0 0 0 0 0 * Root Strict //Avol/Bobj/Cobj/Dobj
1 1 0 0 0 0 0 0 1 * Root Strict //Avol/Bobj/Cobj/Dobj/ - 1 1 0 0 0 0 0 0 1 * Root Strict //Avol/Bobj/Cobj/Dobj/
1 0 0 0 0 0 0 0 0 * Root Strict //Avol - 1 0 0 0 0 0 0 0 0 * Root Strict //Avol
1 0 0 0 0 0 0 0 1 * Root Strict //Avol/ - 1 0 0 0 0 0 0 0 1 * Root Strict //Avol/
*/ */
typedef union { typedef union {
pwr_tBitMask m; pwr_tBitMask m;
//! Bit mask representation.
struct { struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -477,6 +521,7 @@ typedef union { ...@@ -477,6 +521,7 @@ typedef union {
#endif #endif
} b; } b;
//! Word representation.
struct { struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -536,6 +581,7 @@ typedef union { ...@@ -536,6 +581,7 @@ typedef union {
cdh_mName_index | cdh_mName_form_std | cdh_mName_fallback_strict) cdh_mName_index | cdh_mName_form_std | cdh_mName_fallback_strict)
} cdh_mName; } cdh_mName;
//! Parse name struct.
typedef struct { typedef struct {
pwr_tOid poid; /* Parent objid, or NOBJID */ pwr_tOid poid; /* Parent objid, or NOBJID */
cdh_mParseName parseFlags; cdh_mParseName parseFlags;
...@@ -556,6 +602,10 @@ typedef struct { ...@@ -556,6 +602,10 @@ typedef struct {
cdh_sFamily attribute; cdh_sFamily attribute;
} cdh_sParseName; } cdh_sParseName;
/*@}*/
/*! \addtogroup Cdh */
/*@{*/
/* Function prototypes to exported functions. */ /* Function prototypes to exported functions. */
int int
...@@ -865,8 +915,11 @@ cdh_NoCaseStrcmp ( ...@@ -865,8 +915,11 @@ cdh_NoCaseStrcmp (
char *cdh_OpSysToStr( pwr_mOpSys opsys); char *cdh_OpSysToStr( pwr_mOpSys opsys);
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
...@@ -47,11 +47,6 @@ ...@@ -47,11 +47,6 @@
pwr_Assert((p->tv_sec < 0) ? (p->tv_nsec <= 0 && p->tv_nsec > -1000000000) : TRUE);\ pwr_Assert((p->tv_sec < 0) ? (p->tv_nsec <= 0 && p->tv_nsec > -1000000000) : TRUE);\
} while (0) } while (0)
typedef struct {
int tv_sec;
int tv_nsec;
} tTime;
/* String representations of months. */ /* String representations of months. */
static const char *monStr[] = static const char *monStr[] =
......
...@@ -121,7 +121,9 @@ static void log_message (errh_sLog*, char, char*, va_list); ...@@ -121,7 +121,9 @@ static void log_message (errh_sLog*, char, char*, va_list);
static int msg_vsprintf (char *, const char *, aa_list, va_list); static int msg_vsprintf (char *, const char *, aa_list, va_list);
#if defined(OS_LYNX) || defined(OS_LINUX) || defined(OS_ELN) #if defined(OS_LYNX) || defined(OS_LINUX) || defined(OS_ELN)
static size_t strnlen (const char*, size_t); static size_t errh_strnlen (const char*, size_t);
#else
#define errh_strnlen strnlen
#endif #endif
static unsigned int do_div (int*, unsigned int); static unsigned int do_div (int*, unsigned int);
...@@ -818,7 +820,7 @@ repeat: ...@@ -818,7 +820,7 @@ repeat:
if (!s) if (!s)
s = "<NULL>"; s = "<NULL>";
len = strnlen(s, precision); len = errh_strnlen(s, precision);
if (!(flags & LEFT)) if (!(flags & LEFT))
while (len < field_width--) while (len < field_width--)
...@@ -907,7 +909,7 @@ repeat: ...@@ -907,7 +909,7 @@ repeat:
whatever comes true first. */ whatever comes true first. */
static size_t static size_t
strnlen ( errh_strnlen (
const char *s, const char *s,
size_t count size_t count
) )
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "rt_mh_util.h" #include "rt_mh_util.h"
#include "rt_errh.h" #include "rt_errh.h"
//! Application context.
typedef struct { typedef struct {
mh_sHead head; mh_sHead head;
qcom_sQid handler; qcom_sQid handler;
......
...@@ -129,9 +129,7 @@ static const qcom_sQid qcom_cQhdClient = {qcom_cIhdClient, 0}; ...@@ -129,9 +129,7 @@ static const qcom_sQid qcom_cQhdClient = {qcom_cIhdClient, 0};
static const qcom_sQid qcom_cQnacp = {qcom_cInacp, 0}; static const qcom_sQid qcom_cQnacp = {qcom_cInacp, 0};
static const qcom_sQid qcom_cQini = {qcom_cIini, 0}; static const qcom_sQid qcom_cQini = {qcom_cIini, 0};
/** //! Application identity
* ZZZ
*/
typedef struct { typedef struct {
qcom_tAix aix; /**< Application index */ qcom_tAix aix; /**< Application index */
pwr_tNodeId nid; /**< Node identity */ pwr_tNodeId nid; /**< Node identity */
...@@ -139,27 +137,32 @@ typedef struct { ...@@ -139,27 +137,32 @@ typedef struct {
static const qcom_sAid qcom_cNAid = {0, 0}; static const qcom_sAid qcom_cNAid = {0, 0};
//! Qcom application
typedef struct { typedef struct {
qcom_sAid aid; qcom_sAid aid;
pid_t pid; pid_t pid;
} qcom_sAppl; } qcom_sAppl;
//! Qcom event
typedef struct { typedef struct {
qcom_sAid aid; qcom_sAid aid;
pid_t pid; pid_t pid;
int mask; int mask;
} qcom_sEvent; } qcom_sEvent;
//! Queue attributes
typedef struct { typedef struct {
qcom_eQtype type; qcom_eQtype type;
unsigned int quota; unsigned int quota;
} qcom_sQattr; } qcom_sQattr;
//! Qcom type
typedef struct { typedef struct {
qcom_eBtype b; qcom_eBtype b;
qcom_eStype s; qcom_eStype s;
} qcom_sType; } qcom_sType;
//! Put data structure.
typedef struct { typedef struct {
qcom_sQid reply; qcom_sQid reply;
qcom_sType type; qcom_sType type;
...@@ -167,6 +170,7 @@ typedef struct { ...@@ -167,6 +170,7 @@ typedef struct {
void *data; void *data;
} qcom_sPut; } qcom_sPut;
//! Get data structure
typedef struct { typedef struct {
qcom_sAid sender; qcom_sAid sender;
pid_t pid; pid_t pid;
...@@ -179,8 +183,10 @@ typedef struct { ...@@ -179,8 +183,10 @@ typedef struct {
void *data; void *data;
} qcom_sGet; } qcom_sGet;
//! Node status
typedef union { typedef union {
pwr_tBitMask m; pwr_tBitMask m;
//! Bitmask representation
pwr_32Bits ( pwr_32Bits (
pwr_Bits( initiated , 1), pwr_Bits( initiated , 1),
pwr_Bits( connected , 1), pwr_Bits( connected , 1),
...@@ -203,17 +209,16 @@ typedef union { ...@@ -203,17 +209,16 @@ typedef union {
} qcom_mNode; } qcom_mNode;
/**
* Strucure describing a node ??? //! Data for a Qcom node.
*/
typedef struct { typedef struct {
pwr_tNodeId nid; /**< node index */ pwr_tNodeId nid; //!< node index
qcom_mNode flags; /**< node flags */ qcom_mNode flags; //!< node flags
char name[80]; /**< node name */ char name[80]; //!< node name
co_eOS os; /**< operating system */ co_eOS os; //!< operating system
co_eHW hw; /**< hardware */ co_eHW hw; //!< hardware
co_eBO bo; /**< big/little endian */ co_eBO bo; //!< big/little endian
co_eFT ft; /**< float type */ co_eFT ft; //!< float type
} qcom_sNode; } qcom_sNode;
......
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