Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the invalid Dataset Name? #483

Open
MaoniinoaM opened this issue Nov 20, 2023 · 1 comment
Open

What is the invalid Dataset Name? #483

MaoniinoaM opened this issue Nov 20, 2023 · 1 comment

Comments

@MaoniinoaM
Copy link

I try to attach a dataset to a RCB:
std::string dataset_ref = "simpleIOGenericIO/LLN0$" + "CS_sub" + std::to_string(sub_id);
// std::string dataset_ref = "@CSdatasetsub" + std::to_string(sub_id);

IedConnection_createDataSet(iec61850_client_.ctx, &error, const_cast<char*>(dataset_ref.c_str()), dataset_entry);
if (error == IED_ERROR_OK) {
  rcb = IedConnection_getRCBValues(iec61850_client_.ctx, &error, avail_rcb_ref.c_str(), NULL);
  if (rcb == NULL) {
    error = IED_ERROR_OBJECT_DOES_NOT_EXIST;
  }
}

if (error == IED_ERROR_OK) {
  ClientReportControlBlock_setDataSetReference(rcb, dataset_ref.c_str());

  IedConnection_setRCBValues(
      iec61850_client_.ctx, &error, rcb,RCB_ELEMENT_DATSET,true);
}

but the setRCBValues always return error = 32 which means invalid dataset reference.
please help give some hints why the error happens.

@MaoniinoaM
Copy link
Author

I try to create dataset dynamically:
IedConnection_createDataSet(iec61850_client_.ctx, &error, const_cast<char*>(dataset_ref.c_str()), dataset_entry);
and the error show OK.
but when I try to read the dataset with:
if (error == IED_ERROR_OK) {
ClientDataSet clientDataSet =
IedConnection_readDataSetValues(iec61850_client_.ctx, &error, const_cast<char*>(dataset_ref.c_str()), NULL);
if (error == IED_ERROR_OK) {
ClientDataSet_destroy(clientDataSet);
} else {
printf("Failed to read data set (error code: %d)\n", error);
}
}
the error shows 22, no the created dataset. So should I make any configurations in server side?
the server I use is the examples/server_example_config_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant