[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

3043.0. "What's the syntax for BITSET attributes" by STAR::PITCHER (Steve Pitcher/VMS Engineering) Wed May 20 1992 20:50

I'm working with the TEST entity class, which was defined for testing DNA CMIP.
This class has attributes of most every datatype supported by CMIP.

One attribute is TYPE BITSET.

What am I doing wrong?

MCC> set node 0 test type bitset {1}
%MCC-I-NOPARCMD, {1}
                 ^
%MCC-I-SYNTAXERR, Syntax error -- unable to interpret remainder of line
%MCC-E-INVALID_BASETYP, invalid base type

MCC>

The attribute TYPE BITSET is of type TypBitSet, where TypBitSet is
BITSET OF Unsigned8 in the MSL.

What syntax should I use to specify a value for a bitset of unsigned 8????
  
T.RTitleUserPersonal
Name
DateLines
3043.1you need another level of typedef in your MSLTOOK::KOHLSRuth KohlsThu May 21 1992 15:2333
Note the second line of the message:

>%MCC-E-INVALID_BASETYP, invalid base type

and :

>The attribute TYPE BITSET is of type TypBitSet, where TypBitSet is
>BITSET OF Unsigned8 in the MSL.


A Bitset is 1 to 32 bits, each one set or not depending on the values 
selected from the base type.  Since we must be able to tell which bit to 
set for each value, there can only be 32 possibilities.   So, a Bitset is
either a BITSET OF SomeEnumeration, where SomeEnumeration is an
enumeration of up to 32 values; or Bitset is BITSET OF SomeSubRange,
where SomeSubrange is a Sub Range of Integer, with at most 32 values.

SubRange base types may be integers, enumerations, or string data
types, but Bitset limits the choice to subrange of integer. 

The SubRange is missing in your definition.  You need another level of
typedef:

TYPE 
	SRUns8 = 99 Unsigned8[0..31];

TYPE 
	typbitset = 999 BITSET OF SRUns8;


Your command line syntax is correct. 

Ruth Kohls
3043.2Also, its Integer, not UnsignedTOOK::KOHLSRuth KohlsThu May 21 1992 17:098
Looking through my notes, I find that Bitset of subrange is limited
to subrange of Integer, so the data types in the example in .1 should
be changed from Unsigned8 to Integer8.

Also, I have filed QAR 3037 on Bitset of Subrange, which doesn't work
even when the MSL is correct.

Ruth Kohls
3043.3More for your QARBLUMON::SYLORArchitect = Buzzword GeneratorWed Jun 24 1992 19:3310
Ruth, add to the QAR

BIT SET is supposed to support any base type which can be mapped into **any**
integer subrange. So a BITSET OF 128..148 would be perfectly legal.
So to would a BIT SET OF an enumeration, for example BIT SET OF DaysOfWeek.

Finally, there should not be a limit on the size of a BITSET. a bitset 1000
bits long is perfectly reasonable. I've not seen a BITSET bigger than 32 bits
yet, but it's unreasonable for MCC to limit it. I wouldn't recommend defining 
a BITSET bigger than 32 bits, but that doesn't prevent it from being needed.