RDC python binding
A new folder python_binding is created for RDC python binding:
* The rdc_bootstrap.py is a python ctypes wrapper for the librdc_boostrap.so
* The RdcUtil.py defines common utilities for RDC to manage group/fieldgroup
* The RdcReader.py is a class to simplify the usage of the RDC:
- The user only needs to specify which fields he wants to monitoring.
RdcReader will create groups and fieldgroups, watch the fields, and fetch the fields.
- The RdcReader can support embedded and standalone mode.
- The standalone can be with authentication and without authentication.
- In standalone mode, the RdcReader can automatically reconnect to the rdcd when the connection is lost.
- When rdcd is restarted, the previously created group and fieldgroup may lose.
The RdcReader can re-create them and watch the fields after reconnect.
- If the client is restarted, RdcReader can detect the groups and fieldgroups
created before and avoid re-create them.
- The user can pass the unit converter if he does not want to use RDC default unit.
Change-Id: I109ec86012f37162eb13f7d3e921115b7dd82369
[ROCm/rdc commit: 9209c6c516]
Cette révision appartient à :
révisé par
Chris Freehill
Parent
6b246dcf4b
révision
14c9c17292
@@ -357,6 +357,14 @@ const char* field_id_string(rdc_field_t field_id) {
|
||||
return field_id_to_descript.find(field_id)->second.label.c_str();
|
||||
}
|
||||
|
||||
rdc_field_t get_field_id_from_name(const char* name) {
|
||||
rdc_field_t value;
|
||||
if (amd::rdc::get_field_id_from_name(name, &value)) {
|
||||
return value;
|
||||
}
|
||||
return RDC_FI_INVALID;
|
||||
}
|
||||
|
||||
char *strncpy_with_null(char *dest, const char *src, size_t n) {
|
||||
if (n == 0) {
|
||||
return dest;
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur