- Posts: 5
SDK API to save/load data container
- g1ashok
- Topic Author
Less
More
02 May 2018 12:54 #6225
by g1ashok
SDK API to save/load data container was created by g1ashok
SDK Tool provides a way to Save the variables in the data container to a data ?le. (.bdat) and Load data ?le (.bdat).
I'm looking for ways to save and load data container via Java API. Don't see anything listed in SSC guide (SSCJNI) API list.
Is there an API that can be invoked programatically to save and load the data container like SDK tool?
Thanks
Ashok
I'm looking for ways to save and load data container via Java API. Don't see anything listed in SSC guide (SSCJNI) API list.
Is there an API that can be invoked programatically to save and load the data container like SDK tool?
Thanks
Ashok
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
02 May 2018 16:00 #6226
by pgilman
Replied by pgilman on topic SDK API to save/load data container
Dear Ashok,
Please see Section 3.6 of the SDK Guide that comes as a PDF file with the SAM SDK. It explains how to generate a list of all variables in a data container.
And, as a reminder, the best way to generate code to start working in the various languages supported by the SDK is using the code generator from SAM's user interface as shown in this brief video:
Best regards,
Paul.
Please see Section 3.6 of the SDK Guide that comes as a PDF file with the SAM SDK. It explains how to generate a list of all variables in a data container.
And, as a reminder, the best way to generate code to start working in the various languages supported by the SDK is using the code generator from SAM's user interface as shown in this brief video:
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- g1ashok
- Topic Author
Less
More
- Posts: 5
03 May 2018 16:45 #6227
by g1ashok
Replied by g1ashok on topic SDK API to save/load data container
Hi Paul,
Thanks for the information. I'm using the code generator in SAM. Generated code creates 15 or so result metrics.
I can iterate the data container using ssc_data_first, ssc_data_next and ssc_data_query to get rest of the results in data container and save it.
Wondering if there is an alternative way to save the full data container as a file that can be loaded later similar to SDK tool save/load option via the JNI API call.
Thanks
Ashok
Thanks for the information. I'm using the code generator in SAM. Generated code creates 15 or so result metrics.
I can iterate the data container using ssc_data_first, ssc_data_next and ssc_data_query to get rest of the results in data container and save it.
Wondering if there is an alternative way to save the full data container as a file that can be loaded later similar to SDK tool save/load option via the JNI API call.
Thanks
Ashok
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
04 May 2018 10:28 #6228
by pgilman
Replied by pgilman on topic SDK API to save/load data container
Dear Ashok,
Those 15 or so metrics are just examples to show you how to work with the results variables.
There is not a built-in function for saving the data container. You can find the C++ code for the SDKtook's save/load functions in the SSC code repository on GitHub:
github.com/NREL/ssc/blob/develop/sdktool/sscdev.cpp
The functions in question are:
defined around line 683
defined around Line 515
Best regards,
Paul.
Those 15 or so metrics are just examples to show you how to work with the results variables.
There is not a built-in function for saving the data container. You can find the C++ code for the SDKtook's save/load functions in the SSC code repository on GitHub:
github.com/NREL/ssc/blob/develop/sdktool/sscdev.cpp
The functions in question are:
Code:
WriteBdatToDisk()
Code:
WriteVarTable()
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- g1ashok
- Topic Author
Less
More
- Posts: 5
04 May 2018 11:22 #6229
by g1ashok
Replied by g1ashok on topic SDK API to save/load data container
Thanks Paul, this is exactly what I was looking for.
-Ashok
-Ashok
Please Log in or Create an account to join the conversation.
Moderators: pgilman