Python - Add entitycodec

Change-Id: I9dc7f5786e2c5ee5f9756cad7cb12387d05982ae
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rdc commit: cae49cf4f7]
This commit is contained in:
Galantsev, Dmitrii
2025-06-11 12:07:53 -05:00
gecommit door Galantsev, Dmitrii
bovenliggende 5151fe9649
commit bb0c4b7653
3 gewijzigde bestanden met toevoegingen van 18 en 15 verwijderingen
@@ -27,14 +27,6 @@ default_unit_coverter = {
rdc_field_t.RDC_FI_GPU_TEMP: 0.001, # degree
}
class rdc_entity_info_t(Structure):
_fields_ = [
("device_type", c_uint32),
("entity_role", c_uint32),
("instance_index", c_uint32),
("device_index", c_uint32),
]
class RdcReader:
# To run the RDC in embedded mode, set the ip_port = None
def __init__(self, ip_port = "localhost:50051", field_ids = default_field_ids,
@@ -53,11 +45,6 @@ class RdcReader:
self.unit_converter = unit_converter
self.rdc_handle = c_void_p()
rdc.rdc_get_entity_index_from_info.argtypes = [rdc_entity_info_t]
rdc.rdc_get_entity_index_from_info.restype = c_uint32
rdc.rdc_get_info_from_entity_index.argtypes = [c_uint32]
rdc.rdc_get_info_from_entity_index.restype = rdc_entity_info_t
self.is_standalone = True
if not ip_port: # embedded
self.is_standalone = False