View Javadoc

1   /*
2       Copyright 2007-2014 TSB, http://www.tsbtecnologias.es
3       Technologies for Health and Well-being - Valencia, Spain
4   
5       See the NOTICE file distributed with this work for additional
6       information regarding copyright ownership
7   
8       Licensed under the Apache License, Version 2.0 (the "License");
9       you may not use this file except in compliance with the License.
10      You may obtain a copy of the License at
11  
12        http://www.apache.org/licenses/LICENSE-2.0
13  
14      Unless required by applicable law or agreed to in writing, software
15      distributed under the License is distributed on an "AS IS" BASIS,
16      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17      See the License for the specific language governing permissions and
18      limitations under the License.
19   */
20  package org.universAAL.lddi.lib.ieeex73std.testchannel20601;
21  
22  public class ExtendedCfg10404 {
23  	
24  	byte[] apdu;
25  	
26  	public ExtendedCfg10404(){
27  		
28  		apdu = new byte[]{
29  				(byte)0xE7, (byte)0x00, 						//APDU CHOICE Type (PrstApdu)
30  				(byte)0x00, (byte)0xA8, 						//CHOICE.length = 168
31  				(byte)0x00, (byte)0xA6, 						// OCTET STRING.length = 166
32  				(byte)0x99, (byte)0x99, 						// invoke-id = 0x1235 (start of DataApdu. MDER encoded.)
33  				(byte)0x01, (byte)0x01,  						// CHOICE(Remote Operation Invoke | Confirmed Event Report)
34  				(byte)0x00, (byte)0xA0,							// CHOICE.length = 160
35  				(byte)0x00, (byte)0x00, 						// obj-handle = 0 (MDS object)
36  				(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, // event-time = 0xFFFFFFFF
37  				
38  				(byte)0x0D, (byte)0x1C, 						// event-type = MDC_NOTI_CONFIG
39  				(byte)0x00, (byte)0x96,  						// event-info.length = 150 (start of ConfigReport)
40  				(byte)0x40, (byte)0x00, 						// config-report-id
41  				(byte)0x00, (byte)0x03, 						// config-obj-list.count = 3 Measurement objects will be announced
42  				(byte)0x00, (byte)0x90,							// config-obj-list.length = 144
43  		//144
44  			//44
45  				//8
46  				(byte)0x00, (byte)0x06, 						//obj-class = MDC_MOC_VMO_METRIC_NU
47  				(byte)0x00, (byte)0x01,							//obj-handle = 1 (1st Measurement is SpO2)
48  				(byte)0x00, (byte)0x04, 						// attributes.count = 4
49  				(byte)0x00, (byte)0x24,							// attributes.length = 36
50  			
51  				//8
52  				(byte)0x09, (byte)0x2F,							//attribute-id = MDC_ATTR_ID_TYPE
53  				(byte)0x00, (byte)0x04, 						// attribute-value.length = 4
54  				(byte)0x00, (byte)0x02,	(byte)0x4B, (byte)0xB8, //MDC_PART_SCADA | MDC_PULS_OXIM_SAT_O2
55  				
56  				//6
57  				(byte)0x0A, (byte)0x46, 						// attribute-id = MDC_ATTR_METRIC_SPEC_SMALL
58  				(byte)0x00, (byte)0x02,							// attribute-value.length = 2
59  				(byte)0x40, (byte)0xC0,							//avail-stored-data, acc-manager-init, acc-agent-init, measured
60  				
61  				//6
62  				(byte)0x09, (byte)0x96, 						// attribute-id = MDC_ATTR_UNIT_CODE
63  				(byte)0x00, (byte)0x02,							// attribute-value.length = 2
64  				(byte)0x02, (byte)0x20,							//MDC_DIM_PERCENT
65  				
66  				//16
67  				(byte)0x0A, (byte)0x55, 						// attribute-id = MDC_ATTR_ATTRIBUTE_VAL_MAP
68  				(byte)0x00, (byte)0x0C,							// attribute-value.length = 12
69  				(byte)0x00, (byte)0x02,							//AttrValMap.count = 2
70  				(byte)0x00, (byte)0x08, 						// AttrValMap.length = 8
71  				(byte)0x0A, (byte)0x4C,	(byte)0x00, (byte)0x02,	// MDC_ATTR_NU_VAL_OBS_BASIC | value length = 2
72  				(byte)0x09, (byte)0x90,	(byte)0x00, (byte)0x08,	// MDC_ATTR_TIME_STAMP_ABS | value length = 8
73  		//100
74  			//44
75  				//8
76  				(byte)0x00, (byte)0x06,							//obj-class = MDC_MOC_VMO_METRIC_NU
77  				(byte)0x00, (byte)0x0A,							//obj-handle = 10 (2nd Measurement is pulse rate)
78  				(byte)0x00, (byte)0x04, 						// attributes.count = 4
79  				(byte)0x00, (byte)0x24,							// attributes.length = 36
80  				
81  				//8
82  				(byte)0x09, (byte)0x2F,							//attribute-id = MDC_ATTR_ID_TYPE
83  				(byte)0x00, (byte)0x04, 						// attribute-value.length = 4
84  				(byte)0x00, (byte)0x02,	(byte)0x48, (byte)0x1A, //MDC_PART_SCADA | MDC_PULS_OXIM_PULS_RATE
85  				
86  				//6
87  				(byte)0x0A, (byte)0x46, 						// attribute-id = MDC_ATTR_METRIC_SPEC_SMALL
88  				(byte)0x00, (byte)0x02,							// attribute-value.length = 2
89  				(byte)0x40, (byte)0xC0,							//avail-stored-data, acc-manager-init, acc-agent-init, measured
90  				
91  				//6
92  				(byte)0x09, (byte)0x96, 						// attribute-id = MDC_ATTR_UNIT_CODE
93  				(byte)0x00, (byte)0x02,							// attribute-value.length = 2
94  				(byte)0x0A, (byte)0xA0,							//MDC_DIM_BEAT_PER_MIN
95  				
96  				//16
97  				(byte)0x0A, (byte)0x55, 						// attribute-id = MDC_ATTR_ATTRIBUTE_VAL_MAP
98  				(byte)0x00, (byte)0x0C,							// attribute-value.length = 12
99  				(byte)0x00, (byte)0x02,							//AttrValMap.count = 2
100 				(byte)0x00, (byte)0x08, 						// AttrValMap.length = 8
101 				(byte)0x0A, (byte)0x4C,	(byte)0x00, (byte)0x02,	// MDC_ATTR_NU_VAL_OBS_BASIC | value length = 2
102 				(byte)0x09, (byte)0x90,	(byte)0x00, (byte)0x08,	// MDC_ATTR_TIME_STAMP_ABS | value length = 8
103 				
104 			//56
105 				(byte)0x00, (byte)0x06,							//obj-class = MDC_MOC_VMO_METRIC_NU
106 				
107 				//6
108 				(byte)0x00, (byte)0x03,							//obj-handle = 3 (3rd Measurement is SpO2  fast response)
109 				(byte)0x00, (byte)0x05, 						// attributes.count = 5
110 				(byte)0x00, (byte)0x30,							// attributes.length = 48
111 				
112 				//8
113 				(byte)0x09, (byte)0x2F,							//attribute-id = MDC_ATTR_ID_TYPE
114 				(byte)0x00, (byte)0x04, 						// attribute-value.length = 4
115 				(byte)0x00, (byte)0x02,	(byte)0x4B, (byte)0xB8, //MDC_PART_SCADA | MDC_PULS_OXIM_SAT_O2
116 				
117 				//6
118 				(byte)0x0A, (byte)0x46, 						// attribute-id = MDC_ATTR_METRIC_SPEC_SMALL
119 				(byte)0x00, (byte)0x02,							// attribute-value.length = 2
120 				(byte)0x40, (byte)0xC0,							//avail-stored-data, acc-manager-init, acc-agent-init, measured
121 
122 				//6
123 				(byte)0x09, (byte)0x96, 						// attribute-id = MDC_ATTR_UNIT_CODE
124 				(byte)0x00, (byte)0x02,							// attribute-value.length = 2
125 				(byte)0x02, (byte)0x20,							//MDC_DIM_PERCENT
126 				
127 				//12
128 				(byte)0x0A, (byte)0x61, 						// attribute-id = MDC_ATTR_SUPPLEMENTAL_TYPES
129 				(byte)0x00, (byte)0x08, 						// attribute-value.length = 8
130 				(byte)0x00, (byte)0x01, 						// SupplementalTypeList.count = 1
131 				(byte)0x00, (byte)0x04, 						// SupplementalTypeList.length = 4
132 				(byte)0x00, (byte)0x02,	(byte)0x4C, (byte)0x34,	// MDC_PART_SCADA | MDC_MODALITY_FAST
133 				
134 				
135 				//16
136 				(byte)0x0A, (byte)0x55, 						// attribute-id = MDC_ATTR_ATTRIBUTE_VAL_MAP
137 				(byte)0x00, (byte)0x0C, 						// attribute-value.length = 12
138 				(byte)0x00, (byte)0x02, 						// AttrValMap.count = 2
139 				(byte)0x00, (byte)0x08, 						// AttrValMap.length = 8
140 				(byte)0x0A, (byte)0x4C,	(byte)0x00, (byte)0x02,	// MDC_ATTR_NU_VAL_OBS_BASIC, 2
141 				(byte)0x09, (byte)0x90,	(byte)0x00, (byte)0x08,	// MDC_ATTR_TIME_STAMP_ABS, 8
142 				
143 				};
144 	}
145 	
146 	public byte getByte(int i ){
147 		return apdu[i]; 
148 	}
149 	
150 	public byte[] getByteArray(){
151 		return apdu;
152 	}
153 
154 }