#!/usr/bin/python

r"""
Contains PLDM-related constants.
"""


PLDM_TYPE_BASE = '00'
PLDM_TYPE_PLATFORM = '02'
PLDM_TYPE_BIOS = '03'
PLDM_TYPE_OEM = '3F'

PLDM_BASE_CMD = {
    'GET_TID': '2',
    'GET_PLDM_VERSION': '3',
    'GET_PLDM_TYPES': '4',
    'GET_PLDM_COMMANDS': '5'}

PLDM_SUCCESS = '00'
PLDM_ERROR = '01'
PLDM_ERROR_INVALID_DATA = '02'
PLDM_ERROR_INVALID_LENGTH = '03'
PLDM_ERROR_NOT_READY = '04'
PLDM_ERROR_UNSUPPORTED_PLDM_CMD = '05'
PLDM_ERROR_INVALID_PLDM_TYPE = '20'

BIOS_TABLE_UNAVAILABLE = '83',
INVALID_BIOS_TABLE_DATA_INTEGRITY_CHECK = '84',
INVALID_BIOS_TABLE_TYPE = '85'

PLDM_BIOS_CMD = {
    'GET_BIOS_TABLE': '01',
    'SET_BIOS_ATTRIBUTE_CURRENT_VALUE': '07',
    'GET_BIOS_ATTRIBUTE_CURRENT_VALUE_BY_HANDLE': '08',
    'GET_DATE_TIME': '0c'}

PLDM_PLATFORM_CMD = {
    'SET_STATE_EFFECTER_STATES': '39',
    'GET_PDR': '51'}

PLDM_PDR_TYPES = {
    'STATE_EFFECTER_PDR': '11'}

# PLDM OEM related variables.
PLDM_FILEIO_CMD = {
    'GET_FILE_TABLE': '1',
    'READ_FILE': '4',
    'WRITE_FILE': '5',
    'READ_FILE_INTO_MEMORY': '6',
    'WRITE_FILE_FROM_MEMORY': '7'}

PLDM_FILEIO_COMPLETION_CODES = {
    'INVALID_FILE_HANDLE': '80',
    'DATA_OUT_OF_RANGE': '81',
    'INVALID_READ_LENGTH': '82',
    'INVALID_WRITE_LENGTH': '83',
    'FILE_TABLE_UNAVAILABLE': '84',
    'INVALID_FILE_TABLE_TYPE': '85'}

Create pldm related specific constants file.
Create pldm related specific constants file.

Change-Id: I3eda08d7ec1c0113931511f2d3539f2c658f7ad0
Signed-off-by: Sridevi Ramesh <cb5e1f81dd390dfc3a9afc08ab7298b7ab4296f5@in.ibm.com>
