37 #include "safec_lib.h"
39 mfrSerializedType_t getTypeFromMenu();
45 mfrSerializedType_t type = mfrSERIALIZED_TYPE_MANUFACTURER;
48 errno_t safec_rc = -1;
50 printf(
"mfrClient Entering %d\r\n", getpid());
58 if(Err != mfrERR_NONE)
60 printf(
"mfr_init failed:: %d \n",Err);
64 printf(
"mfr_init success:: %d \n",Err);
69 type = getTypeFromMenu();
70 if(mfrSERIALIZED_TYPE_MAX == type)
72 printf(
"Exiting the APP \r\n");
77 if(Err != mfrERR_NONE)
79 printf(
"mfrgetserializedata failed:: %d \n",Err);
82 pTmpStr = (
char *)malloc(data.bufLen + 1);
83 safec_rc = memset_s(pTmpStr, data.bufLen+1, 0, data.bufLen+1);
85 safec_rc = memcpy_s(pTmpStr, data.bufLen+1, data.buf, data.bufLen);
94 printf(
"Data length is = %d \r\n",data.bufLen);
95 printf(
"Serial number is = %s \r\n",pTmpStr);
105 mfrSerializedType_t getTypeFromMenu()
107 int input = mfrSERIALIZED_TYPE_MANUFACTURER;
109 printf(
"Enter MFR Type for Query :: ");
116 case mfrSERIALIZED_TYPE_MANUFACTURER:
117 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MANUFACTURER \r\n");
118 return mfrSERIALIZED_TYPE_MANUFACTURER;
120 case mfrSERIALIZED_TYPE_MANUFACTUREROUI:
121 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MANUFACTUREROUI \r\n");
122 return mfrSERIALIZED_TYPE_MANUFACTUREROUI;
124 case mfrSERIALIZED_TYPE_MODELNAME:
125 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MODELNAME \r\n");
126 return mfrSERIALIZED_TYPE_MODELNAME;
128 case mfrSERIALIZED_TYPE_DESCRIPTION:
129 printf(
"MFR Query made for mfrSERIALIZED_TYPE_DESCRIPTION \r\n");
130 return mfrSERIALIZED_TYPE_DESCRIPTION;
132 case mfrSERIALIZED_TYPE_PRODUCTCLASS:
133 printf(
"MFR Query made for mfrSERIALIZED_TYPE_PRODUCTCLASS \r\n");
134 return mfrSERIALIZED_TYPE_PRODUCTCLASS;
136 case mfrSERIALIZED_TYPE_SERIALNUMBER:
137 printf(
"MFR Query made for mfrSERIALIZED_TYPE_SERIALNUMBER \r\n");
138 return mfrSERIALIZED_TYPE_SERIALNUMBER;
140 case mfrSERIALIZED_TYPE_HARDWAREVERSION:
141 printf(
"MFR Query made for mfrSERIALIZED_TYPE_HARDWAREVERSION \r\n");
142 return mfrSERIALIZED_TYPE_HARDWAREVERSION;
144 case mfrSERIALIZED_TYPE_SOFTWAREVERSION:
145 printf(
"MFR Query made for mfrSERIALIZED_TYPE_SOFTWAREVERSION \r\n");
146 return mfrSERIALIZED_TYPE_SOFTWAREVERSION;
148 case mfrSERIALIZED_TYPE_PROVISIONINGCODE:
149 printf(
"MFR Query made for mfrSERIALIZED_TYPE_PROVISIONINGCODE \r\n");
150 return mfrSERIALIZED_TYPE_PROVISIONINGCODE;
152 case mfrSERIALIZED_TYPE_FIRSTUSEDATE:
153 printf(
"MFR Query made for mfrSERIALIZED_TYPE_FIRSTUSEDATE \r\n");
154 return mfrSERIALIZED_TYPE_FIRSTUSEDATE;
156 case mfrSERIALIZED_TYPE_DEVICEMAC:
157 printf(
"MFR Query made for mfrSERIALIZED_TYPE_DEVICEMAC \r\n");
158 return mfrSERIALIZED_TYPE_DEVICEMAC;
160 case mfrSERIALIZED_TYPE_MOCAMAC:
161 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MOCAMAC \r\n");
162 return mfrSERIALIZED_TYPE_MOCAMAC;
164 case mfrSERIALIZED_TYPE_HDMIHDCP:
165 printf(
"MFR Query made for mfrSERIALIZED_TYPE_HDMIHDCP \r\n");
166 return mfrSERIALIZED_TYPE_HDMIHDCP;
168 case mfrSERIALIZED_TYPE_BOARDVERSION:
169 printf(
"MFR Query made for mfrSERIALIZED_TYPE_BOARDVERSION \r\n");
170 return mfrSERIALIZED_TYPE_BOARDVERSION;
172 case mfrSERIALIZED_TYPE_BOARDSERIALNO:
173 printf(
"MFR Query made for mfrSERIALIZED_TYPE_BOARDSERIALNO \r\n");
174 return mfrSERIALIZED_TYPE_BOARDSERIALNO;
176 case mfrSERIALIZED_TYPE_CMCHIPVERSION:
177 printf(
"MFR Query made for mfrSERIALIZED_TYPE_CMCHIPVERSION \r\n");
178 return mfrSERIALIZED_TYPE_CMCHIPVERSION;
180 case mfrSERIALIZED_TYPE_DECODERSWVERSION:
181 printf(
"MFR Query made for mfrSERIALIZED_TYPE_DECODERSWVERSION \r\n");
182 return mfrSERIALIZED_TYPE_DECODERSWVERSION;
184 case mfrSERIALIZED_TYPE_OSKERNELVERSION:
185 printf(
"MFR Query made for mfrSERIALIZED_TYPE_OSKERNELVERSION \r\n");
186 return mfrSERIALIZED_TYPE_OSKERNELVERSION;
188 case mfrSERIALIZED_TYPE_MFRLIBVERSION:
189 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MFRLIBVERSION \r\n");
190 return mfrSERIALIZED_TYPE_MFRLIBVERSION;
192 case mfrSERIALIZED_TYPE_FRONTPANELVERSION:
193 printf(
"MFR Query made for mfrSERIALIZED_TYPE_FRONTPANELVERSION \r\n");
194 return mfrSERIALIZED_TYPE_FRONTPANELVERSION;
196 case mfrSERIALIZED_TYPE_SOFTWAREIMAGEVERSION1:
197 printf(
"MFR Query made for mfrSERIALIZED_TYPE_SOFTWAREIMAGEVERSION1 \r\n");
198 return mfrSERIALIZED_TYPE_SOFTWAREIMAGEVERSION1;
200 case mfrSERIALIZED_TYPE_OCHDVERSION:
201 printf(
"MFR Query made for mfrSERIALIZED_TYPE_OCHDVERSION \r\n");
202 return mfrSERIALIZED_TYPE_OCHDVERSION;
204 case mfrSERIALIZED_TYPE_OCAPVERSION:
205 printf(
"MFR Query made for mfrSERIALIZED_TYPE_OCAPVERSION \r\n");
206 return mfrSERIALIZED_TYPE_OCAPVERSION;
209 case mfrSERIALIZED_TYPE_BOOTROMVERSION:
210 printf(
"MFR Query made for mfrSERIALIZED_TYPE_BOOTROMVERSION \r\n");
211 return mfrSERIALIZED_TYPE_BOOTROMVERSION;
213 case mfrSERIALIZED_TYPE_MODELNUMBER:
214 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MODELNUMBER \r\n");
215 return mfrSERIALIZED_TYPE_MODELNUMBER;
217 case mfrSERIALIZED_TYPE_MODELSERIALNO:
218 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MODELSERIALNO \r\n");
219 return mfrSERIALIZED_TYPE_MODELSERIALNO;
221 case mfrSERIALIZED_TYPE_VENDORNAME:
222 printf(
"MFR Query made for mfrSERIALIZED_TYPE_VENDORNAME \r\n");
223 return mfrSERIALIZED_TYPE_VENDORNAME;
226 case mfrSERIALIZED_TYPE_VENDORSERIALNO:
227 printf(
"MFR Query made for mfrSERIALIZED_TYPE_VENDORSERIALNO \r\n");
228 return mfrSERIALIZED_TYPE_VENDORSERIALNO;
231 case mfrSERIALIZED_TYPE_MANUFACTUREDATE:
232 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MANUFACTUREDATE \r\n");
233 return mfrSERIALIZED_TYPE_MANUFACTUREDATE;
235 case mfrSERIALIZED_TYPE_CACPHOSTID:
236 printf(
"MFR Query made for mfrSERIALIZED_TYPE_MANUFACTUREDATE \r\n");
237 return mfrSERIALIZED_TYPE_CACPHOSTID;
240 printf(
"Error : Default choosen mfrSERIALIZED_TYPE_SERIALNUMBER \r\n");
241 return mfrSERIALIZED_TYPE_MAX;