1/*
2
3 ASN.1 Specification of 11073-20601
4 Health informatics – Personal health device communication –
5 Part 20601: Application profile – Optimized exchange protocol
6
7 The info was manually extracted and adapted to be valid ASN1 syntax.
8
9    $Id$
10    Copyright (C) 2009,2012 Alois Schloegl <alois.schloegl@gmail.com>
11    This file is part of BioSig http://biosig.sf.net/
12
13    BioSig is free software; you can redistribute it and/or
14    modify it under the terms of the GNU General Public License
15    as published by the Free Software Foundation; either version 3
16    of the License, or (at your option) any later version.
17
18*/
19
20
21ModuleTest DEFINITIONS ::=
22BEGIN
23
24
25/*
26This annex provides ASN.1 definitions relevant for the personal health device
27protocol. Some are imported from other parts of the ISO/IEEE 11073 family of
28standards and others are created specifically for the personal health device
29domain. If there is interest in understanding which structures are imported
30and which are new, see J. This annex ensures that all data structures required
31to implement this Standard are readily available.
32The naming convention followed in this annex is to use hyphen (-) to separate
33words in attributes and to use mixed case when describing data types; however,
34constructs that were imported from other specifications follow the existing
35use of capitalization and hyphenation.
36Common data types
37This subclause defines a set of ASN.1 data types that are used in the object
38definitions.
39Integer and bit string data types
40For representing integer numbers, the object definitions use fixed-size data
41types only. The bit string data type represents a bit field where each single
42bit has a defined meaning (i.e., flag fields). The following integer data
43types and bit string data types are used:
44*/
45
46--
47-- 8-bit unsigned integer
48--
49INT-U8 ::= INTEGER (0..255)
50--
51-- 8-bit signed integer
52--
53INT-I8 ::= INTEGER (-128..127)
54--
55-- 16-bit unsigned integer
56--
57INT-U16 ::= INTEGER (0..65535)
58--
59-- 16-bit signed integer
60--
61INT-I16 ::= INTEGER (-32768..32767)
62--
63-- 32-bit unsigned integer
64--
65INT-U32 ::= INTEGER (0..4294967295)
66--
67-- 32-bit signed integer
68--
69INT-I32 ::= INTEGER (-2147483648..2147483647)
70--
71-- Unless otherwise stated, all unused (reserved) bits in any of the BITS-* constructs shall be set to 0 by
72-- the sender and unless otherwise stated, shall be ignored by the receiver if they are set to 1.
73--
74-- 8-bit bit string
75--
76BITS-8 ::= BIT STRING (SIZE(8))
77--
78-- 16-bit bit string
79--
80BITS-16 ::= BIT STRING (SIZE(16))
81--
82-- 32-bit bit string
83--
84BITS-32 ::= BIT STRING (SIZE(32))
85/*
86Note that in object definitions, integer and bit string data types with named constants or named bits use the above defined basic data types for simplicity. This approach provides an abbreviated notation, but it is illegal ASN.1 syntax. It can be easily transformed to the correct syntax. For example, the definition
87NamedConstant ::= INTEGER {
88const1(1),
89const2(2)
90}
91
92becomes correct ASN.1 syntax defined as:
93NamedConstant ::= INTEGER {
94const1(1),
95const2(2)
96} (0..65535)
97Identification data type
98All elements (e.g., classes, objects, and measurement types) that need unique identification are assigned an object identifier (OID). The set of valid OIDs for this Standard is defined in ISO/IEEE 11073-10101 K. The nomenclature consists of a set of partitions, where each partition covers a specific concept and has its own 16-bit codes. In other words, a specific code is identified by both its partition number and an OID within that partition or its use is context dependent. In the case of context-dependent codes, the specific partition the code utilized is called out within this Standard.
99The 16-bit identification data type is defined as follows:
100*/
101
102--
103-- OID type as defined in nomenclature
104-- (do not confuse with ASN.1 OID)
105--
106OID-Type ::= INT-U16 -- 16-bit integer type
107
108/*
109A private partition is available for codes and IDs that are yet to be standardized or for manufacturer-specific codes.
110*/
111--
112-- Private OID
113--
114PrivateOid ::= INT-U16
115
116/*
117Handle data type
118The handle data type is used for efficient and locally unique identification of all managed object instances. (Locally unique means unique within one MDS context.) This data type is defined as follows:
119*/
120--
121-- handle
122--
123HANDLE ::= INT-U16
124
125/*
126Instance number data type
127The instance number is used to distinguish class or object instances of the same type or object instances that are not directly manageable (used, e.g., as the identification attribute for PM-segment objects).
128*/
129--
130-- Instance Number
131--
132InstNumber ::= INT-U16
133
134/*
135Type ID data type
136The type ID data type is used to identify the type of all elements (e.g., classes, objects, and measurement types). It is similar to the OID type (B2.2), but includes both the nomenclature partition and code to provide unique identification of an element. It shall be used when the context is not implicit. This data type is defined as follows:
137*/
138--
139-- Type ID
140--
141TYPE ::= SEQUENCE {
142	partition	NomPartition,
143	code	OID-Type
144}
145--
146-- The following nomenclature partitions exist:
147--
148NomPartition ::= INTEGER {
149	nom-part-unspec(0),	-- unspecified
150	nom-part-obj(1),		-- object-oriented partition
151	nom-part-metric(2),	-- metric [supervisory control and data acquisition
152			-- (SCADA)] partition
153	nom-part-alert(3),		-- alerts/events partition
154	nom-part-dim(4),		-- dimensions partition
155	nom-part-vattr(5),	-- virtual attribute partition for operation objects
156	nom-part-pgrp(6),	-- parameter group ID partition
157	nom-part-sites(7),		-- measurement and body site locations
158	nom-part-infrastruct(8),	-- infrastructure elements partition
159	nom-part-fef(9),		-- file exchange format partition
160	nom-part-ecg-extn(10),	-- electrocardiogram extensions partition
161	nom-part-idco-extn(11),	-- implantable cardiac device observation extensions
162	nom-part-phd-dm(128),	-- disease management
163	nom-part-phd-hf(129),	-- health and fitness
164	nom-part-phd-ai(130),	-- aging independently
165	nom-part-ret-code(255),	-- return codes partition
166	nom-part-ext-nom(256),	-- IDs of other nomenclatures and dictionaries
167	nom-part-priv(1024)	-- private partition
168} (0..65535)
169
170/*
171Attribute value assertion (AVA) data type
172The AVA data type fully specifies the attribute of an object by its attribute ID and its value. As the structure of the value is attribute dependent, the type is specified by ANY DEFINED BY. This data type supports a number of services used to access object attributes (e.g., GET and SET). The attribute ID values are defined for each object type in the Attribute ID column of the object definition tables (i.e., , , , , , , , , , , and ). The structure used for the attribute-value is defined by the Attribute Type column of the same tables. The AVA data type is defined as follows:
173*/
174--
175AVA-Type ::= SEQUENCE {
176	attribute-id	OID-Type, 	-- This shall come from the nom-part-obj partition
177	attribute-value	ANY DEFINED BY attribute-id
178}
179
180/*
181Attribute list data type
182Frequently, a list of attribute ID–attribute value pairs is needed. The attribute list data type is a special data type that is provided for this situation and is defined as follows:
183*/
184--
185AttributeList ::= SEQUENCE OF AVA-Type
186
187/*
188Attribute ID list data type
189Frequently, a list of attribute IDs is used. The attribute ID list data type is a special type that is provided for convenience and is defined as follows:
190*/
191--
192AttributeIdList ::= SEQUENCE OF OID-Type
193
194/*
195Floating point type (FLOAT-Type) data type
196The FLOAT-Type data type is defined to represent numeric values that are not integer in type. The FLOAT-Type is defined as a 32-bit value with 24-bit mantissa and 8-bit exponent. See F.7 for full definition of this data type. This data type is defined as follows:
197*/
198--
199-- 32-bit float type; the integer type is a placeholder only
200--
201FLOAT-Type ::= INT-U32
202
203/*
204The 32 bits contain an 8-bit signed exponent to base 10, followed by a 24-bit signed integer (mantissa).
205Special values are assigned to express the following:
206NaN (not a number) [exponent 0, mantissa +(2**23 –1)  0x007FFFFF]
207NRes (not at this resolution) [exponent 0, mantissa –(2**23)  0x00800000]
208+ INFINITY [exponent 0, mantissa +(2**23 –2)  0x007FFFFE]
209– INFINITY [exponent 0, mantissa –(2**23 –2)  0x00800002]
210Reserved for future use [exponent 0, mantissa –(2**23–1)  0x00800001]
211*/
212/*Short floating point type (SFLOAT-Type) data type
213The short floating point type SFLOAT-Type data type is defined to represent numeric values that are not integer in type and have limited resolution. The SFLOAT-Type is defined as a 16-bit value with 12-bit mantissa and 4-bit exponent. See Annex ‎F.7 for full definition of this data type. This data type is defined as follows:
214*/
215--
216-- 16-bit float type; the integer type is a placeholder only
217--
218SFLOAT-Type ::= INT-U16
219
220/*
221The 16–bit value contains a 4-bit exponent to base 10, followed by a 12-bit mantissa. Each is in twos-complement form.
222Special values are assigned to express the following:
223 NaN [exponent 0, mantissa +(2**11 –1)  0x07FF]
224NRes [exponent 0, mantissa –(2**11)  0x0800]
225+ INFINITY [exponent 0, mantissa +(2**11 –2)  0x07FE]
226– INFINITY [exponent 0, mantissa –(2**11 –2)  0x0802]
227Reserved for future use [exponent 0, mantissa –(2**11 –1)  0x0801]
228*/
229
230/*
231Relative time data type
232The relative time data type is a time counter that is used to determine the relative time between events. This data type is used to position events relative to each other. It is defined as follows:
233*/
234--
235-- Relative time has a resolution of 125 μs (LSB), which is sufficient for sampling
236-- rates up to 8 kHz and spans time periods up to 6.2 days.
237-- The value of 0xFFFFFFFF shall be used when an agent is required to send a relative time in an ASN.1
238-- structure but does not support a relative time clock.
239--
240RelativeTime ::= INT-U32
241
242/*
243Note that the actual time resolution is defined by the agent.
244High-resolution relative time data type
245The high-resolution relative time data type is a high-resolution time counter that is used to determine the relative time between events. This data type is used to position events relative to each other. It is defined as follows:
246*/
247--
248-- High-resolution time has a resolution of 1 μs and can represent time
249-- spans of over 584 000 years. Theoretically, this could be modeled as an INT-U64;
250-- however, due to limitations in the ASN.1 compilers, embedded devices support
251-- for 64-bit integers, and the MDER specifications, an OCTET STRING was
252-- used instead.
253--
254HighResRelativeTime ::= OCTET STRING (SIZE(8))
255
256
257/*
258Note that the agent defines the actual time resolution used.
259*/
260--
261-- Absolute time adjust has a resolution of 1/100 of a second and can represent time
262-- adjustments of plus or minus 44 505 years. Theoretically, this could be modeled as an INT-I48;
263-- however, due to potential limitations in ASN.1 compilers, embedded devices support
264-- for 48-bit integers, and the MDER specifications, an OCTET STRING was
265-- used instead.
266--
267AbsoluteTimeAdjust ::= OCTET STRING (SIZE(6))
268
269/*
270Absolute time data type
271The absolute time data type specifies the time of day with a resolution of 1/100 of a second. The hour field shall be reported in 24-hr time notion (i.e., from 0 to 23). The values in the structure shall be encoded using binary coded decimal (i.e., 4-bit nibbles). For example, the year 1996 shall be represented by the hexadecimal value 0x19 in the century field and the hexadecimal value 0x96 in the year field. This format is easily converted to character- or integer-based representations. The absolute time data type is defined as follows:
272*/
273--
274AbsoluteTime ::= SEQUENCE {
275	century	INT-U8,
276	year	INT-U8,
277	month	INT-U8,
278	day	INT-U8,
279	hour	INT-U8,
280	minute	INT-U8,
281	second	INT-U8,
282	sec-fractions	INT-U8	-- 1/100 of a second if available
283}
284
285/*
286Note that the agent defines the actual time resolution used (e.g., if the clock resolution is 1 s, then sec‑fractions is always zero). Agents should have a resolution of 1 s or better.
287Base time with offsetdata type
288The base time with offset data type specifies the time of day and includes a time offset field to specify the difference in minutes between the base time and the local time. Base time is encoded as the number seconds since midnight of 1st January 1900 specified as INT-U32 and the fraction of x/65 536 s as INT-U16. The time offset field is specified as INT-I16. The base offset time data type is defined as follows:
289*/
290--
291BaseOffsetTime ::= SEQUENCE {
292	bo-seconds	INT-U32,
293	bo-fraction	INT-U16,
294	bo-time-offset	INT-I16
295}
296
297/*
298Operational state data type
299The operational state data type defines if a certain object or other property is enabled or disabled.
300*/
301--
302OperationalState ::= INTEGER {
303	disabled(0),
304	enabled(1),
305	notAvailable(2)		-- the value notAvailable is not used in this Standard
306} (0..65535)
307
308/*
309Attribute data types
310MDS attributes
311*/
312--
313-- SystemModel contains manufacturer name and manufacturer specific model information.
314-- While model-number field name suggests a number, there is no requirement that the field
315-- contains numeric values. The format of the manufacturer name and model number strings
316-- are decided upon by the agent vendor, but shall be printable ASCII.
317--
318SystemModel ::= SEQUENCE {
319	manufacturer	OCTET STRING,	-- string size shall be even
320	model-number	OCTET STRING		-- string size shall be even
321}
322
323--
324-- ProductionSpec deals with serial numbers, part numbers, revisions, etc.
325-- Note that an agent may have multiple components; therefore, the prod-spec should be an
326-- ASCII printable string of the format “spec-type: vendor-specified-str” where spec-type is
327-- replaced by the string representation of spec-type. The format of the vendor-specified-str
328-- is determined by the vendor.
329--
330ProductionSpec ::= SEQUENCE OF ProdSpecEntry
331
332ProdSpecEntry ::= SEQUENCE {
333	spec-type	INTEGER {
334		unspecified(0),
335		serial-number(1),
336		part-number(2),
337		hw-revision(3),
338		sw-revision(4),
339		fw-revision(5),
340		protocol-revision(6),
341		prod-spec-gmdn(7) 	-- see note on GMDN below
342		} (0..65535),
343	component-id	PrivateOid,
344	prod-spec	OCTET STRING		-- string size shall be even
345}
346
347-- Note: The Global Medical Device Nomenclature (GMDN) is based on ISO 15225 K
348-- and was developed under the auspices of CEN TC257 SC1.1
349
350--
351-- PowerStatus defines whether device is on battery or on mains. Upper bits define the charging
352-- state.
353--
354PowerStatus ::= BITS-16 {
355	onMains(0),
356	onBattery(1),
357	chargingFull(8),
358	chargingTrickle(9),
359	chargingOff(10)
360}
361
362--
363-- All measures about the battery are values with their dimensions. See the description
364-- of Remaining-Battery-Time in  for a description of legal units.
365--
366BatMeasure ::= SEQUENCE {
367	value	FLOAT-Type,
368	unit	OID-Type	-- from nom-part-dim partition
369}
370
371/*
372Metric attributes
373This group contains imported attribute definitions that apply to the numeric, enumeration, and the RT-SA objects.
374*/
375--
376-- Status of the measurement
377-- The bit values 14 and 15 are used in other ISO/IEEE 11073 standards and shall not be used for a different
378-- purpose.
379--
380MeasurementStatus ::= BITS-16 {
381	invalid(0),
382	questionable(1),
383	not-available(2),
384	calibration-ongoing(3),
385	test-data(4),
386	demo-data(5),
387	validated-data(8),		-- relevant, e.g., in an archive
388	early-indication(9),	-- early estimate of value
389	msmt-ongoing(10)	-- indicates a new measurement is just being taken
390-- (episodic)
391}
392Numeric attributes
393--
394-- NuObsValue (Numeric Observed Value) always includes identification, state, and dimension.
395--
396NuObsValue ::= SEQUENCE {
397	metric-id	OID-Type,	-- This code comes from the partition identified in
398			-- Metric::Type attribute of the numeric object.
399	state	MeasurementStatus,
400unit-code	OID-Type,	-- from nom-part-dim dimensions nomenclature
401		-- partition
402	value	FLOAT-Type
403}
404
405--
406-- Observed value for compound numerics
407--
408NuObsValueCmp ::= SEQUENCE OF NuObsValue
409
410/*
411RT-SA attributes
412*/
413--
414-- SaSpec describes the sample array.
415--
416SaSpec ::= SEQUENCE {
417	array-size	INT-U16,	-- number of samples per metric update period
418	sample-type	SampleType,
419	flags	SaFlags
420}
421
422--
423-- SampleType describes one sample in the observed value array.
424--
425SampleType ::= SEQUENCE {
426	sample-size	INT-U8,	-- e.g., 8 for 8-bit samples, 16 for 16-bit samples,
427			-- shall be divisible by 8
428	significant-bits	INT-U8	-- defines significant bits in one sample
429	     { signed-samples(255)}	-- if value is 255, the samples
430			-- in Simple-Sa-Observed-Value and
431			-- lower-scaled-value and upper-scaled-value in
432			-- ScaleRangeSpec shall be interpreted as signed
433			-- integers in twos-complement form.
434}
435
436--
437-- SaFlags defines additional wave form properties.
438--
439SaFlags ::= BITS-16 {
440	smooth-curve(0),		-- for optimum display, use a smoothing algorithm
441	delayed-curve(1),		-- curve is delayed (not real time)
442	static-scale(2),		-- ScaleRangeSpec does not change
443	sa-ext-val-range(3)	-- The nonsignificant bits in a sample are not 0, e.g.,
444			-- when they are used for annotations or markers.
445			-- The receiver shall apply a bit mask to extract the
446			-- significant bits from the sample. If the samples are
447			-- signed, the sa-ext-val-range bit shall not be set
448			-- (because, by definition, there cannot be
449			-- nonsignificant bits in the field).
450}
451
452--
453-- The scale and range definition attribute describes a mapping between scaled values
454-- and absolute values and defines the expected range of absolute values and scaled values.
455-- Dependent on the range of the scaled values, multiple attribute types exist.
456-- The mapping between sample values and converted absolute values is defined by
457-- the Scale-and-Range-Specification formula in .
458--
459ScaleRangeSpec8 ::= SEQUENCE {
460	lower-absolute-value	FLOAT-Type,
461	upper-absolute-value	FLOAT-Type,
462	lower-scaled-value	INT-U8, 	-- n.b. interpret as INT-I8
463	upper-scaled-value	INT-U8	-- if Sa-Specification attribute
464				-- indicates signed samples
465}
466
467ScaleRangeSpec16 ::= SEQUENCE {
468	lower-absolute-value	FLOAT-Type,
469	upper-absolute-value	FLOAT-Type,
470	lower-scaled-value	INT-U16, 	-- n.b. interpret as INT-I16
471	upper-scaled-value	INT-U16	-- if Sa-Specification attribute
472				-- indicates signed samples
473}
474
475ScaleRangeSpec32 ::= SEQUENCE {
476	lower-absolute-value	FLOAT-Type,
477	upper-absolute-value	FLOAT-Type,
478	lower-scaled-value	INT-U32, 	-- n.b. interpret as INT-I32
479	upper-scaled-value	INT-U32	-- if Sa-Specification attribute
480				-- indicates signed samples
481}
482
483/*
484Enumeration attributes
485*/
486--
487-- EnumObsValue describes the enumeration observed value.
488--
489EnumObsValue ::= SEQUENCE {
490	metric-id 	OID-Type, 	-- This code comes from the partition defined in the
491			-- Metric-Id-Partition attribute, if valued. Otherwise,
492-- it comes from the same partition as the Type
493-- attribute.
494	state 	MeasurementStatus,
495	value 	EnumVal 	-- supports different value data types
496}
497
498-- EnumVal is used to denote different specific observation data types as follows
499-- (Note that the type of measurement is coded in the top-level structure EnumObsVal::metric-id):
500--
501-- 	enum-obj-id: 	used to communicate a metric OID, e.g., as an annotation or
502-- 		other event defined in the Metric::Type partition
503-- 	enum-text-string: 	used to communicate a free text string (e.g., a status message)
504-- 	enum-bit-str: 	for coding bit string values; the bit string data type shall be
505-- 		defined separately, e.g., in the nomenclature or in a
506-- 		device-specific standard
507--
508-- Other data types defined in ISO/IEEE 11073-10201:2004 K are not included here as they are not
509-- relevant for personal health devices.
510--
511EnumVal ::= CHOICE {
512	enum-obj-id 	[1] OID-Type, 	-- This code comes from the partition defined in the
513			-- Enum-Observed-Value-Partition attribute, if
514-- valued. Otherwise, it comes from the same
515-- partition as the Type attribute.
516
517	enum-text-string 	[2] OCTET STRING,	-- printable ASCII text, size even
518	enum-bit-str 	[16] BITS-32 		-- bit string
519}
520
521/*
522Scanner attributes
523None
524Configurable scanner attributes
525*/
526--
527-- ConfirmMode defines if confirmed event reports or unconfirmed event reports are used.
528--
529ConfirmMode ::= INTEGER {
530	unconfirmed(0),
531	confirmed(1)
532} (0..65535)
533
534/*
535Episodic configurable scanner attributes
536None
537Periodic configurable scanner attributes
538None
539PM-store and PM-segment attributes
540*/
541--
542-- StoSampleAlg describes how samples are derived and averaged.
543--
544StoSampleAlg ::= INTEGER {
545	st-alg-nos(0),		-- not otherwise specified
546	st-alg-moving-average(1),
547	st-alg-recursive(2),
548	st-alg-min-pick(3),
549	st-alg-max-pick(4),
550	st-alg-median(5),
551	st-alg-trended(512),	-- trend values are used
552	st-alg-no-downsampling(1024), 	-- means no averaging, this is a real measured sample
553	st-alg-manuf-specific-start(61440),	-- start of the reserved manufacturer-specific range
554	st-alg-manuf-specific-end(65535)	-- end of the reserved manufacturer-specific range
555} (0..65535)
556
557/*
558ACTION-method-related data types
559*/
560--
561-- SetTimeInvoke selects the date and time to be set.
562--
563SetTimeInvoke ::= SEQUENCE {
564	date-time	AbsoluteTime,
565	accuracy	FLOAT-Type 	-- accounts for set time (e.g., 2 min error);
566			-- value is defined in seconds. This parameter is
567			-- inherited from ISO/IEEE 11073-10201:2004
568			-- K, but not used. Thus, it shall be zero (0).
569}
570
571--
572-- SetBOTimeInvoke selects the date and time to be set in base offset time format. If both the seconds and fraction fields are set to 0x0, they are ignored in the action and only the offset is changed.
573--
574SetBOTimeInvoke ::= SEQUENCE {
575	date-time	BaseOffsetTime
576}
577
578--
579-- SegmSelection selects the PM-segments that are subject to the method.
580--
581SegmSelection ::= CHOICE {
582	all-segments	[1] INT-U16,	-- if this type is chosen to select all segments
583			-- the actual contents of the field is “do not care”
584			-- and shall be zero
585	segm-id-list	[2] SegmIdList,	-- using this list requires that the manager already
586			-- knows the Instance-Number attributes of the
587			-- PM-segments, e.g., from a previous
588			-- Get-Segment-Info method call.
589	abs-time-range	[3] AbsTimeRange,
590			-- support of abs-time-range is optional, indicated in
591			-- the PM-Store-Capab attribute
592	bo-time-range	[4] BOTimeRange
593			-- support of bo-time-range is optional, indicated in
594			-- the PM-Store-Capab attribute
595}
596
597--
598-- SegmIdList selects PM-segments by ID.
599--
600SegmIdList ::= SEQUENCE OF InstNumber
601
602--
603-- AbsTimeRange allows selection of PM-segments by time period.
604--
605AbsTimeRange ::= SEQUENCE {
606	from-time	AbsoluteTime,
607	to-time	AbsoluteTime
608}
609
610--
611-- BOTimeRange allows selection of PM-segments by time period specified as base offset time.
612--
613BOTimeRange ::= SEQUENCE {
614	from-time	BaseOffsetTime,
615	to-time	BaseOffsetTime
616}
617--
618-- SegmentInfoList returns the object attributes (except the Fixed-Segment-Data) of all
619-- selected PM-segment object instances in response to the Get-Segment-Info PM-store method.
620-- This is required by the manager to retrieve the dynamic information about the segments.
621--
622SegmentInfoList ::= SEQUENCE OF SegmentInfo
623
624SegmentInfo ::= SEQUENCE {
625	seg-inst-no	InstNumber,
626	seg-info	AttributeList
627}
628
629/*
630Message-related data types
631*/
632ObservationScan ::= SEQUENCE {
633	obj-handle 	HANDLE,
634	attributes 	AttributeList
635}
636Other
637--
638-- TimeProtocolId indicates the time protocols that are supported/used by the device.
639--
640TimeProtocolId ::= OID-Type -- from the nom-part-infrastruct nomenclature partition
641
642
643/*
644Personal health device protocol frame
645The following data type represents the top-level message frame of the personal health device protocol. The data Apdu (encapsulated by the PrstApdu) is interpreted according to this Standard as a result of the negotiation contained within the association procedure as described in .
646MDER encoding rules shall always apply to the structure in A.7.
647*/
648ApduType ::= CHOICE {
649	aarq	[57856] AarqApdu,	-- Association Request [0xE200]
650	aare	[58112] AareApdu,	-- Association Response [0xE300]
651	rlrq	[58368] RlrqApdu,	-- Association Release Request
652				-- [0xE400]
653	rlre	[58624] RlreApdu,	-- Association Release Response
654				-- [0xE500]
655	abrt	[58880] AbrtApdu,	-- Association Abort [0xE600]
656	prst	[59136] PrstApdu		-- Presentation APDU [0xE700]
657}
658
659/*
660Association protocol definitions
661MDER encoding rules shall always apply to the structures in A.8.
662*/
663AarqApdu ::= SEQUENCE {
664	-- The assoc-version defines the version of the association procedure
665	-- used by the agent. The agent shall set exactly one
666	-- version bit. If the manager does not understand that version, it shall
667	-- reject the association request with rejected-unsupported-assoc-version.
668	assoc-version		AssociationVersion,
669	data-proto-list		DataProtoList
670}
671
672DataProtoList ::= SEQUENCE OF DataProto
673
674-- If the data-proto-id is set to data-proto-id-20601, the data-proto-info shall
675-- be filled with a PhdAssociationInformation structure.
676-- If the data-proto-id is set to data-proto-id-external, the data-proto-info shall
677-- be filled with a ManufSpecAssociationInformation structure.
678-- If the data-proto-id is set to data-proto-id-empty, the data-proto-info shall
679-- be empty (only used when the AareApdu is a reject).
680DataProto ::= SEQUENCE {
681	data-proto-id		DataProtoId,
682	data-proto-info		ANY DEFINED BY data-proto-id
683}
684
685-- All other DataProtoId values are reserved and shall not be used.
686DataProtoId ::= INTEGER {
687	data-proto-id-empty(0),	-- shall be used in AareApdu only when result is
688			-- a rejection
689	data-proto-id-20601(20601),	-- indicates exchange protocol follows this Standard
690	data-proto-id-external(65535)	-- indicates manufacturer specific
691			-- data protocol UUID is part of
692			-- the ManufSpecAssociationInformation
693} (0..65535)
694
695-- Association response
696AareApdu ::= SEQUENCE {
697	result		AssociateResult,
698	selected-data-proto	DataProto
699}
700
701-- Release request
702RlrqApdu ::= SEQUENCE {
703	reason		ReleaseRequestReason
704}
705
706-- Release response
707RlreApdu ::= SEQUENCE {
708	reason		ReleaseResponseReason
709}
710
711-- Abort
712AbrtApdu ::= SEQUENCE {
713	reason		Abort-reason
714}
715
716-- Reason for the Abort
717-- All unassigned " Abort-reason " values are reserved for future expansion and shall not be used.
718Abort-reason ::= INTEGER {
719	undefined(0),
720	buffer-overflow(1),
721	response-timeout(2),
722	configuration-timeout(3)	-- Configuration message not received in timely
723-- fashion
724}  (0..65535)
725
726-- See  for a usage description.
727-- All unassigned " AssociateResult " values are reserved for future expansion and shall not be used.
728AssociateResult ::= INTEGER {
729	accepted(0),
730	rejected-permanent(1),
731	rejected-transient(2),
732	accepted-unknown-config(3),
733	rejected-no-common-protocol(4),
734	rejected-no-common-parameter(5),
735	rejected-unknown(6),
736	rejected-unauthorized(7),
737	rejected-unsupported-assoc-version(8)
738} (0..65535)
739
740-- All unassigned " ReleaseRequestReason " values are reserved for future expansion and shall not be used.
741ReleaseRequestReason ::= INTEGER {
742	normal(0), 		-- used when the agent or manager decides to
743			-- release the association under normal conditions
744	no-more-configurations(1),	-- used by the agent when all possible configurations
745			-- were attempted and the manager
746			-- rejected them all.
747	configuration-changed(2)	-- used by the agent when its configuration changes
748			-- requiring the agent to release the association. This
749			-- may be followed by an Association Request with
750			-- new configuration information.
751} (0..65535)
752
753-- All unassigned " ReleaseResponseReason " values are reserved for future expansion and
754-- shall not be used.
755ReleaseResponseReason ::= INTEGER {
756	normal(0)
757} (0..65535)
758
759-- Association Request DataProto values are mapped to the PhdAssociationInformation.
760-- This information is used to announce and negotiate the protocol version, profile, etc.
761
762PhdAssociationInformation ::= SEQUENCE {
763	-- The protocolVersion information is used to communicate acceptable versions. When
764	-- the agent sends the protocolVersion, it shall set the bit(s) for each version
765	-- that it supports. When the manager responds, it shall set a single bit
766	-- to indicate the protocol version to be used by both. If there is not
767	-- a common protocol version, the manager shall reject the association request
768	-- and set the protocolVersion to all zeros.
769	protocol-version		ProtocolVersion,
770	encoding-rules		EncodingRules,
771	nomenclature-version	NomenclatureVersion,
772	functional-units		FunctionalUnits,
773	system-type		SystemType,
774	system-id		OCTET STRING,
775	dev-config-id		ConfigId,
776	data-req-mode-capab	DataReqModeCapab,
777	option-list		AttributeList
778}
779
780--
781-- Manufacturer-specific association information for a proprietary data protocol
782--
783ManufSpecAssociationInformation ::= SEQUENCE {
784	data-proto-id-ext		UuidIdent,
785	data-proto-info-ext	ANY DEFINED BY data-proto-id-ext
786}
787
788-- All unassigned " AssociationVersion " bit values are reserved for future expansion and
789-- shall be set to zero.
790AssociationVersion ::= BITS-32 {
791	assoc-version1(0)		-- This bit shall be set if version 1 of the association
792			-- protocol is supported
793}
794
795-- All unassigned " ProtocolVersion " bit values are reserved for future expansion and shall be set to zero.
796ProtocolVersion ::= BITS-32 {
797	protocol-version1(0),	-- This bit shall be set if IEEE Std 11073-20601-2008
798			-- is supported
799	protocol-version2(1),	-- This bit shall be set if IEEE Std 11073-20601a
800			-- is supported
801}
802
803--
804--The agent and manager shall always support MDER.
805--The agent and manager may negotiate other encoding rules besides MDER.
806-- All unassigned " EncodingRules " bit values are reserved for future expansion and shall be set to zero.
807--
808
809EncodingRules ::= BITS-16 {
810	mder(0),		-- This bit shall be set if MDER supported/selected
811	xer(1),		-- This bit shall be set if XER supported/selected
812	per(2)		-- This bit shall be set if PER supported/selected
813}
814
815-- All unassigned " NomenclatureVersion " bit values are reserved for future expansion and
816-- shall be set to zero.
817NomenclatureVersion ::= BITS-32 {	-- values reference a specific nomenclature standard
818	nom-version1(0)		-- This bit shall be set if version 1 is supported
819}
820
821-- All unassigned " FunctionalUnits " bit values are reserved for future expansion and shall be set to zero.
822FunctionalUnits ::= BITS-32 {
823	fun-units-unidirectional(0),	-- Reserved for future use.
824	fun-units-havetestcap(1),    	-- This bit indicates if the device can enter a
825			-- test association
826	fun-units-createtestassoc(2)	-- This bit is used to indicate an intention to
827			-- form a test association
828}
829
830-- All unassigned " SystemType " bit values are reserved for future expansion and shall be set to zero.
831SystemType ::= BITS-32 {
832	sys-type-manager(0),
833	sys-type-agent(8)
834}
835
836ConfigId ::= INTEGER {
837	manager-config-response(0),
838	standard-config-start(1),
839	standard-config-end(16383),
840	extended-config-start(16384),
841	extended-config-end(32767),
842	reserved-start(32768),
843	reserved-end(65535)
844} (0..65535)
845/*
846Presentation protocol definitions
847MDER encoding rules shall always apply to the structures in A.9.
848*/
849--
850-- The OCTET STRING contains the data APDU encoded according to the abstract and transfer syntaxes
851-- negotiated at association time. When the data-proto-id is negotiated to be data-proto-id-20601, the
852-- OCTET STRING shall be an encoded version of DataApdu.
853--
854PrstApdu ::=	OCTET STRING
855
856/*
857Data protocol definitions
858General
859The DataApdu and the related structures in A.10 shall use encoding rules as negotiated during the association procedure as described in . The agent and manager shall always support the MDER. The agent and manager may negotiate other encoding rules besides MDER.
860Data protocol frame
861*/
862--
863-- Combined Remote Operation Primitive Type and Operation Type
864-- In the remote operation invoke messages (roiv-*), invoke-id is an opaque handle
865-- that allows the sender of the message to identify the associated response message (if any).
866-- The sender of roiv-* message shall select a value of invoke-id that enables it to differentiate this message
867-- from any other roiv-* messages that have not been retired. Messages are retired either by the
868-- reception of a response (rors-*, roer, or rorj) or by exceeding the confirmation timeout value.
869-- When a response message (rors-*, roer, or rorj) is returned, the invoke-id from the invocation
870-- message shall be copied into the invoke-id of the response. This allows the initiator to match
871-- responses to outstanding requests. Since the handle is opaque, the receiver can make no other
872-- assumptions about invoke-id. In particular, it can not assume that it will be unique over any sequence of
873-- numbers or period of time.
874--
875DataApdu ::= SEQUENCE {
876	invoke-id		InvokeIDType,
877	message		CHOICE {
878	roiv-cmip-event-report	[256] EventReportArgumentSimple, -- [0x0100]
879	roiv-cmip-confirmed-event-report	[257] EventReportArgumentSimple, -- [0x0101]
880	roiv-cmip-get		[259] GetArgumentSimple, -- [0x0103]
881	roiv-cmip-set		[260] SetArgumentSimple, -- [0x0104]
882	roiv-cmip-confirmed-set	[261] SetArgumentSimple, -- [0x0105]
883	roiv-cmip-action		[262] ActionArgumentSimple, -- [0x0106]
884	roiv-cmip-confirmed-action	[263] ActionArgumentSimple, -- [0x0107]
885	rors-cmip-confirmed-event-report	[513] EventReportResultSimple, -- [0x0201]
886	rors-cmip-get		[515] GetResultSimple, -- [0x0203]
887	rors-cmip-confirmed-set	[517] SetResultSimple, -- [0x0205]
888	rors-cmip-confirmed-action	[519] ActionResultSimple, -- [0x0207]
889	roer		[768] ErrorResult, -- [0x0300]
890	rorj		[1024] RejectResult -- [0x0400]
891	}
892}
893
894-- The sender should limit the number of messages outstanding simultaneously.
895-- In fact, the receiver might not be able to handle more than one message at a time.
896InvokeIDType ::= INT-U16
897
898-- At any point, if a DataApdu invoked action (roiv-*) results in an error, the receiver sends
899-- back an ErrorResult. The invokeID is used to determine which invocation resulted in an
900-- error condition. The error-value shall be filled in with an error value from the RoerErrorValue list
901-- below. The parameter is filled in with further information if warranted by the error-value. The use of
902-- the parameter value is defined in the comments found in RoerErrorValue.
903ErrorResult ::= SEQUENCE {
904	error-value	RoerErrorValue,
905	parameter	ANY DEFINED BY error-value
906}
907
908-- All unassigned " RoerErrorValue " values are reserved for future expansion and shall not be used.
909-- Note that ISO/IEEE 11073-20101:2004 K defines a number of RoerErrorValue values that are not
910-- defined in this Standard. For consistency, numbering of the RoerErrorValue skips any value already
911-- defined in ISO/IEEE 11073-20101:2004.
912RoerErrorValue ::= INTEGER {
913	-- no-such-object-instance is returned when referencing an illegal handle or when there
914	-- is an attempt to access any object other than the MDS before the configuration
915	-- is agreed, i.e., agent and manager are not in the operating state.
916	no-such-object-instance(1),
917	-- no-such-action is returned when the action command is illegal
918	no-such-action(9),
919	-- invalid-object-instance is returned when object exists but the command
920	-- is illegal for that object type (e.g., Get on any object except MDS or PM-store)
921	invalid-object-instance(17),
922	-- protocol-violation is returned when there has been a protocol violation (e.g., APDU
923	-- exceeds maximum size)
924	protocol-violation(23),
925	-- not-allowed-by-object is returned when an action is attempted on an object
926	-- but the object did not allow the action
927	-- The higher layer may report the reason for aborting the action as an OID-Type
928	-- in the parameter field using a return code taken from the return code partition
929	not-allowed-by-object(24),
930	-- action-timed-out is returned when an action is aborted before completion or when to
931	-- complete the action would exceed the currently defined timeout value.
932	-- The higher layer may report the reason for aborting the action as an OID-Type
933	-- in the parameter field using a return code taken from the return code partition
934	action-timed-out(25),
935	-- action-aborted is returned when an action has been aborted due to reasons in the
936	-- higher layers (e.g., storage capacity exceeded).
937	-- The higher layer may report the reason for aborting the action as an OID-Type
938	-- in the parameter field using a return code taken from the return code partition
939	action-aborted(26)
940} (0..65535)
941
942-- At any point, if a DataApdu invoked action (roiv-*) requires the receiver to reject an
943-- operation prior to attempting to execute it, the receiver shall send
944-- back a RejectResult. The invokeID is used to determine which invocation resulted in a
945-- rejection condition. The problem field shall be filled in with a value from the RorjProblem list
946-- below.
947RejectResult ::= SEQUENCE {
948	problem	RorjProblem
949}
950
951-- All unassigned " RorjProblem " values are reserved for future expansion and shall not be used.
952RorjProblem ::= INTEGER {
953	-- unrecognized-apdu is returned if the DataApdu is unrecognized,
954	unrecognized-apdu(0),
955	-- badly-structured-apdu is returned when the receiver is unable to
956	-- understand the DataApdu due to its structure (or lack thereof)
957	-- (e.g., incorrect data lengths)
958	badly-structured-apdu(2),
959	-- unrecognized-operation is sent when the operation being requested
960	-- is not understood by the receiver
961	unrecognized-operation(101),
962	-- resource-limitation is sent when the receiver cannot handle the
963	-- message due to limited resources.
964	resource-limitation(103),
965	-- unexpected-error covers error conditions where there is not a
966	-- more specific error code defined
967	unexpected-error(303)
968} (0..65535)
969
970/*
971EVENT REPORT service
972*/
973-- For event reports defined in this Standard, obj-handle shall either be 0 to represent the MDS object
974-- or a handle representing a scanner or PM-store object.
975-- If the agent does not support RelativeTime (as indicated by the mds-time-capab-relative-time
976-- bit in MdsTimeCapState), it shall set the event-time to 0xFFFFFFFF. Managers shall
977-- ignore the event-time if the agent reports that it does not support RelativeTime.
978-- For the event-types defined in , , , and , the
979-- corresponding event-info structure shall be used. Accordingly, event-info will be one of
980-- ConfigReport, ScanReportInfoFixed, ScanReportInfoVar, ScanReportInfoMPFixed,
981-- ScanReportInfoMPVar, ScanReportInfoGrouped, ScanReportInfoMPGrouped,
982-- or SegmentDataEvent
983EventReportArgumentSimple ::= SEQUENCE {
984	obj-handle	HANDLE,
985	event-time	RelativeTime,
986	event-type	OID-Type, 	-- From the nom-part-obj partition
987			-- Subpartition NOTI (MDC_NOTI_*)
988	event-info	ANY DEFINED BY event-type
989}
990
991-- For event reports defined in this Standard, obj-handle shall be either 0 to represent the MDS object
992-- or a handle representing a scanner or PM-store object.
993-- The event-type of the result shall be a copy of the event-type from the invocation.
994-- For the event-types defined in , , , and , the corresponding
995-- event-reply-info shall be used. Accordingly event-reply-info will be empty, ConfigReportRsp,
996-- or SegmentDataResult.
997EventReportResultSimple ::= SEQUENCE {
998	obj-handle	HANDLE,
999	currentTime	RelativeTime,
1000	event-type	OID-Type, 	-- From the nom-part-obj partition
1001			-- Subpartition NOTI (MDC_NOTI_*)
1002	event-reply-info	ANY DEFINED BY event-type
1003}
1004
1005/*
1006GET service
1007*/
1008-- For GET requests defined in this Standard, obj-handle shall either be 0 to represent the MDS object
1009-- or a handle representing a PM-store object.
1010-- The attribute-id-list shall be left empty to query for all attributes of the MDS or PM-store object.
1011-- Alternatively, specific attributes of an object may be queried by listing the desired
1012-- Attribute IDs found in  or .
1013GetArgumentSimple ::= SEQUENCE {
1014	obj-handle	HANDLE,
1015	attribute-id-list	AttributeIdList
1016}
1017
1018-- For GET responses defined in this Standard, obj-handle shall match the one in the corresponding request.
1019-- The attribute-list contains all the requested attributes using the variable format.
1020-- If a requested attribute ID does not exist within the MDS object, it shall not
1021-- be returned in the attribute-list.
1022GetResultSimple ::= SEQUENCE {
1023	obj-handle	HANDLE,
1024	attribute-list	AttributeList
1025}
1026
1027TypeVerList ::= SEQUENCE OF TypeVer
1028
1029
1030-- Since the type shall come from ISO/IEEE 11073-10101 K, communication
1031-- nom-part-infrastruct partition, subpartition DEVspec, a simple OID-Type is used rather
1032-- than a TYPE.
1033-- The individual IEEE 11073-104zz specializations define which specification is classified
1034-- as version 1, 2, …, and so on; thus, version 3 may correspond to specification version 1.5.
1035TypeVer ::= SEQUENCE {
1036	type	OID-Type,
1037	version	INT-U16
1038}
1039
1040/*
1041SET service
1042*/
1043-- For SETs defined in this Standard, obj-handle shall be the value of a handle representing a scanner object.
1044SetArgumentSimple ::= SEQUENCE {
1045	obj-handle	HANDLE,
1046	modification-list	ModificationList
1047}
1048
1049ModificationList ::= SEQUENCE OF AttributeModEntry
1050
1051AttributeModEntry ::= SEQUENCE {
1052	modify-operator	ModifyOperator,
1053	attribute	AVA-Type
1054}
1055
1056-- All unassigned " ModifyOperator " values are reserved for future expansion and shall not be used.
1057ModifyOperator ::= INTEGER {
1058	replace(0),
1059	addValues(1),            -- used for modifying the values contained in list-like data types
1060	removeValues(2),      -- used for modifying the values contained in list-like data types
1061	setToDefault(3)
1062} (0..65535)
1063
1064--
1065-- The obj-handle shall be set to the value received in the SetArgumentSimple.
1066-- The attribute-list shall contain each attribute-id that was modified and return
1067-- the new value of the attribute. Normally, this is the value from the Set
1068-- command; however, it is possible that, due to rounding conditions or an
1069-- error condition, the returned value could differ from the requested value.
1070SetResultSimple ::= SEQUENCE {
1071	obj-handle	HANDLE,
1072	attribute-list	AttributeList
1073}
1074
1075/*
1076ACTION service
1077*/
1078-- For action requests defined in this Standard, obj-handle shall either be 0 to represent the MDS object or
1079-- a handle representing a PM-store object.
1080-- For the action-types defined in  and , the corresponding action-info-args
1081-- structures shall be used. Accordingly, action-info-args will be one of DataRequest,
1082-- SetTimeInvoke, SetBOTimeInvoke, SegmSelection, or TrigSegmDataXferReq.
1083ActionArgumentSimple ::= SEQUENCE {
1084	obj-handle	HANDLE,
1085	action-type	OID-Type, 	-- From the nom-part-obj partition
1086			-- Subpartition ACT (MDC_ACT_*)
1087
1088	action-info-args	ANY DEFINED BY action-type
1089}
1090
1091-- For action responses defined in this Standard, obj-handle shall match the one in the
1092-- corresponding request.
1093-- The action-type shall be copied from the invocation message action-type.
1094-- For the action-types defined in  and , the resulting action-info-args
1095-- shall be used. Accordingly, action-info-args will be empty, DataResponse,
1096-- SegmentInfoList, or TrigSegmDataXferRsp.
1097ActionResultSimple ::= SEQUENCE {
1098	obj-handle	HANDLE,
1099	action-type	OID-Type, 	-- From the nom-part-obj partition
1100			-- Subpartition ACT (MDC_ACT_*)
1101	action-info-args	ANY DEFINED BY action-type
1102}
1103
1104/*
1105Data types for new object attributes and object services
1106General data types
1107*/
1108AttrValMap ::= SEQUENCE OF AttrValMapEntry
1109
1110AttrValMapEntry ::= SEQUENCE {
1111	attribute-id	OID-Type,  -- This comes from the nom-part-obj partition
1112	attribute-len	INT-U16
1113}
1114MDS-related data types
1115UuidIdent ::= OCTET STRING(SIZE(16))
1116
1117-- time-sync-accuracy allows an agent to report how closely synchronized its clock is with
1118-- respect to the clock sync master when time synchronization is used.
1119MdsTimeInfo ::= SEQUENCE {
1120	mds-time-cap-state 	MdsTimeCapState,
1121	time-sync-protocol	TimeProtocolId,	-- this is a nomenclature code from
1122				-- nom-part-infrastruct partition
1123	time-sync-accuracy	RelativeTime,	-- 0xFFFFFFFF if unknown
1124				-- 0 if better than 1/8 ms
1125	time-resolution-abs-time	INT-U16,	-- if
1126                                                                                                                   -- mds-time-capab-real-time-clock
1127                                                                                                                   -- is set then this indicates the
1128                                                                                                                   -- resolution of the agent’s
1129				-- absolute time clock.
1130				-- 0 if unknown; otherwise,
1131				-- the number of 1/100 s
1132				-- that elapse with each clock
1133				-- increment. For example, if an
1134				-- agent has a clock that clicks at
1135				-- 1 s intervals, this value
1136				-- would be 100.
1137				-- if mds-time-capab-bo-time
1138				-- is set then this indicates the
1139				-- resolution of the agent’s
1140				-- base time clock.
1141				-- 0 if unknown; otherwise,
1142				-- the number of 1/65536 s
1143				-- that elapse with each clock
1144				-- increment. The value of 0xFFFF
1145				-- is reserved to indicate an interval
1146				-- 1 s.
1147	time-resolution-rel-time	INT-U16,	-- Resolution of the agent’s
1148				-- relative time clock. 0 if
1149				-- unknown; otherwise, the number
1150				-- of 125 μs that elapse
1151				-- with each clock increment. For
1152				-- example, if an agent has a clock
1153				-- that clicks at 1 s intervals,
1154				-- this value would be 8000.
1155	time-resolution-high-res-time	INT-U32	-- Resolution of the agent’s
1156				-- high-resolution time clock.
1157				-- 0 if unknown; otherwise, the
1158				-- number of microseconds
1159				-- that elapse with each clock
1160				-- increment. For example, if an
1161				-- agent has a clock that clicks
1162				-- at 1 s intervals, this value
1163				-- would be 1 000 000.
1164}
1165
1166-- Only one of mds-time-capab-real-time-clock and mds-time-capab-bo-time shall be specified.
1167-- Only one of mds-time-capab-sync-abs-time and mds-time-capab-sync-bo-time shall be specified.
1168-- Only one of mds-time-state-abs-time-synced and mds-time-state-bo-time-synced shall be specified.
1169-- All unassigned " MdsTimeCapState " bit values are reserved for future expansion and shall be set to zero.
1170MdsTimeCapState ::= BITS-16 {
1171	mds-time-capab-real-time-clock(0),		-- device supports an internal RTC
1172                                                                                                                   -- following absolute time
1173	mds-time-capab-set-clock(1),		-- device supports Set-Time Action
1174				-- or Set-Base-OffsetTime Action
1175	mds-time-capab-relative-time(2),		-- device supports RelativeTime
1176	mds-time-capab-high-res-relative-time(3),	-- device supports
1177				-- HighResRelativeTime
1178	mds-time-capab-sync-abs-time(4),		-- device syncs AbsoluteTime
1179	mds-time-capab-sync-rel-time(5),		-- device syncs RelativeTime
1180	mds-time-capab-sync-hi-res-relative-time(6),	-- device syncs HiResRelativeTime
1181	mds-time-capab-bo-time(7),		-- device supports BaseOffsetTime
1182	mds-time-state-abs-time-synced(8),		-- AbsoluteTime is synced
1183	mds-time-state-rel-time-synced(9),		-- RelativeTime is synced
1184	mds-time-state-hi-res-relative-time-synced(10),	-- HiResRelativeTime is synced
1185	mds-time-mgr-set-time(11),		-- manager shall set the time
1186	mds-time-capab-sync-bo-time(12),		-- device syncs BaseOffsetTime
1187	mds-time-state-bo-time-synced(13),		-- Base time is synced
1188	mds-time-state-bo-time-UTC-aligned(14)	-- Base time is aligned to UTC
1189}
1190
1191-- ************
1192-- A list of various regulatory and certification compliance items to which the agent claims adherence.
1193-- ************
1194RegCertDataList ::= SEQUENCE OF RegCertData
1195
1196RegCertData ::= SEQUENCE {
1197	auth-body-and-struc-type	AuthBodyAndStrucType,
1198	auth-body-data		ANY DEFINED BY auth-body-and-struc-type
1199}
1200
1201AuthBodyAndStrucType ::= SEQUENCE {
1202	auth-body		AuthBody,
1203	auth-body-struc-type	AuthBodyStrucType
1204}
1205
1206-- All unassigned " AuthBody " values are reserved for future expansion and shall not be used.
1207AuthBody ::= INTEGER {
1208	auth-body-empty(0),
1209	auth-body-ieee-11073(1),
1210	auth-body-continua(2),
1211	auth-body-experimental(254),
1212	auth-body-reserved(255)
1213} (0..255)
1214--
1215-- Some other possible/expected authoritative bodies
1216-- auth-body-eu(),
1217-- auth-body-ieee(),
1218-- auth-body-iso(),
1219-- auth-body-us-fda(),
1220-- specific values will be assigned when a given authoritative body
1221--      assigns its first AuthBodyStrucType for a specific
1222--      auth-body-data.
1223
1224
1225-- AuthBodyStrucType is controlled and assigned by the authoritative body
1226AuthBodyStrucType ::= INT-U8
1227
1228
1229/*
1230Metric-related data types
1231*/
1232--
1233-- SupplementalTypeList provides an extensible mechanism to list additional information about an object.
1234-- This can hold information such as the location of the sensor or the responsiveness of the object.
1235--
1236SupplementalTypeList ::= SEQUENCE OF TYPE
1237
1238--
1239-- The Metric Spec Small attribute is an abbreviated MetricSpec attribute as defined in ISO/IEEE
1240-- 11073-10201:2004 K. It defines availability, periodicity, and category of the measurement.
1241-- The setting of bits 0 to 5 is primarily informational and shall be set if the condition is true but
1242-- a manager cannot assume that if they are set the behavior will be observed.
1243-- All unassigned " MetricSpecSmall " bit values are reserved for future expansion and shall be set to zero.
1244--
1245MetricSpecSmall ::= BITS-16 {
1246	mss-avail-intermittent(0),	-- value is available only intermittently
1247	mss-avail-stored-data(1),	-- Agent may store and send multiple historical
1248			-- values (e.g., a weighing scale stores up
1249			-- to 25 values)
1250	mss-upd-aperiodic(2),	-- value is sent only aperiodically
1251			-- (e.g., when changed)
1252	mss-msmt-aperiodic(3),	-- the measurement is aperiodic
1253	mss-msmt-phys-ev-id(4),	-- the measurement is a physiological trigger only
1254			-- (e.g., to mark the detection of a heart beat)
1255	mss-msmt-btb-metric(5),	-- the measurement is beat-to-beat or breath-to-breath
1256	mss-acc-manager-initiated (8),	-- the object value can be accessed by manager-
1257			-- initiated measurement data transmission
1258	mss-acc-agent-initiated(9),	-- the object value is updated using agent-initiated
1259			-- measurement data transmission
1260	-- NOTES regarding the usage of the following mss-cat-* bits
1261	-- For automatically acquired measurements, neither the mss-cat-setting nor the
1262	-- mss-cat-calculation bits are set. The metric represents a normal, regular measured
1263	-- value. This implies that, for automatically acquired measurements provided by an
1264	-- agent, none of the mss-cat-* bits are set (default).
1265	mss-cat-manual(12),	-- if this bit is set, the metric is acquired manually
1266			-- (e.g., a person manually entered the value).
1267			-- If this bit is not set, the metric is acquired
1268			-- automatically (e.g., the device measures the value)
1269	mss-cat-setting(13),	-- If this bit is set, the metric represents a device
1270			-- setting. This may be a manually or automatically
1271			-- set value, as reported by the mss-cat-manual bit.
1272	mss-cat-calculation(14)	-- If this bit is set, the metric represents a calculated
1273			-- value. This may be a manually or automatically
1274			-- calculated value, as reported by the
1275			-- mss-cat-manual bit. Calculated values are
1276			-- derived from automatically acquired measurements
1277			-- and/or manually entered values.
1278}
1279
1280-- This attribute is partly inherited from ISO/IEEE 11073-10201:2004 K, but enhanced by
1281-- value ms-struct::ms-struct-compound-fix. For this release of the standard, ms-struct-compound
1282-- and ms-struct-compound-fix shall only be used for Numeric objects. Additional structures would
1283-- need to be introduced in RT-SA and Enumeration objects to allow the use of compound structures.
1284-- If compound is used, the agent shall send no more than ms-comp-no observed values.
1285--
1286MetricStructureSmall ::= SEQUENCE {
1287ms-struct INTEGER {
1288ms-struct-simple(0),
1289ms-struct-compound(1),	-- multiple observed values,
1290-- same dynamic context
1291ms-struct-reserved(2), 	-- for ISO/IEEE 11073-10201:2004
1292ms-struct-compound-fix(3)	-- similar to compound(1) but the
1293-- compound observed value array
1294-- size shall not be dynamic
1295-- during an association
1296} (0..255),
1297ms-comp-no INT-U8	-- maximum number of components/elements in
1298-- compound observed value, 0 if ms-struct is set to
1299-- ms-struct-simple
1300}
1301
1302-- This attribute defines a list of MetricIds.
1303--
1304MetricIdList ::= SEQUENCE OF OID-Type
1305
1306--
1307-- The EnumPrintableString is the data type to report Enumeration Observed Values in the form of
1308-- ASCII printable strings.
1309--
1310EnumPrintableString ::= OCTET STRING	-- string size shall be even
1311
1312PersonId ::= INTEGER {
1313	unknown-person-id(65535)	-- 0xFFFF
1314}  (0..65535)
1315
1316/*
1317Scanner-related data types
1318*/
1319HandleAttrValMap ::= SEQUENCE OF HandleAttrValMapEntry
1320
1321HandleAttrValMapEntry ::= SEQUENCE {
1322	obj-handle	HANDLE,
1323	attr-val-map	AttrValMap
1324}
1325
1326HANDLEList ::= SEQUENCE OF HANDLE
1327
1328/*
1329MDS services
1330*/
1331-- The following definitions support the above definitions of EventReportArgumentSimple
1332-- and ActionArgumentSimple.
1333--
1334-- The Scan Report Info types are utilized as the result data types for the various
1335-- MDS-Dynamic-Data-Update* family of events (see  for more detail).
1336--
1337
1338-- The ScanReport* definitions are used when reporting information about object attribute value
1339-- changes (Attribute Change Sets). There are two vectors: A) single person or multiple person and B) variable format,
1340-- fixed format, or grouped format. Combinations of these vectors lead to the six top-level definitions:
1341-- ScanReportInfoVar, ScanReportInfoFixed, ScanReportInfoGrouped,
1342-- ScanReportInfoMPVar, ScanReportInfoMPFixed, and ScanReportInfoMPGrouped.
1343-- The SEQUENCE OF ObservationScan or ObservationScanFixed may contain multiple instances
1344-- of the same handle as long as there is a time stamp to distinguish between the instances.
1345-- In all cases, scan-report-no shall be initialized to zero at association time and monotonically
1346-- increasing by one until roll-over occurs.
1347------------------------------------------------------------------------------------------------------------------------
1348ScanReportInfoVar ::= SEQUENCE {
1349	data-req-id	DataReqId,
1350	scan-report-no	INT-U16,	-- counter for detection of missing scan reports
1351	obs-scan-var	SEQUENCE OF ObservationScan
1352}
1353
1354------------------------------------------------------------------------------------------------------------------------
1355ScanReportInfoFixed ::= SEQUENCE {
1356	data-req-id	DataReqId,
1357	scan-report-no	INT-U16,	-- counter for detection of missing scan reports
1358	obs-scan-fixed	SEQUENCE OF ObservationScanFixed
1359}
1360
1361ObservationScanFixed ::= SEQUENCE {
1362	obj-handle	HANDLE,	-- unique identification of the object
1363	obs-val-data	OCTET STRING	-- observed value data defined by obj-handle
1364}
1365------------------------------------------------------------------------------------------------------------------------
1366-- obs-scan-grouped is a SEQUENCE OF so episodic measurements can combine more than
1367-- one report into a single scan report. Periodic reports should not need to place more than one
1368-- report in a single ScanReport.
1369ScanReportInfoGrouped ::= SEQUENCE {
1370	data-req-id	DataReqId,
1371	scan-report-no	INT-U16,	-- counter for detection of missing scan reports
1372	obs-scan-grouped SEQUENCE OF ObservationScanGrouped
1373}
1374
1375ObservationScanGrouped ::= OCTET STRING	-- The format is defined by HandleAttrValMap
1376
1377------------------------------------------------------------------------------------------------------------------------
1378ScanReportInfoMPVar ::= SEQUENCE {
1379	data-req-id	DataReqId,
1380	scan-report-no	INT-U16,	-- counter for detection of missing scan reports
1381	scan-per-var	SEQUENCE OF ScanReportPerVar
1382}
1383
1384DataReqId ::= INTEGER {
1385	data-req-id-manager-initiated-min(0),	-- 0x0000
1386	data-req-id-manager-initiated-max(61439),	-- 0xEFFF
1387	-- Values between data-req-id-manager-initiated-min and
1388	-- data-req-id-manager-initiated-max, inclusive, shall be used in
1389	-- manager-initiated measurement data transmission.
1390	--
1391	data-req-id-agent-initiated(61440) 		-- 0xF000
1392	-- data-req-id-agent-initiated shall be used in agent-initiated measurement
1393	-- data transmission.
1394	--
1395	-- Values between 0xF001 and 0xFFFF, inclusive, are reserved.
1396} (0..65535)
1397
1398--
1399-- The value used for person-id is vendor determined (e.g., if an agent has two buttons
1400-- to distinguish between two people, the agent may use ID 1 and 2 or ID 35 and 97).
1401-- The process of mapping this ID to a specific person is outside the scope of this
1402-- Standard.
1403--
1404ScanReportPerVar ::= SEQUENCE {
1405	person-id	PersonId,
1406	obs-scan-var	SEQUENCE OF ObservationScan
1407}
1408
1409------------------------------------------------------------------------------------------------------------------------
1410ScanReportInfoMPFixed ::= SEQUENCE {
1411	data-req-id	DataReqId,
1412	scan-report-no	INT-U16,	-- counter for detection of missing scan reports
1413	scan-per-fixed	SEQUENCE OF ScanReportPerFixed
1414}
1415
1416ScanReportPerFixed ::= SEQUENCE {
1417	person-id	PersonId,
1418	obs-scan-fixed	SEQUENCE OF ObservationScanFixed
1419}
1420
1421------------------------------------------------------------------------------------------------------------------------
1422ScanReportInfoMPGrouped ::= SEQUENCE {
1423	data-req-id	DataReqId,
1424	scan-report-no	INT-U16,	-- counter for detection of missing scan reports
1425	scan-per-grouped	SEQUENCE OF ScanReportPerGrouped
1426
1427}
1428
1429ScanReportPerGrouped ::= SEQUENCE {
1430	person-id	PersonId,
1431	obs-scan-grouped ObservationScanGrouped
1432}
1433
1434------------------------------------------------------------------------------------------------------------------------
1435-- The ConfigReport definition is used when reporting an agent’s configuration to a manager (see
1436-- )
1437ConfigReport ::= SEQUENCE {
1438	config-report-id	ConfigId,
1439	config-obj-list	ConfigObjectList
1440}
1441
1442ConfigObjectList ::= SEQUENCE OF ConfigObject
1443
1444ConfigObject ::= SEQUENCE {
1445	obj-class	OID-Type, 	-- From the nom-part-obj partition
1446			-- Subpartition MOC/BASE (MDC_MOC_VMD_*)
1447	obj-handle 	HANDLE,
1448	attributes 	AttributeList
1449}
1450
1451ConfigReportRsp ::= SEQUENCE {
1452	config-report-id	ConfigId,
1453	config-result	ConfigResult
1454}
1455
1456-- All unassigned " ConfigResult " values are reserved for future expansion and shall not be used.
1457ConfigResult ::= INTEGER {
1458	accepted-config(0),
1459	unsupported-config(1),
1460	standard-config-unknown(2)
1461} (0..65535)
1462
1463DataRequest ::= SEQUENCE {
1464	data-req-id		DataReqId,	-- Allows differentiation of
1465				-- responses for multiple data
1466				-- requests (if the
1467				-- device allows for multiple
1468				-- simultaneous data requests).
1469				-- Mirrored back in
1470				-- ScanReportInfo* data-req-id
1471	data-req-mode		DataReqMode,	-- Defines the mode by setting one
1472				-- or more bits.
1473	data-req-time		RelativeTime,	-- Tells how long the agent is
1474				-- allowed to transmit data.
1475				-- This is used only for
1476				-- data-req-mode-time-period.
1477	data-req-person-id	INT-U16,	-- 0xFFFF all persons available
1478	data-req-class		OID-Type, 	-- From the nom-part-obj partition
1479				-- Subpartition MOC/BASE
1480				-- (MDC_MOC_VMD_*)
1481	data-req-obj-handle-list	HANDLEList
1482}
1483
1484-- All unassigned " DataReqMode " bit values are reserved for future expansion and shall be set to zero.
1485DataReqMode ::= BITS-16 {
1486	data-req-start-stop(0),	-- start data request: 1 | stop data request: 0
1487	data-req-continuation(1),	-- continuation of a timed data request.
1488			-- Set to 1 to extend the time allocated to a data
1489			-- transfer. If this is set to 1, all other bits shall
1490			-- be ignored, and the settings from the initial
1491			-- start command shall be used.
1492	-- exactly one of the following data-req-scope-* bits shall be set
1493	data-req-scope-all(4),
1494	data-req-scope-class(5),
1495	data-req-scope-handle(6),
1496	-- exactly one of the following data-req-mode-* bits shall be set
1497	data-req-mode-single-rsp(8),	-- response is directly embedded in DataResponse
1498	data-req-mode-time-period(9),	-- time limited data request with
1499			-- responses as event reports. The time period
1500			-- is specified in data-req-time in DataRequest.
1501	data-req-mode-time-no-limit(10),	-- time unlimited data request with
1502			-- responses as event reports
1503	data-req-person-id(12)
1504}
1505
1506DataReqModeCapab ::= SEQUENCE {
1507	data-req-mode-flags	DataReqModeFlags,
1508	data-req-init-agent-count INT-U8,	-- maximum number of parallel agent initiated
1509			-- data requests/ flows. Shall currently be
1510			-- set only to 0 or 1.
1511	data-req-init-manager-count INT-U8 -- maximum number of parallel manager
1512			-- initiated data requests
1513}
1514
1515-- All unassigned " DataReqModeFlags " bit values are reserved for future expansion and
1516-- shall be set to zero.
1517DataReqModeFlags ::= BITS-16 {		-- this field is used in the association to flag
1518			-- data request capabilities
1519	data-req-supp-stop(0),	-- supports stopping a running data request
1520	data-req-supp-scope-all(4),	-- supports requesting all objects
1521	data-req-supp-scope-class(5),	-- supports requesting objects based on object class
1522	data-req-supp-scope-handle(6),	-- supports requesting objects based on object handle
1523	data-req-supp-mode-single-rsp(8),	-- supports single response
1524	data-req-supp-mode-time-period(9), -- supports time limited data request
1525	data-req-supp-mode-time-no-limit(10), -- supports time unlimited data request
1526	data-req-supp-person-id(11),
1527data-req-supp-init-agent(15)	-- agent uses agent-initiated data requests/flows
1528}
1529
1530-- DataResponse is returned as a result of an MDS-Data-Request (see ). However, the event-type
1531-- and event-info fields are filled in using the same parameters as found in MDS object events. See
1532-- for the legal event-type values and the corresponding event-info
1533-- structure; however, for this usage, ConfigReport shall not be used. Thus, event-info is
1534-- one of ScanReportInfoFixed, ScanReportInfoVar, ScanReportInfoMPFixed, or ScanReportInfoMPVar.
1535DataResponse ::= SEQUENCE {
1536	rel-time-stamp	RelativeTime,	-- set to 0xFFFFFFFF if RelativeTime not supported
1537	data-req-result	DataReqResult,
1538	event-type	OID-Type,	-- event-type and event-info are only
1539			-- in case of data-req-mode-single-rsp,
1540			-- otherwise event-type shall be 0 and
1541			-- event-info.length = 0
1542			-- From the nom-part-obj partition
1543			-- Subpartition NOTI (MDC_NOTI_*)
1544	event-info	ANY DEFINED BY event-type
1545}
1546
1547-- The values in DataReqResult are used in a DataResponse data-req-result field. This is returned
1548-- in response to a DataRequest. The agent shall return data-req-result-no-error if the request
1549-- was successful. Otherwise, one of the defined errors shall be returned.
1550-- All unassigned " DataReqResult " values are reserved for future expansion and shall not be used.
1551DataReqResult ::= INTEGER {
1552	data-req-result-no-error(0),
1553	data-req-result-unspecific-error(1),
1554	-- The following error codes are returned when the manager request contains
1555	-- a DataReqMode that is not supported by the agent.
1556	data-req-result-no-stop-support(2),
1557	data-req-result-no-scope-all-support(3),
1558	data-req-result-no-scope-class-support(4),
1559	data-req-result-no-scope-handle-support(5),
1560	data-req-result-no-mode-single-rsp-support(6),
1561	data-req-result-no-mode-time-period-support(7),
1562	data-req-result-no-mode-time-no-limit-support(8),
1563	data-req-result-no-person-id-support(9),
1564	-- The following error codes are returned when the manager request contains
1565	-- unknown values in the supporting fields (e.g., data-req-person-id).
1566	data-req-result-unknown-person-id(11),
1567	data-req-result-unknown-class(12),
1568	data-req-result-unknown-handle(13),
1569	-- The following note a condition where the manager set more than one of the
1570	-- scope or mode bits.
1571	data-req-result-unsupp-scope(14),	-- unsupported scope bits set
1572	data-req-result-unsupp-mode(15),	-- unsupported mode bits set
1573
1574data-req-result-init-manager-overflow(16),	-- manager has tried to establish more than
1575	-- data-req-init-manager-count flows
1576data-req-result-continuation-not-supported(17), -- manager has attempted to continue
1577	-- a data transfer that is not running in
1578	-- timed mode
1579data-req-result-invalid-req-id(18)	-- manager has attempted to continue
1580	-- a data transfer on a nonexistent
1581	-- data-req-id.
1582} (0..65535)
1583
1584/*
1585Scanner services
1586See A.11.5 for MDS services type definitions that are reused for the scanner services, namely
1587ScanReportInfoVar
1588ScanReportInfoFixed
1589ScanReportInfoGrouped
1590ScanReportInfoMPVar
1591ScanReportInfoMPFixed
1592ScanReportInfoMPGrouped
1593Numeric related data types
1594*/
1595-- A simple numeric observed value is represented just by the floating point value.
1596--
1597SimpleNuObsValue ::= FLOAT-Type
1598
1599-- A list type of SimpleNuObsValue
1600--
1601SimpleNuObsValueCmp ::= SEQUENCE OF SimpleNuObsValue
1602
1603-- In many cases, the basic numeric observed value can be expressed with a smaller floating point value.
1604--
1605BasicNuObsValue ::= SFLOAT-Type
1606
1607-- A list type of BasicNuObsValue
1608--
1609BasicNuObsValueCmp ::= SEQUENCE OF BasicNuObsValue
1610
1611/*
1612PM-store and PM-segment related data types
1613*/
1614--
1615-- The PM-Store-Capab attribute defines specific static capabilities and properties of the PM-store object
1616-- instance. The default value of this attribute is 0 (no bits set).
1617-- All unassigned " PmStoreCapab " bit values are reserved for future expansion and shall be set to zero.
1618--
1619PmStoreCapab ::=BITS-16 {
1620	pmsc-var-no-of-segm(0),	-- indicates that the number of PM-segments
1621			-- contained in this PM-store is dynamic and may
1622			-- change
1623	pmsc-segm-id-list-select(3), 	-- PM-segments in the SegmSelection data type can
1624-- be selected by defining a list of segment
1625-- identifiers
1626	pmsc-epi-seg-entries(4),	-- Some/ all PM-segments contain
1627			-- episodic/aperiodic entries and therefore have
1628			-- to contain explicit time stamp information
1629	pmsc-peri-seg-entries(5),	-- Some/all PM-segments contain periodically
1630			-- sampled entries and therefore the PM-segment
1631			-- or PM-store shall support the
1632			-- Sample-Period attribute
1633	pmsc-abs-time-select(6),	-- PM-segments in the SegmSelection data type can
1634 			-- be selected by defining an abs-time-range range or
1635			-- bo-time-range depending upon which time
1636			-- mode the device supports
1637	pmsc-clear-segm-by-list-sup(7),	-- clearing a list of segments is supported
1638	pmsc-clear-segm-by-time-sup(8),	-- clearing segments by abs time range or
1639			-- bo time range is supported depending
1640			-- upon which time mode the device supports
1641	pmsc-clear-segm-remove(9), 	-- if this bit is set, the agent will completely remove
1642			-- the specified PM-segment instance as part of the
1643			-- Clear-Segment method. If this bit is not set, it will
1644			-- just remove all entries from the specified
1645			-- PM-segment.
1646	pmsc-clear-segm-all-sup(10),	-- clearing all segments is supported
1647	pmsc-multi-person(12)	-- The PM-store supports PM-segment for more
1648			-- than one person
1649}
1650
1651--
1652-- All entries in the segment shall follow the format defined by this attribute. First, the optional header
1653-- shall follow the description in segm-entry-header. This allows each entry in the segment to be preceded
1654-- by an optional header (e.g., for time stamp information) that is applicable to all elements in an entry.
1655-- Next, the elements shall follow the format and order described in segm-entry-elem-list.
1656-- An element typically represents a measurement. For each element, the stored data is defined in the form
1657-- of an attribute value map, in the same way as metric objects.
1658--
1659PmSegmentEntryMap ::= SEQUENCE {
1660	segm-entry-header	SegmEntryHeader,	-- defines optional elements in front
1661				-- of each entry
1662	segm-entry-elem-list	SegmEntryElemList
1663}
1664
1665--
1666-- The following bit string defines optional data items that are in front of each segment entry.
1667-- Multiple data items are definable. In this case, the data item with the lower bit number shall come
1668-- in front of items with higher bit numbers. The header allows definition of data items that are common
1669-- to all elements in the entry. If all bits are zero, the segment entry event report shall begin with data
1670-- from the first element.
1671-- All unassigned " SegmEntryHeader " bit values are reserved for future expansion and shall be set to zero.
1672-- If any bits are set to one beyond the expected bits (e.g., a new bit was added in a later version),
1673-- the data shall not be retrieved since the offset to the first data element cannot be calculated.
1674--
1675SegmEntryHeader ::= BITS-16 {
1676	seg-elem-hdr-absolute-time(0),	-- entry preceded by absolute time
1677			-- (data type AbsoluteTime)
1678	seg-elem-hdr-relative-time(1), 	-- entry preceded by relative time
1679			-- (data type RelativeTime)
1680	seg-elem-hdr-hires-relative-time(2), -- entry preceded by high resolution relative time
1681			-- (data type HighResRelativeTime)
1682	seg-elem-hdr-bo-time(3)	-- entry preceded by base offset time
1683			-- (data type BaseOffsetTime)
1684			 -- option (0) and option (3) are mutually exclusive
1685}
1686
1687SegmEntryElemList ::= SEQUENCE OF SegmEntryElem
1688
1689--
1690-- SegmEntryElem shall reference a metric object instance in the agent configuration
1691-- using its handle value. This referenced object shall exist in the agent
1692-- configuration, and the metric-type and class-id shall be equal to the corresponding attributes of the
1693-- referenced metric object.
1694--
1695SegmEntryElem ::= SEQUENCE {
1696	class-id	OID-Type,	-- contains nomenclature code from OO nom-part-obj
1697			-- partition defining the object class (e.g., numeric)
1698	metric-type	TYPE,	--specific static TYPE of the stored element
1699	handle	HANDLE,	-- handle of referenced object
1700	attr-val-map	AttrValMap	-- attribute value map describing the stored data
1701}
1702
1703--
1704-- Request to start the transfer of the specified segment
1705--
1706TrigSegmDataXferReq ::= SEQUENCE {
1707	seg-inst-no	InstNumber
1708}
1709
1710TrigSegmDataXferRsp ::= SEQUENCE {
1711 	seg-inst-no	InstNumber,
1712	trig-segm-xfer-rsp	TrigSegmXferRsp
1713}
1714
1715-- All unassigned " TrigSegmXferRsp " values are reserved for future expansion and shall not be used.
1716TrigSegmXferRsp ::= INTEGER {
1717	tsxr-successful(0),	-- Agent will start transfer of segment
1718	tsxr-fail-no-such-segment(1), 	-- segment ID not found
1719	tsxr-fail-clear-in-process(2),	-- the storage media is currently being cleared. No
1720-- access is currently possible.
1721	tsxr-fail-segm-empty(3),	-- the segment being requested is empty
1722	tsxr-fail-not-otherwise-specified(512)
1723} (0..65535)
1724
1725
1726--
1727-- the SegmentDataEvent
1728--
1729-- Notes:
1730--     - the agent shall transfer all segment entries in order, first entry first (first in first out).
1731--
1732
1733SegmentDataEvent ::= SEQUENCE {
1734	segm-data-event-descr	SegmDataEventDescr,
1735	segm-data-event-entries	OCTET STRING	-- contains the specified segment
1736			-- entries in an opaque data structure.
1737			-- Only complete entries shall be
1738			-- included in this field.
1739}
1740
1741SegmentDataResult ::= SEQUENCE {
1742	segm-data-event-descr	SegmDataEventDescr
1743}
1744
1745--
1746-- The Segment Data Event Descriptor defines which entries of the Segment Data are communicated in the
1747-- Event message.
1748--
1749SegmDataEventDescr ::= SEQUENCE {
1750	segm-instance	InstNumber,	-- instance number of segment being transferred
1751	segm-evt-entry-index	INT-U32,	-- array index of the first entry in this event
1752	segm-evt-entry-count	INT-U32,	-- count of entries in this event
1753	segm-evt-status	SegmEvtStatus
1754}
1755
1756-- All unassigned " SegmEvtStatus " bit values are reserved for future expansion and shall be set to zero.
1757SegmEvtStatus ::= BITS-16 {
1758	sevtsta-first-entry(0),	-- this event contains the first segment entry
1759	sevtsta-last-entry(1),	-- this event contains the last segment entry (both first
1760			-- and last bits can be set if all entries fit in one event)
1761	sevtsta-agent-abort(4),	-- transfer aborted by agent (manager shall reply
1762			-- with the same status)
1763	sevtsta-manager-confirm(8),	-- set in reply if segment was received correctly (if
1764			-- not set in reply, agent shall stop the segment
1765			-- transfer and respond with an error (roer) code
1766			-- of protocol-violation).
1767	sevtsta-manager-abort(12)	-- sent in reply by manager (agent shall stop sending
1768			-- messages)
1769}
1770
1771SegmentStatistics ::= SEQUENCE OF SegmentStatisticEntry
1772
1773SegmentStatisticEntry ::= SEQUENCE {
1774	segm-stat-type	SegmStatType,
1775	segm-stat-entry	OCTET STRING	-- this attribute contains one segment entry in the
1776			-- format defined by the PmSegmentEntryMap
1777}
1778
1779-- All unassigned " SegmStatType " values are reserved for future expansion and shall not be used.
1780-- Values from 0xF000 to 0xFFFF are reserved for manufacturer-specific extensions.
1781SegmStatType ::= INTEGER {
1782	segm-stat-type-undefined (0),
1783	segm-stat-type-minimum(1),
1784	segm-stat-type-maximum(2),
1785	segm-stat-type-average(3)
1786}  (0..65535)
1787
1788
1789END
1790