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

Import/export of snapshots #945

Closed
7 tasks done
lochel opened this issue Feb 12, 2021 · 1 comment
Closed
7 tasks done

Import/export of snapshots #945

lochel opened this issue Feb 12, 2021 · 1 comment

Comments

@lochel
Copy link
Member

lochel commented Feb 12, 2021

Purpose

For proper text view/editing in OMEdit an extension of the snapshot functionality is required. It is necessary to handle complete and partial snapshots. It is also necessary to export/import descriptions of systems and components.

import snapshot

New function signature:

  • oms_status_enu_t oms_importSnapshot(const char* ex_cref, const char* snapshot);

The import function can be used to import a complete snapshot (this is already implemented):

  • > status = oms_importSnapshot("model", snapshot);

The import function can be used to import a partial snapshot, i.e. a given file:

  • > status = oms_importSnapshot("model:resources/signalFilter.xml", snapshot);
  • > status = oms_importSnapshot("model.system.component:SystemStructure.ssd", snapshot);

export snapshot

This function is returning the snapshot of the given model or just a partial snapshot, i.e. a specific resource file.

New function signature:

  • oms_status_enu_t oms_exportSnapshot(const char* ex_cref, char** snapshot);

It can be used to query a specific file, e.g. resources/signalFilter.xml:

  • > status = oms_exportSnapshot("model:resources/signalFilter.xml", &snapshot);

It can be used to query a complete snapshot (without the actual resources, e.g. FMUs) (this is already implemented):

  • > status = oms_exportSnapshot("model", &snapshot);

list resources

This new function will return a xml file containing all the resources filename, e.g. ssd files, ssv files, signal filter. It will not contain the components themselves, e.g. no FMU paths.

  • oms_status_enu_t listResources(const char* cref, char** contents);
@arun3688
Copy link
Contributor

arun3688 commented Mar 5, 2021

this issue is fixed with #977

@arun3688 arun3688 closed this as completed Mar 5, 2021
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

2 participants