Lines Matching defs:pdr

6 #include "libpldmresponder/pdr.hpp"
17 #include <libpldm/pdr.h>
28 using namespace pldm::responder::pdr;
251 auto record1 = pdr::getRecordByHandle(inRepo, 1, e);
254 pldm_state_effecter_pdr* pdr =
257 ASSERT_EQ(pdr->hdr.record_handle, 1);
258 ASSERT_EQ(pdr->hdr.version, 1);
259 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_EFFECTER_PDR);
260 ASSERT_EQ(pdr->hdr.record_change_num, 0);
261 ASSERT_EQ(pdr->hdr.length, 16);
262 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
263 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE);
264 ASSERT_EQ(pdr->entity_instance, 0);
265 ASSERT_EQ(pdr->container_id, 1);
266 ASSERT_EQ(pdr->effecter_semantic_id, 0);
267 ASSERT_EQ(pdr->effecter_init, PLDM_NO_INIT);
268 ASSERT_EQ(pdr->has_description_pdr, false);
269 ASSERT_EQ(pdr->composite_effecter_count, 1);
271 reinterpret_cast<state_effecter_possible_states*>(pdr->possible_states);
279 auto record2 = pdr::getRecordByHandle(inRepo, 2, e);
282 pdr = reinterpret_cast<pldm_state_effecter_pdr*>(e.data);
284 ASSERT_EQ(pdr->hdr.record_handle, 2);
285 ASSERT_EQ(pdr->hdr.version, 1);
286 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_EFFECTER_PDR);
287 ASSERT_EQ(pdr->hdr.record_change_num, 0);
288 ASSERT_EQ(pdr->hdr.length, 16);
289 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
290 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE);
291 ASSERT_EQ(pdr->entity_instance, 1);
292 ASSERT_EQ(pdr->container_id, 1);
293 ASSERT_EQ(pdr->effecter_semantic_id, 0);
294 ASSERT_EQ(pdr->effecter_init, PLDM_NO_INIT);
295 ASSERT_EQ(pdr->has_description_pdr, false);
296 ASSERT_EQ(pdr->composite_effecter_count, 1);
298 reinterpret_cast<state_effecter_possible_states*>(pdr->possible_states);
306 auto record3 = pdr::getRecordByHandle(inRepo, 3, e);
309 pdr = reinterpret_cast<pldm_state_effecter_pdr*>(e.data);
311 ASSERT_EQ(pdr->hdr.record_handle, 3);
312 ASSERT_EQ(pdr->hdr.version, 1);
313 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_EFFECTER_PDR);
314 ASSERT_EQ(pdr->hdr.record_change_num, 0);
315 ASSERT_EQ(pdr->hdr.length, 16);
316 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
317 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE);
318 ASSERT_EQ(pdr->entity_instance, 0);
319 ASSERT_EQ(pdr->container_id, 1);
320 ASSERT_EQ(pdr->effecter_semantic_id, 0);
321 ASSERT_EQ(pdr->effecter_init, PLDM_NO_INIT);
322 ASSERT_EQ(pdr->has_description_pdr, false);
323 ASSERT_EQ(pdr->composite_effecter_count, 1);
325 reinterpret_cast<state_effecter_possible_states*>(pdr->possible_states);
333 auto record4 = pdr::getRecordByHandle(inRepo, 5, e);
336 pdr = reinterpret_cast<pldm_state_effecter_pdr*>(e.data);
338 ASSERT_EQ(pdr->hdr.record_handle, 5);
339 ASSERT_EQ(pdr->hdr.version, 1);
340 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_EFFECTER_PDR);
341 ASSERT_EQ(pdr->hdr.record_change_num, 0);
342 ASSERT_EQ(pdr->hdr.length, 16);
343 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
344 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_REAL_SAI);
345 ASSERT_EQ(pdr->entity_instance, 1);
346 ASSERT_EQ(pdr->container_id, 1);
347 ASSERT_EQ(pdr->effecter_semantic_id, 0);
348 ASSERT_EQ(pdr->effecter_init, PLDM_NO_INIT);
349 ASSERT_EQ(pdr->has_description_pdr, false);
350 ASSERT_EQ(pdr->composite_effecter_count, 1);
352 reinterpret_cast<state_effecter_possible_states*>(pdr->possible_states);
386 auto record1 = pdr::getRecordByHandle(inRepo, 6, e);
389 pldm_state_sensor_pdr* pdr =
392 ASSERT_EQ(pdr->hdr.record_handle, 6);
393 ASSERT_EQ(pdr->hdr.version, 1);
394 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_SENSOR_PDR);
395 ASSERT_EQ(pdr->hdr.record_change_num, 0);
396 ASSERT_EQ(pdr->hdr.length, 14);
397 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
398 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE);
399 ASSERT_EQ(pdr->entity_instance, 0);
400 ASSERT_EQ(pdr->container_id, 1);
401 ASSERT_EQ(pdr->sensor_init, PLDM_NO_INIT);
402 ASSERT_EQ(pdr->sensor_auxiliary_names_pdr, false);
403 ASSERT_EQ(pdr->composite_sensor_count, 1);
405 reinterpret_cast<state_sensor_possible_states*>(pdr->possible_states);
413 auto record2 = pdr::getRecordByHandle(inRepo, 7, e);
416 pdr = reinterpret_cast<pldm_state_sensor_pdr*>(e.data);
418 ASSERT_EQ(pdr->hdr.record_handle, 7);
419 ASSERT_EQ(pdr->hdr.version, 1);
420 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_SENSOR_PDR);
421 ASSERT_EQ(pdr->hdr.record_change_num, 0);
422 ASSERT_EQ(pdr->hdr.length, 14);
423 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
424 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE);
425 ASSERT_EQ(pdr->entity_instance, 1);
426 ASSERT_EQ(pdr->container_id, 1);
427 ASSERT_EQ(pdr->sensor_init, PLDM_NO_INIT);
428 ASSERT_EQ(pdr->sensor_auxiliary_names_pdr, false);
429 ASSERT_EQ(pdr->composite_sensor_count, 1);
431 reinterpret_cast<state_sensor_possible_states*>(pdr->possible_states);
439 auto record3 = pdr::getRecordByHandle(inRepo, 8, e);
442 pdr = reinterpret_cast<pldm_state_sensor_pdr*>(e.data);
444 ASSERT_EQ(pdr->hdr.record_handle, 8);
445 ASSERT_EQ(pdr->hdr.version, 1);
446 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_SENSOR_PDR);
447 ASSERT_EQ(pdr->hdr.record_change_num, 0);
448 ASSERT_EQ(pdr->hdr.length, 14);
449 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
450 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_FIRMWARE_UPDATE);
451 ASSERT_EQ(pdr->entity_instance, 0);
452 ASSERT_EQ(pdr->container_id, 1);
453 ASSERT_EQ(pdr->sensor_init, PLDM_NO_INIT);
454 ASSERT_EQ(pdr->sensor_auxiliary_names_pdr, false);
455 ASSERT_EQ(pdr->composite_sensor_count, 1);
457 reinterpret_cast<state_sensor_possible_states*>(pdr->possible_states);
465 auto record4 = pdr::getRecordByHandle(inRepo, 11, e);
468 pdr = reinterpret_cast<pldm_state_sensor_pdr*>(e.data);
470 ASSERT_EQ(pdr->hdr.record_handle, 11);
471 ASSERT_EQ(pdr->hdr.version, 1);
472 ASSERT_EQ(pdr->hdr.type, PLDM_STATE_SENSOR_PDR);
473 ASSERT_EQ(pdr->hdr.record_change_num, 0);
474 ASSERT_EQ(pdr->hdr.length, 14);
475 ASSERT_EQ(pdr->terminus_handle, TERMINUS_HANDLE);
476 ASSERT_EQ(pdr->entity_type, PLDM_OEM_IBM_ENTITY_REAL_SAI);
477 ASSERT_EQ(pdr->entity_instance, 1);
478 ASSERT_EQ(pdr->container_id, 1);
479 ASSERT_EQ(pdr->sensor_init, PLDM_NO_INIT);
480 ASSERT_EQ(pdr->sensor_auxiliary_names_pdr, false);
481 ASSERT_EQ(pdr->composite_sensor_count, 1);
483 reinterpret_cast<state_sensor_possible_states*>(pdr->possible_states);