diff --git a/src/ccaosdb.cpp b/src/ccaosdb.cpp index 24a21c153881403d4abd8d9857d0995cf682c7bf..c48d34654b932ad414d5da417d54c47cecc842c0 100644 --- a/src/ccaosdb.cpp +++ b/src/ccaosdb.cpp @@ -747,6 +747,27 @@ CAOSDB_PROPERTY_GET(datatype, CAOSDB_PROPERTY_GET(unit, strcpy(out, wrapped_property->GetUnit().c_str());) CAOSDB_PROPERTY_GET(value, strcpy(out, wrapped_property->GetValue().c_str());) +ERROR_RETURN_CODE( + GENERIC_ERROR, + int caosdb_entity_message_get_code(caosdb_entity_message *message, int *out), + { + auto *wrapped_message = + static_cast<caosdb::entity::Message *>(message->wrapped_message); + *out = wrapped_message->GetCode(); + return 0; + }) + +ERROR_RETURN_CODE( + GENERIC_ERROR, + int caosdb_entity_message_get_description(caosdb_entity_message *message, + char *out), + { + auto *wrapped_message = + static_cast<caosdb::entity::Message *>(message->wrapped_message); + strcpy(out, wrapped_message->GetDescription().c_str()); + return 0; + }) + CAOSDB_ENTITY_SET(role, role, wrapped_entity->SetRole(std::string(role));) CAOSDB_ENTITY_SET(name, name, wrapped_entity->SetName(std::string(name));) CAOSDB_ENTITY_SET(description, description,