PICMGDevice.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Brief: PICMG command define.
  3. * Author: jimbo_zhang@outlook.com
  4. * Date: 2019-4-11
  5. */
  6. #include "com_BmcType.h"
  7. #include "MsgHndlr.h"
  8. /*---------------------------------------
  9. * get IPMC Properties
  10. *---------------------------------------*/
  11. //netfn = 0x2c, cmd = 0, subfn = 0x00
  12. int Get_IPMC_Properties ( uint8_t* pReq, uint8_t ReqLen, uint8_t* pRes)
  13. {
  14. *pRes = CC_NORMAL;
  15. *(pRes+1) = 0x00;
  16. *(pRes+2) = 0x00;
  17. *(pRes+3) = 0x01;
  18. *(pRes+4) = 0x00;
  19. return 5;
  20. }
  21. /*---------------------------------------
  22. * get address information
  23. *---------------------------------------*/
  24. //netfn = 0x2c, cmd = 0x01, subfn = 0x00
  25. int Get_Address_Info ( uint8_t* pReq, uint8_t ReqLen, uint8_t* pRes)
  26. {
  27. return 1;
  28. }
  29. /*---------------------------------------
  30. * get shelf address infomation
  31. *---------------------------------------*/
  32. int
  33. Get_Shelf_Addr_Info ( uint8_t* pReq, uint8_t ReqLen, uint8_t* pRes)
  34. {
  35. *pRes = CC_NORMAL;
  36. *(pRes+1) = 0x00;
  37. *(pRes+2) = 0x01;
  38. *(pRes+3) = 0x02;
  39. *(pRes+4) = 0x03;
  40. return 5;
  41. }
  42. /*---------------------------------------
  43. * get device locator record id
  44. *---------------------------------------*/
  45. //netfn = 0x2c, cmd = 0x0d, subfn = 0x00.
  46. int Get_Dev_Locator_Rec_ID ( uint8_t* pReq, uint8_t ReqLen, uint8_t* pRes)
  47. {
  48. *pRes = CC_NORMAL;
  49. pRes[1] = 0;
  50. pRes[2] = 0; //Device locator ID MS
  51. pRes[3] = 0; //Device locator ID LS
  52. return 4;
  53. }